Page 1 of 1

Optimization with wrong subscripts error

Posted: Thu Mar 07, 2024 9:56 pm
by aliakhavan89
When there are issues with the subscripts defined in the Vensim Optimization Control (.voc) file, Vensim reports 'ERROR: Problems encountered in the simulation.' when running the optimizer. It would be helpful if more targeted information is provided when this error is shown.

Thank you very much.

Re: Optimization with wrong subscripts error

Posted: Fri Mar 08, 2024 8:15 am
by Administrator
Do you have an example you can provide? I can probably make changes very quickly.

Re: Optimization with wrong subscripts error

Posted: Fri Mar 08, 2024 3:44 pm
by aliakhavan89
Does this work?

Re: Optimization with wrong subscripts error

Posted: Sat Mar 09, 2024 8:28 am
by Administrator
I'll see if I can improve the error reporting. Maybe if I just change

ERROR: Cannot find constant in model

To one of the following depending on what is in the optimization control file.

ERROR: Constant not found in model, cannot continue.
or
ERROR: Constant found in model, but no subscripts in optimization control defined. Are subscripts missing?
or
ERROR: Constant found in model, subscripts appear to be incorrect. Are subscripts correctly defined?

Re: Optimization with wrong subscripts error

Posted: Mon Mar 11, 2024 8:36 pm
by aliakhavan89
Thanks a lot! It can also happen when subscripts are defined incorrectly.