[Coin-discuss] OsiClp: problem with sign of objective value

John J Forrest jjforre at us.ibm.com
Fri Aug 11 05:33:23 EDT 2006


Kish,

Will try to get to this but very busy.  Won't take long once I start.  If
you can send me (offline) your simple driver that will save some time and
make it more likely I will get to it before Monday.

John Forrest


                                                                           
             Kish Shen                                                     
             <kish.shen at crossc                                             
             oreop.com>                                                 To 
             Sent by:                  coin-discuss at list.coin-or.org       
             coin-discuss-boun                                          cc 
             ces at list.coin-or.                                             
             org                                                   Subject 
                                       Re: [Coin-discuss] OsiClp: problem  
                                       with sign of objective value        
             08/11/06 12:22 AM                                             
                                                                           
                                                                           
             Please respond to                                             
             Discussions about                                             
                open source                                                
               software for                                                
                Operations                                                 
                 Research                                                  
             <coin-discuss at lis                                             
              t.coin-or.org>                                               
                                                                           
                                                                           




Hi,

I have done some more tests on this problem. For the problem (in LP
format):

Maximize
obj: x0
Subject To
Bounds
 0 <= x0 <= 1
End

when I try to solve the above problem (produced by calling
OsiSolverInterface functions, rather
than from reading in the LP or MPS file) in ClpSolverInterface. The
objective value is
incorrectly returned as -1 rather than 1.  If I add a dummy constraint,
e.g.

Maximize
obj: x0
Subject To
cons0:  x0 >= -100000000000000000000
Bounds
 0 <= x0 <= 1
End

the objective value is then correctly returned as 1.

I have tried to trace the execution of both problems, and the objective
value in the ClpModel,
stored in  objectiveValue_, is different in the above two cases. It is 1 in
the first case (without
the dummy constraint) and -1 in the second (with the dummy constraint. This
objective value is
then multiplied by the objective sense (-1 for maximising) and this gives
the -1 and 1 objective
value respectively.

I tried to trace the execution further to see why there is this difference,
but I was not really
able to follow what Clp was doing.

Any suggestions of how I can work round this problem, so that I can get the
correct objective
value in the first case? Thanks in advance for any help!

Kish Shen

_______________________________________________
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