lcopt icon indicating copy to clipboard operation
lcopt copied to clipboard

Run lcopt from any brightway project

Open haasad opened this issue 6 years ago • 3 comments

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):

if not search_index:
    write_search_index()
model = LcoptModel('test')
model.launch_interact()

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 corresponding LCOPT_Setup-project would then only be required for people without a previous brightway installation.

haasad avatar Jul 21 '18 16:07 haasad