[Coin-lpsolver] about the solution?

支援 zhiyuan at ict.ac.cn
Thu Jun 8 22:03:43 EDT 2006


It is my first time to use Clp. I am going to do a very simple job.
All the variables are either 0 or 1.
I follow the instruction of CLP user Guide.
I use the example 2.2 "Possible extension of minimum.cpp" to see what I can get from the solution.

The input mps file is as follow:

NAME          OUTPUT
ROWS
 N  obj
 E  c1
 E  c2
 E  c3
 E  c4
 E  c5
 G  c6
 L  c7
 G  c8
 L  c9
 G  c10
 L  c11
 G  c12
 L  c13
COLUMNS
    x0        c1        1.000000    
    x0        c3        -1.000000   
    x0        c5        -1.000000   
    x1        obj       1147045748.202851
    x1        c1        1.000000    
    x2        c2        1.000000    
    x2        c3        1.000000    
    x3        c13       1.000000    
    x3        c12       1.000000    
    x3        c11       1.000000    
    x3        c10       1.000000    
    x3        c9        1.000000    
    x3        c8        1.000000    
    x3        c7        1.000000    
    x3        c6        1.000000    
    x3        obj       569356800.000000
    x3        c3        1.000000    
    x4        c4        1.000000    
    x4        c5        1.000000    
    x5        c6        1.000000    
    x5        c5        1.000000    
    x5        c7        1.000000    
    x5        c8        1.000000    
    x5        c13       1.000000    
    x5        obj       573729850.409295
    x5        c9        1.000000    
    x5        c12       1.000000    
    x5        c10       1.000000    
    x5        c11       1.000000    
    x6        c6        -2.000000   
    x6        c7        -1.000000   
    x6        obj       315172800.000000
    x7        obj       315172800.000000
    x7        c9        -1.000000   
    x7        c8        -2.000000   
    x8        c10       -2.000000   
    x8        c11       -1.000000   
    x8        obj       315172800.000000
    x9        c12       -2.000000   
    x9        obj       315172800.000000
    x9        c13       -1.000000   
RHS
    rhs       c1        1              
    rhs       c2        0              
    rhs       c3        0              
    rhs       c4        0              
    rhs       c5        0              
    rhs       c6        0              
    rhs       c7        1              
    rhs       c8        0              
    rhs       c9        1              
    rhs       c10       0              
    rhs       c11       1              
    rhs       c12       0              
    rhs       c13       1              
BOUNDS
 BV  bounds    x1        
 BV  bounds    x2        
 BV  bounds    x3        
 BV  bounds    x4        
 BV  bounds    x5        
 BV  bounds    x6        
 BV  bounds    x7        
 BV  bounds    x8        
 BV  bounds    x9        
ENDATA

I use BV BOUNDS to make the integer (0 or 1).

However, after execution of the extension of minimum.cpp code,
I got the stdout like this:

Row 0, primal 1, dual 1.14705e+09
Row 1, primal 0, dual -5.71336e+08
Row 2, primal 0, dual 5.71336e+08
Row 3, primal 0, dual -5.75709e+08
Row 4, primal 0, dual 5.75709e+08
Row 5, primal 1, dual 0
Row 6, primal 1, dual 0
Row 7, primal 1, dual 0
Row 8, primal 1, dual 0
Row 9, primal 1, dual 0
Row 10, primal 1, dual 0
Row 11, primal 1, dual 0
Row 12, primal 1, dual -1.97955e+06
Column 0, primal 0.5, dual 0
Column 1, primal 0.5, dual 0
Column 2, primal 0, dual 0
Column 3, primal 0.5, dual 0
Column 4, primal 0, dual 0
Column 5, primal 0.5, dual 1.19209e-07
Column 6, primal 0, dual 3.15173e+08
Column 7, primal 0, dual 3.15173e+08
Column 8, primal 0, dual 3.15173e+08
Column 9, primal 0, dual 3.13193e+08

Why there will be 0.5 in the Column primal position? Shouldn't they be limited by the BV BOUND?


        zhiyuan at ict.ac.cn
          2006-06-09




More information about the Clp mailing list