[Coin-discuss] Problem in Osi method writeLp()...

mathieu lacroix mathieu.lacroix at isima.fr
Mon Apr 3 09:49:31 EDT 2006


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 3858 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20060403/75f752f4/attachment.bin>


More information about the Coin-discuss mailing list