[Os-project-managers] NaN in xs:double (OSrL)

Jun Ma majxuh at hotmail.com
Sat Feb 5 01:52:34 EST 2011


FYI:
In Java,
NaN is declared as a double:
public static final double NaN
a constant holding a Not-a-Number (NaN) value of type double.

double a == a return true
unless a is NaN because Double.NaN==Double.NaN  yields false.


Jun

--------------------------------------------------
From: "Jun Ma" <majxuh at hotmail.com>
Sent: Saturday, February 05, 2011 12:47 AM
To: "Kipp Martin" <kmartin at chicagobooth.edu>; "Horand Gassmann" 
<Horand.Gassmann at dal.ca>
Cc: <OS-project-managers at list.coin-or.org>
Subject: Re: [Os-project-managers] NaN in xs:double (OSrL)

> Kipp,
> It may help to think  an optimization like this:
> maximize 1/0
> subject to ......
>
> the objective value should  return NaN.
> At least in Java language, the official definition of NaN is 1/0.
>
> Jun
>
> --------------------------------------------------
> From: "Kipp Martin" <kmartin at chicagobooth.edu>
> Sent: Friday, February 04, 2011 8:15 PM
> To: "Horand Gassmann" <Horand.Gassmann at dal.ca>
> Cc: <OS-project-managers at list.coin-or.org>
> Subject: Re: [Os-project-managers] NaN in xs:double (OSrL)
>
>> 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.
>>>
>>> But even then, I maintain that diagnosing a solver error would be
>>> greatly helped if there were some mechanism that allows the user to
>>> pinpoint the variable or constraint or even objective that went awry.
>>> And the only way I see for that to happen is a way that allows the
>>> solver to return NaN to the user.
>>
>> Yes, I can see your point. But this may all be for naught. Can you come
>> up with an actual example where the solver actually returns a NaN? I
>> mean THE solver, not the interface.
>>
>> Cheers
>>
>>
>>>
>>> Another Can$ 0.02
>>>
>>> Cheers
>>>
>>> gus
>>>
>>>
>>
>>
>> -- 
>> Kipp Martin
>> Professor of Operations Research
>> and Computing Technology
>> Booth School of Business
>> University of Chicago
>> 5807 South Woodlawn Avenue
>> Chicago, IL 60637
>> 773-702-7456
>> kmartin at chicagobooth.edu
>> http://www.chicagobooth.edu/faculty/bio.aspx?person_id=12825325568
>> http://projects.coin-or.org/OS
>>
>> _______________________________________________
>> Os-project-managers mailing list
>> Os-project-managers at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/os-project-managers
>>
>
> _______________________________________________
> Os-project-managers mailing list
> Os-project-managers at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/os-project-managers
> 



More information about the Os-project-managers mailing list