-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run lcopt from any brightway project #38
Comments
Hi @haasad, lcopt writes foreground models in a particular way (it was originally designed to create a specific type of foreground model, brightway integration came later). There is a way to convert existing brightway projects (saved as bw2package files) into lcopt format - here's the notebook that explains it. The key function is In theory you could generate an lcopt model from any brightway project, but it would become a separate thing. I'm guessing you want to use lcopt to view and update existing brightway projects in situ as an extension to the activity browser. This might be possible by adding tags to the existing activities (e.g. the I'll look into it... |
As you correctly guessed, this idea comes from trying to improve the compatibility of lcopt and the AB. I think it would be very neat to have the option to launch lcopt in any given project and add a foreground model via the lcopt interface. Importing an existing foreground model to lcopt would be nice to have, but only secondary priority here. But probably I'm thinking too strongly from the direction of brightway and the AB, I can see that this is not a high priority for lcopt itself. |
+1 for this |
Maybe I'm missing something, but now that you made lcopt work nicely with all ecoinvent versions it should be possible to run lcopt from any project. Something along those lines (simplified):
You would probably need a check in the
write_search_index
-function that there is actually a valid ecoinvent/forwast db in the project. (Several ecoinvent dbs in the same project could also make this a bit more complicated)If this is possible, it would also help with #37, because you wouldn't need to copy the background db for every model. Instead all models would be stored alongside each other in the same project where they were created. The
lcopt_bw2_setup
-function and its correspondingLCOPT_Setup
-project would then only be required for people without a previous brightway installation.The text was updated successfully, but these errors were encountered: