LPSolve with C++

View: New views
3 Messages — Rating Filter:   Alert me  

LPSolve with C++

by tamingsari83 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

Suppose a large MIP problem runs in MATLAB using lpsolve in Nm seconds.

If the same large MIP problem runs in C (or C++) using lpsolve in Nc
seconds, would one expect Nc << Nm, i.e. is MATLAB using lpsolve very
efficient?

The advantage of using MATLAB is the ease of setting up the large
constraint matrix A.

-suli-



     

RE: LPSolve with C++

by William H. Patton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think Reza's answer applies. Provided the time matlab takes to pass the
data to lp_solve is small

compared to the solve times you see, a c++ interface will have no advantage.

 

For MIP, is is generally the choice of  the structure of the A matrix,
Branch and Bound options and variable priority ordering that influence the
solve time. Most is cleverness of formulation and suppression of asserting
integer variables that will end up being integers as consequences of other
asserted integers and the constraint structure.

That means see how the model does with only the more constraining integer
variables declared as integer initially.

 

It also means that if you use the advanced API features once you get the
initial A matrix formed by matlab that you can then work with a textfile
written by write_lp(). This makes it easy to fiddle with the solver options
and the int declarations

Via the lp_solve.exe or the LPSolveIDE in windows.

 

William

 

  _____  

From: lp_solve@... [mailto:lp_solve@...] On Behalf
Of Tengku Joe
Sent: Friday, October 23, 2009 11:35 AM
To: lp_solve@...
Subject: [lp_solve] LPSolve with C++

 

 

Hi there,

Suppose a large MIP problem runs in MATLAB using lpsolve in Nm seconds.

If the same large MIP problem runs in C (or C++) using lpsolve in Nc
seconds, would one expect Nc << Nm, i.e. is MATLAB using lpsolve very
efficient?

The advantage of using MATLAB is the ease of setting up the large
constraint matrix A.

-suli-




Re: LPSolve with C++

by tamingsari83 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you William =)



________________________________
From: William H. Patton <pattonwh@...>
To: lp_solve@...
Sent: Fri, October 23, 2009 6:21:28 PM
Subject: RE: [lp_solve] LPSolve with C++

 
I think Reza’s answer applies. Provided
the time matlab takes to pass the data to lp_solve is small
compared to the solve times you see, a c++
interface will have no advantage.
 
For MIP, is is generally the choice of  the
structure of the A matrix, Branch and Bound options and variable priority ordering
that influence the solve time. Most is cleverness of formulation and suppression
of asserting integer variables that will end up being integers as consequences
of other asserted integers and the constraint structure.
That means see how the model does with
only the more constraining integer variables declared as integer initially.
 
It also means that if you use the advanced
API features once you get the initial A matrix formed by matlab that you can
then work with a textfile written by write_lp(). This makes it easy to fiddle
with the solver options and the int declarations
Via the lp_solve.exe or the LPSolveIDE in
windows.
 
William
 

________________________________
 
From:lp_solve@yahoogroup s.com [mailto: lp_solve@yahoogroup s.com ] On Behalf Of Tengku Joe
Sent: Friday, October 23, 2009
11:35 AM
To: lp_solve@yahoogroup s.com
Subject: [lp_solve] LPSolve with
C++
 
 
Hi there,

Suppose a large MIP problem runs in MATLAB using lpsolve in Nm seconds.

If the same large MIP problem runs in C (or C++) using lpsolve in Nc
seconds, would one expect Nc << Nm, i.e. is MATLAB using lpsolve very
efficient?

The advantage of using MATLAB is the ease of setting up the large
constraint matrix A.

-suli-