[Coin-discuss] How to config integer variable in Mps file?

wangzt wangzt at bigsun.com.cn
Wed Dec 10 03:13:28 EST 2003


coin-discuss:

	Hello, I have some problem about Mps config files. Problem is :

	When I tested  Clp Samples driver.cpp using  "mps\samples\exmip1.mps", I got the result: 
	
	Model EXAMPLE has 5 rows and 8 columns
                      Primal          Dual         Lower         Upper        T
     0    COL01       2.50000       3.94737       2.50000  1.79769e+308       10
     1    COL02       0.00000       0.00000       0.00000       4.10000       00
     2    COL03       0.00000       0.00000       0.00000       1.00000       00
     3    COL04      0.642857       0.00000       0.00000       1.00000       00
     4    COL05      0.500000       2.52632      0.500000       4.00000       20
     5    COL06       4.00000       0.00000       0.00000  1.79769e+308       00
     6    COL07       0.00000       0.00000       0.00000  1.79769e+308       00
     7    COL08      0.263158   1.46367e-17       0.00000       4.30000      -10
--------------------------------------

	My question is:  why COL03 and COL04 are not 0,1 result, because they have been claimed in mps files.
    I list the exmip1.mps as follow:

************************************************************************        
*                                                                               
*  The data in this file represents the following problem:                      
*                                                                               
*  Minimize or maximize Z = x1 + 2x5 - x8                                       
*                                                                               
*  Subject to:                                                                  
*                                                                               
*  2.5 <=   3x1 +  x2         -  2x4 - x5               -    x8                 
*                 2x2 + 1.1x3                                   <=  2.1         
*                          x3              +  x6                 =  4.0         
*  1.8 <=                      2.8x4             -1.2x7         <=  5.0         
*  3.0 <= 5.6x1                      + x5               + 1.9x8 <= 15.0         
*                                                                               
*  where:                                                                       
*                                                                               
*  2.5 <= x1                                                                    
*    0 <= x2 <= 4.1                                                             
*    0 <= x3                                                                    
*    0 <= x4                                                                    
*  0.5 <= x5 <= 4.0                                                             
*    0 <= x6                                                                    
*    0 <= x7                                                                    
*    0 <= x8 <= 4.3                                                             
*                                                                               
*  x3, x4 are 0,1 variables.                                                    
*                                                                               
************************************************************************        
NAME          EXAMPLE                                                           
ROWS                                                                            
 N  OBJ                                                                         
 G  ROW01                                                                       
 L  ROW02                                                                       
 E  ROW03                                                                       
 G  ROW04                                                                       
 L  ROW05                                                                       
COLUMNS                                                                         
    COL01     OBJ                1.0                                            
    COL01     ROW01              3.0   ROW05              5.6                   
    COL02     ROW01              1.0   ROW02              2.0                   
*                                                                               
*  Mark COL03 and COL04 as integer variables.                                   
*                                                                               
    INT1      'MARKER'                 'INTORG'                                 
    COL03     ROW02              1.1   ROW03              1.0                   
    COL04     ROW01             -2.0   ROW04              2.8                   
    INT1END   'MARKER'                 'INTEND'                                 
*                                                                               
    COL05     OBJ                2.0                                            
    COL05     ROW01             -1.0   ROW05              1.0                   
    COL06     ROW03              1.0                                            
    COL07     ROW04             -1.2                                            
    COL08     OBJ               -1.0                                            
    COL08     ROW01             -1.0   ROW05              1.9                   
RHS                                                                             
    RHS1      ROW01              2.5                                            
    RHS1      ROW02              2.1                                            
    RHS1      ROW03              4.0                                            
    RHS1      ROW04              1.8                                            
    RHS1      ROW05             15.0                                            
RANGES                                                                          
    RNG1      ROW04              3.2                                            
    RNG1      ROW05             12.0                                            
BOUNDS                                                                          
 LO BND1      COL01              2.5                                            
 UP BND1      COL02              4.1                                            
 LO BND1      COL05              0.5                                            
 UP BND1      COL05              4.0                                            
 UP BND1      COL08              4.3                                            
ENDATA                                                                          

	Can you explain it? 
	
	And more, Do you have any document about mps file format ? Would you like share them to me ?
	Thank you.

	Casper Wang
	China
	Email: wangzt at bigsun.com.cn
	Dec 10,2003	










	







More information about the Coin-discuss mailing list