Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  can we edit a model and solve it again

    Posted 03/06/17 06:26 PM

    Originally posted by: srinit34


    Hi 

    I have an Ilocplex object into which I add some variables, an objective, and some constraints.

    Then I solve the Ilocplex object.

    Now I want to remove some variables, and add some new variables. Some of the constraints and objective will change because of this.

    Now I want to solve the Ilocplex object again.

    The key point here is that , I do not want to reconstruct the entire Ilocplex object again from scratch.

     

    Can this be done? It seems we can remove some old constraints and variables, and add new ones. But I am not sure if the IloCplex object can be modified, solutions reset, and solved from scratch again ?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: can we edit a model and solve it again

    Posted 03/07/17 10:37 AM

    Yes, all the modifications you described can be done and the expected things will happen.

    If you want to start the new solve from scratch then set parameter IloCplex::AdvInd to 0. If you don't set then CPLEX will use the feasible solutions from the previous solve as MIP starts for the next solve.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: can we edit a model and solve it again

    Posted 03/07/17 01:00 PM

    Originally posted by: srinit34


    If I have changed the variables, then  does CPLEX take the old feasible solution grow it into a feasible MIP start for the model with new variables?

    Basically what I am asking is, how do you reuse the old feasible solution? After all, I have changed some variables.

     

    What I am doing in my program  is that I joining 2 chocolate bars together and solving the model.

    Then I want  to break the joint chocolate bar into individual bars, and solve the model again.

    So I would like to retain the MIP start but not sure if it can be done without extracting the solution and explicitly specifying a MIP start for the edited model.


    #CPLEXOptimizers
    #DecisionOptimization