[Coin-discuss] Construct a MIP problem

Brady Hunsaker hunsaker at engr.pitt.edu
Fri Mar 18 12:20:55 EST 2005


This is an OsiCpx issue with continuous and integer variables.  Instead 
of writeMps use writeMpsNative.  This will use COIN-OR code to write the 
MPS file rather than CPLEX's routine and should work.

I think we should reorder the methods in OsiSolverInterface.hpp so that 
writeMpsNative shows up first in the documentation, and the description 
of writeMps should direct people to writeMpsNative unless they know they 
want the solver- (or interface- ) specific code to write the MPS file.

Brady

Spencer Fung wrote:
> John,
> 
>  
> 
> But I am using CPLEX, can it be done the same?
> 
>  
> 
> Spencer
> 
>  
> 
> ------------------------------------------------------------------------
> 
> *From:* coin-discuss-bounces at list.coin-or.org 
> [mailto:coin-discuss-bounces at list.coin-or.org] *On Behalf Of *John J Forrest
> *Sent:* Saturday, March 19, 2005 1:01 AM
> *To:* Discussions about open source software for Operations Research
> *Subject:* Re: [Coin-discuss] Construct a MIP problem
> 
>  
> 
> 
> Spencer,
> 
> It should work (well if you are using Clp).  I have modified the OsiClp 
> unitTest to show that.  The extra code is lines 941 to 950 of 
> OsiClpSolverInterfaceTest.cpp.
> 
> If you make unitTest in COIN/Osi and run unitTest you should see two mps 
> files "continuous" and "integer".  You will see that the continuous 
> bounds are all UP while the integer bounds are BV.
> 
> John Forrest
> 
> *"Spencer Fung" <sklfung at cse.cuhk.edu.hk>*
> Sent by: coin-discuss-bounces at list.coin-or.org
> 
> 03/17/2005 01:32 PM
> 
> Please respond to
> Discussions about open source software for Operations Research        
> 
> 	
> 
> To
> 
> 	
> 
> <coin-discuss at list.coin-or.org>
> 
> cc
> 
> 	
> 
>  
> 
> Subject
> 
> 	
> 
> [Coin-discuss] Construct a MIP problem
> 
>  
> 
>  
> 
> 	
> 
>  
> 
> 
> 
> 
> Hi All,
>  
> I am wondering how to construct a MIP problem by using constraint 
> matrix. I have done the following procedure to create a MIP problem,
>  
>     si->loadProblem(*matrix, NULL, col_ub, NULL, sense, rhs, NULL);
>     si->setInteger(ctype, n_cols);
> si->writeMps("problem");
>  
> However, the column type show in “problem.mps” is still continuous. But 
> after invoke the branchAndBound(), the column type is changed to 
> integer. Is it possible to obtain an integer model before invoking the B&B?
>  
> Thanks.
>  
> Cheers,
> Spencer_______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss


-- 
Brady Hunsaker
Assistant Professor
Industrial Engineering
University of Pittsburgh
http://www.engr.pitt.edu/hunsaker/



More information about the Coin-discuss mailing list