[Os-project-managers] NaN in xs:double (OSrL)
Horand Gassmann
Horand.Gassmann at dal.ca
Sun Feb 6 11:59:36 EST 2011
Kipp Martin <kmartin at chicagobooth.edu> wrote:
> Hi Gus:
>>
>> That is not how I remember the discussion from last time (or maybe
>> the time before that):
>>
>> <initialVariableValues numberOfVar="2">
>> <var idx="0" value="NaN"/>
>> <var idx="1"/>
>>
>> should set both x0 and x1 to NaN (this I am clear on) and should
>> send those values to the solver (this is how I understood the
>> discussion, but perhaps I misunderstood).
>
> No we don't send those values on to the solver, we send those to the
> OS solver interface. Consider Ipopt. We never give Ipopt a starting
> value of NaN for a variable. However, the OS Ipopt solver interface
> "intercepts" the NaN and replaces it with 1.7171. So we never send
> NaN to a solver.
Having just looked at OSIpoptSolver.cpp again, I think this is
incorrect. Let's have a closer look. The parser reads "NaN" in the
first case and places OSNAN in osoption->...->initVarValue[0]->value.
In the second case
osoption->...->initVarValue[1]->value is initialed to OSNAN by the
initVarValue constructor. Either way,
osoption->...->initVarValue[i]->idx has a legal value, and hence the
OSNAN is transferred into the x-array in line 255 of OSIpoptSolver,
and initialed is set to true. Therefore the loop in line 269/270 is
not executed, and the default_initval is skipped. I think this is as
it should be.
BTW, I don't think the if statements in lines 241, 246 and 251 are
very graceful. I believe a quiet reset with a notation in the osrl
file would be much better.
Cheers
gus
More information about the Os-project-managers
mailing list