[Coin-discuss] Problem in Osi method writeLp()...
Francois Margot
fmargot at andrew.cmu.edu
Mon Apr 3 12:05:45 EDT 2006
Mathieu:
The problem is in OsiClpSolverInterface, apparently. When
OsiClpSolverInterface::writeLp() is called on line 98, it has
objSense=0 and the objective function has not been flipped.
The call setObjsense(-1.0) on line 91 is apparently ignored.
Francois
On Mon, 3 Apr 2006, mathieu lacroix wrote:
> Hi,
>
> I have read what it is written in the dioxygen file about osi mathode
> writeLp(). But, what it is written seems to not correspond with what happens
> in my example. As I have a maximization problem, I enter my problem as
> minimization one and then aply the "setObjSense(-1.0)" osi method for having
> a maximization problem. Then, when I write the problem in a lp file, the
> problem is then a minimization one but objective coefficients are not
> multiplied by -1 (I join you my little example of what happens. After running
> the program, the linear lp file is maximization.lp).
> It is really possible that I make some bugs in my own little program...
>
> Thank you for your help,
>
> Best regards,
>
> Mathieu
>
>
>
> Francois Margot wrote:
>
>>
>>
>>> I have found another little mistake. In the method "writeLp()", even if
>>> you
>>> have a minization problem, it is always written in the file "Minimization"
>>> instead of "Maximization (you can check it by opening after running my
>>> program the two files : minimizationProblem.lp and maximizationProblem.lp.
>>>
>>
>> This is not a bug. See the Doxygen documentation of
>> CoinLpIO::setLpDataWithoutRowAndColNames() and
>> OsiSolverInterface::writeLp().
>>
>> The only bug that I know of is that if the objective function has
>> a non zero constant term, it might be missing
>> in the written Lp file. I could not find the equivalent
>> of objectiveOffset in the class OsiSolverInterface.
>>
>> Francois
>> _______________________________________________
>> Coin-discuss mailing list
>> Coin-discuss at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>>
>
>
> --
> Mathieu LACROIX
> mathieu.lacroix at isima.fr
> Université Blaise Pascal - Clermont Fd II
> Laboratoire LIMOS
> Bâtiment ISIMA - Bureau D112
> Complexe scientifique des Cézeaux
> 63 177 Aubière, Cedex - France
> Tel : 04.73.40.79.48
> Fax : 04.73.40.76.39
>
>
More information about the Coin-discuss
mailing list