Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Add and remove rows dynamically

    Posted 11/01/09 08:07 PM

    Originally posted by: SystemAdmin


    [toronbing said:]

    I need to solve a series of linear programs dynamically.

    For example, there are ten POSSIBLE constrains: con1, ..., con10. Each linear program will only use a number of constraints.

    For example, I need to solve

    Linear Program 1, using con1, con3, and con9.
    Linear Program 2, using con1, con5, and con10.
    Linear Program 3, using con3, con5, and con10.

    How can I add and delete rows dynamically?

    To delete rows, I will just use cpxdelrows.

    To add rows, cpxaddrows does NOT work, since it always add the new row at the end of the original rows. What I want is to insert the new row among the original constraints according to the order con1, con2, ... con10.

    What function shall I use?


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Add and remove rows dynamically

    Posted 11/02/09 03:02 AM

    Originally posted by: SystemAdmin


    [prubin said:]

    If you need to maintain the original sequencing of the constraints, your best bet might be to leave them all in every LP and just change the RHS to infinity or -infinity to "remove" a constraint and then change it back to the original value to "replace" the constraint.
    #CPLEXOptimizers
    #DecisionOptimization