[Coin-discuss] CBC applied to maximization problems

fmargot at andrew.cmu.edu fmargot at andrew.cmu.edu
Tue Dec 2 12:11:43 EST 2008



On Mon, 1 Dec 2008, Hart, William E wrote:

>
> I'm working on a CBC wrapper, and I'm not sure how to interpret CBC when it is applied to a maximization problem that is read-in from a *.lp file.  It appears that CBC automatically negates the objective and solves the corresponding minimization problem.
>
> . Is there a way to force CBC to solve the problem as a maximization problem?

This has little to do with Cbc. CoinLpIO is flipping the objective function
when reading the Lp file. Cbc does not know that the original lp file
was a maximization.

The reason for flipping the objective to get a minimization is that
orginially, only MPS files were used as input and MPS files are always
minimization problems. To avoid problem with solvers that assumed 
that the input came from an MPS file, I made LpIO flip the objective
function.

>
> . Is there a way to force CBC to indicate that it negative the objective?
>
> Without these hooks, I'm struggling with how to automate the process of converting the CBC result back into the answer for the original maximization problem...

Why? Isn't flipping the sign of the optimal value good enough? Is there
a constant term in the objective function?

Francois




More information about the Coin-discuss mailing list