Hi
To accelerate the time to optimize, if I take away all the equations that have no use with the
Optimizing process, I can divide by 4 the time needed.
I put in the first wiews the equations that optimize and in the next views the other ones.
It adds clarity too to the process.
I can then have two models, one that makes just optimization and the full one.
If I optimize I put the results in a .cin file and I can then reuse it, interactively or in a
script file.
But it necessitates having two models, and if one changes something one must not forget to
change it in the other one.
Is there another way to cope with that problem or to make a sub-model that only runs when there is no optimization.
Regards.
JJ
accelerating optimization
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
I think you will need to wait for an answer from Bob on this one (he is on holiday at the moment).
There is functionality where you can use an include statement to add equations to a model from an external file, but it copies the equations into the model rather than keep them separate, so I don't think it will be a solution for you.
Tony.
There is functionality where you can use an include statement to add equations to a model from an external file, but it copies the equations into the model rather than keep them separate, so I don't think it will be a solution for you.
Tony.
Accelerating optimization
Hi
Thanks to all of you.
I cannot find a reference to any include statement in the documentation.
Regards.
JJ
Thanks to all of you.
I cannot find a reference to any include statement in the documentation.
Regards.
JJ
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi JJ,
I would not recomment the #include trick for what you are trying.
If your optimization component can actually run in isolation then I would recommend writing a core optimization model and then for all the other parts create a secondary models that defines the variables from the core model as data variables. Then after you optimize open the secondary model and use the optmization output run as the data input to the secondary model.
Another trick working in the text editor would be to order the equations so that the optimization equations are first and the other stuff second then just surron the secondary stuff with {} to comment it out during optimization.
there mare be another approach to this in the pipeline but I have to admit it is rare that optimization can be down with such a small chunk of a model.
I would not recomment the #include trick for what you are trying.
If your optimization component can actually run in isolation then I would recommend writing a core optimization model and then for all the other parts create a secondary models that defines the variables from the core model as data variables. Then after you optimize open the secondary model and use the optmization output run as the data input to the secondary model.
Another trick working in the text editor would be to order the equations so that the optimization equations are first and the other stuff second then just surron the secondary stuff with {} to comment it out during optimization.
there mare be another approach to this in the pipeline but I have to admit it is rare that optimization can be down with such a small chunk of a model.
accelerating optimization
Hi Bob
Thank's for the answer.
I will try the first method because the second is not possible to automatize unless one builds two models.
Besides with the second model you have not the full results that come from variables that are not part from the optimization process.
I intially thought that the optimizer was taking away from the process automatically all the equations that where not in
the process by studying the causal tracing of the pay offs, and making a final run to calculate the other variables when optimization was finished.
I think that some optimizers do this.
Regards.
JJ
Thank's for the answer.
I will try the first method because the second is not possible to automatize unless one builds two models.
Besides with the second model you have not the full results that come from variables that are not part from the optimization process.
I intially thought that the optimizer was taking away from the process automatically all the equations that where not in
the process by studying the causal tracing of the pay offs, and making a final run to calculate the other variables when optimization was finished.
I think that some optimizers do this.
Regards.
JJ