[Coin-lpsolver] help solve a lp problem please

George Cao george_cao at hotmail.com
Sun Feb 1 11:29:04 EST 2004


Hi everyone,

For the lp gurus in the group, can you guys take a look at this problem 
and see if you can provide some pointers?

maximize:
     r1* x1a + r2 * x1b + r2*x2  (note: r1, r2 are constants and r2 is 
always greater than r1)

Subject to:
     x1a + x1b <= d1
     x2 <= d2
     10 * x1b <= d1
     x1a <= c1
     x1b + x2 <= c2
     x1a, x1b, x2 >=0

This works fine so far.  But I need to add a couple more constraints:
     if (c1 - d1) >= 0 let x1b = 0
     if (c1 - d1) < 0 x1b can be any number >= 0

I can't figure out how to incorporate these constraints into the lp 
problem.  Adding (c1 - x1a - x1b) >= 1000000 * x1b works when (c1 - x1a 
- x1b) >= 0, but will make the whole problem not feasible when (c1 - x1a 
- x1b) < 0.

Some help please?

Thanks in advance.

George




More information about the Clp mailing list