[Clp-tickets] [COIN-OR Linear Programming Solver] #42: Clp newbie needs help

COIN-OR Linear Programming Solver coin-trac at coin-or.org
Fri Mar 4 11:35:33 EST 2011


#42: Clp newbie needs help
------------------------+---------------------------------------------------
 Reporter:  GCRhoads    |       Owner:  somebody
     Type:  task        |      Status:  new     
 Priority:  major       |   Milestone:          
Component:  component1  |     Version:          
 Keywords:              |  
------------------------+---------------------------------------------------
 Hi,

 I'm new to Clp and am having trouble figuring out how to use it for my
 research application.  What I want to do is create a very small LP
 (anywhere from 4 variables with 4 constraints to 12 variables with 12
 constraints) and then solve many, many LPs of that size.

 I couldn't find any examples of changing a single specific coefficient.
 How do you change the coefficient in row r, col c, to some new value?

 What's the best way to set up an initial small LP of the sizes I'm
 interested in and then changing the coefficients as necessary?
 Note that I won't be reading in the LPs from a file, I'll be setting
 them up from within my C++ program (the examples I looked at had the
 data read in from a file).

 The following is a typical LP that I need to solve.  There are 5 variables
 which I will call v, w, x, y, and z.

 {{{
 Maximize Z
 such that
            1.185 w - 0.306 x - 3.156 y - z >= 0
 -1.185 v           + 0.758 x - 2.286 y - z >= 0
  0.306 v - 0.758 w           + 0.182 y - z >= 0
  3.156 v + 2.286 w - 0.182 x           - z >= 0
        v       + w       + x       + y      = 1
 v,w,x,y >= 0
 z unrestricted
 }}}

 If I knew how to set up this LP and how to change specific coefficients of
 it, then I would know everything I need to for my particular application.
 I would really appreciate it if somebody would help me out.  You can send
 email to me at
 rhoads at cs.rutgers.edu

-- 
Ticket URL: <https://projects.coin-or.org/Clp/ticket/42>
COIN-OR Linear Programming Solver <http://projects.coin-or.org/Clp>
A linear programming solver.



More information about the Clp-tickets mailing list