Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Get Cplex solutions

    Posted 06/24/10 04:29 PM

    Originally posted by: BigBaldHead


    Two questions:

    1: CPXgetx and CPXgetcolnames
    Does the buffer filled in CPXgetx exactly correspond to the buffer filled in CPXgetcolnames? In the other word, can I use the same index to access the variable value and name?

    2: CPLEX could find multiple feasible solutions for an ILP problem. Can I get all these solutions instead of just optimal one?

    Thank a lot
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Get Cplex solutions

    Posted 06/24/10 04:45 PM

    Originally posted by: SystemAdmin


    Yes, you can use the same indices into the arrays returned by CPXgetx() and CPXgetcolname(). Provided, of course, that you specified the same ranges of indices to the two functions.

    To access solutions other than the optimal ones note that CPLEX also stores feasible solution it finds as MIP starts. Consequently, you can access some of the solutions that CPLEX found using the MIP start interface after the solution process terminates.

    You may also want to look at the solution pool feature (see the user's or reference manual) that is explicitly designed to collect solutions during the solve. It allows you fine-grained control about the solutions you want to collect etc.
    #CPLEXOptimizers
    #DecisionOptimization