Skip to content
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

Tracking convergence not working when using Vensim model #279

Open
omarcastrejon opened this issue Jun 18, 2023 · 6 comments
Open

Tracking convergence not working when using Vensim model #279

omarcastrejon opened this issue Jun 18, 2023 · 6 comments

Comments

@omarcastrejon
Copy link

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?

@quaquel
Copy link
Owner

quaquel commented Jun 18, 2023

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.

@omarcastrejon
Copy link
Author

This is the error I get:
image

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

@quaquel
Copy link
Owner

quaquel commented Jun 18, 2023

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.

@EwoutH
Copy link
Collaborator

EwoutH commented Jun 18, 2023

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

@quaquel
Copy link
Owner

quaquel commented Jun 18, 2023

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

@omarcastrejon
Copy link
Author

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants