EMAworkbench icon indicating copy to clipboard operation
EMAworkbench copied to clipboard

Tracking convergence not working when using Vensim model

Open omarcastrejon opened this issue 1 year ago • 6 comments

Tracking convergence does not work properly when using a Vensim model. Probably it is because during the optimisation process the 'TIME' variable is added to the levers+outcomes (this shifts the variable names), and therefore the number of columns in the archive ({actual_columns}) does not match the expected number of decision variables and objectives ({expected_columns}). Any advice on how this issue could be solved?

omarcastrejon avatar Jun 18 '23 10:06 omarcastrejon

Without any detailed error and a minimum example, I cannot diagnose this. Your suggested explanation seems strange because TIME is set to INFO and thus should be left out of the optimization results as well as the platypus problem description.

quaquel avatar Jun 18 '23 10:06 quaquel

This is the error I get: image

Tha two extra columns from ArchiveLogger.load_archives(f"./archives/{i}.tar.gz") are: image

omarcastrejon avatar Jun 18 '23 10:06 omarcastrejon

Ok, but this changes what is happening quite a bit. This is an issue in storing the archive for post-run analysis. I am not sure whether I consider this a bug or desired behavior.

The easy workaround is to drop from the archive dataframe the column you don't need. This is one 1 additional line of code: dataframe.drop.

quaquel avatar Jun 18 '23 15:06 quaquel

@omarcastrejon If you have a specific suggestion to improve this somewhere in the documentation, tutorials or examples, please let me know.

EwoutH avatar Jun 18 '23 18:06 EwoutH

It's also something to consider as part of the larger optimization rework (See #268). Basically, how do we want to handle INFO outcomes?

quaquel avatar Jun 18 '23 18:06 quaquel

The following is the workaround I implemented for this particular case: image

Probably not the most efficient solution, but it worked well.

omarcastrejon avatar Jun 20 '23 03:06 omarcastrejon