[Coin-discuss] CBC applied to maximization problems
Laszlo Ladanyi
ladanyi at us.ibm.com
Tue Dec 2 22:52:40 EST 2008
Francois has submitted code to print a warning message:
if(objsense == -1) {
printf("### WARNING: CoinLpIO::readLp(): Maximization problem
reformulated as minimization\n");
objectiveOffset_ = -objectiveOffset_;
}
It has been committed to stable/2.3 and to trunk.
--Laci
On Tue, 2 Dec 2008, Hart, William E wrote:
>
> Mike:
>
> But how does the wrapper know when to flip, if it's simply being handed an LP file? Do I need to parse the LP file before CBC does?
>
> I can't think of a way of dealing with this that isn't kludgey.
>
> --Bill
>
>> -----Original Message-----
>> From: Michael Hennebry [mailto:hennebry at web.cs.ndsu.nodak.edu]
>> Sent: Tuesday, December 02, 2008 8:27 PM
>> To: Hart, William E
>> Cc: fmargot at andrew.cmu.edu; coin-discuss at list.coin-or.org
>> Subject: Re: [Coin-discuss] CBC applied to maximization problems
>>
>> On Tue, 2 Dec 2008, Hart, William E wrote:
>>
>>> Here's my scenario. I have a wrapper script that passes a
>> LP or MPS file to CBC, and then parses the output. The
>> results of this optimization process are then returned to the
>> user. The confusing thing is that a user sees minimization
>> results when passed a maximization problem. Logically, it's
>> identical, but this will be surprising and confusing to
>> non-technical users.
>>
>> I think that the answer is to have the wrapper do the flipping.
>> The wrapper can print the warning.
>> The wrapper could also negate any output that needed negating.
>>
>>> If CBC/CoinLpIO simply printed a warning that this problem
>> was being reformulated, that would be enough for me to
>> correctly parse the output. (Working with the library
>> directly, this wouldn't be an issue because I could check the
>> max/min sense of the original problem...).
>>
>> --
>> Michael hennebry at web.cs.ndsu.NoDak.edu
>> "Pessimist: The glass is half empty.
>> Optimist: The glass is half full.
>> Engineer: The glass is twice as big as it needs to be."
>>
>>
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
More information about the Coin-discuss
mailing list