I’m having trouble storing some of the model attributes after an
optimization run. The relevent part of the code, which runs after the
optimization is completed, looks like this:
RunStats(xx,‘Obj’) = MarketValue.l;
RunStats(xx,‘Iters’) = MyModel.iterusd;
RunStats(xx,‘DomErrs’) = MyModel.domusd;
RunStats(xx,‘Infes’) = MyModel.numinfes;
RunStats(xx,‘Exit’) = MyModel.modelstat;
The MarketValue.l and modelstat elements store just fine, but I get no
data for the iterusd, domusd or numinfes elements. Any idea why those
might not work?
Thanks,
Emily
\
Emely,
You describe you get no data, I guess that means the values are all 0.
For domusd and numinfes that might not be so wrong. In any case, the
number should coincide with the numbers printed in the solution
summary in the listing file. If that is not the case, there is a
problem. Iteration is a problem in itself. In the old days there
people counted pivots as iterations, but nowadays where are many more
interpretations of ‘iterations’ (just think about barrier and simplex
iterations). Some solvers might not have the concept of iterations (or
at least reporting them) anymore. The value of reporting iterations is
limited. I would rather record the time spend by the solver (resusd).
Hope this helps,
Michael Bussieck - GAMSWorld Coordinator
On Sep 7, 3:06 pm, emily wrote:
I’m having trouble storing some of the model attributes after an
optimization run. The relevent part of the code, which runs after the
optimization is completed, looks like this:
RunStats(xx,'Obj') = MarketValue.l;
RunStats(xx,'Iters') = MyModel.iterusd;
RunStats(xx,'DomErrs') = MyModel.domusd;
RunStats(xx,'Infes') = MyModel.numinfes;
RunStats(xx,'Exit') = MyModel.modelstat;
The MarketValue.l and modelstat elements store just fine, but I get no
data for the iterusd, domusd or numinfes elements. Any idea why those
might not work?
Thanks,
Emily
\
Hi,
Thanks.
Sorry, you may have notice a similar post that followed this one. My
browser froze while I was submitting this post, and when it didn’t
appear in the group after an hour, I figured it didn’t take.
My new post has some more details of my problem. I figured out what
you said about domusd and numifes, but iterations was what was really
confusing me. There are reasons that I need the iteration data (in my
case what I need is number of steps used in solving a nonlinear
model), but as you say I can’t seem to get it. I assume KNITRO counts
iterations as nodes in the MIP problem (which I am not solving… just
a continuos nonlinear problem).
Sounds like that might not be possible to get through GAMS. That’s a
shame. GAMS, please consider this for your next release. I know the
data is available from the solver (I get it from KNITRO in other
modeling platforms, MATLAB, for instance). Solution time is a very
imperfect substitute in many cases, such as mine.
Thanks,
Emily
On Sep 8, 8:43 am, Gamsworld Admin wrote:
Emely,
You describe you get no data, I guess that means the values are all 0.
For domusd and numinfes that might not be so wrong. In any case, the
number should coincide with the numbers printed in the solution
summary in the listing file. If that is not the case, there is a
problem. Iteration is a problem in itself. In the old days there
people counted pivots as iterations, but nowadays where are many more
interpretations of ‘iterations’ (just think about barrier and simplex
iterations). Some solvers might not have the concept of iterations (or
at least reporting them) anymore. The value of reporting iterations is
limited. I would rather record the time spend by the solver (resusd).
Hope this helps,
Michael Bussieck - GAMSWorld Coordinator
On Sep 7, 3:06 pm, emily wrote:
I’m having trouble storing some of the model attributes after an
optimization run. The relevent part of the code, which runs after the
optimization is completed, looks like this:
RunStats(xx,'Obj') = MarketValue.l;
RunStats(xx,'Iters') = MyModel.iterusd;
RunStats(xx,'DomErrs') = MyModel.domusd;
RunStats(xx,'Infes') = MyModel.numinfes;
RunStats(xx,'Exit') = MyModel.modelstat;
The MarketValue.l and modelstat elements store just fine, but I get no
data for the iterusd, domusd or numinfes elements. Any idea why those
might not work?
Thanks,
Emily- Hide quoted text -