Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Optimization objective with hundreds of variables

    Posted 03/07/13 01:36 AM

    Originally posted by: SystemAdmin


    Hi all,

    I am using cplex concert tech in a c++ program to solve a convex optimization problem with a quadratic objective. I am fairly new to cplex and dunno how to write the objective function in a compact way as there are over a hundred variables. The way the users manual put as below is surely not gonna work out.

    IloObjective obj(env, 1*x[1] + 2*x[2] + 3*x[3], IloObjective::Minimize);
    


    should I replace "1*x[1] + 2*x[2] + 3*x[3]" with IloExpr expr(env)?

    Thanks for your help!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Optimization objective with hundreds of variables

    Posted 03/07/13 05:03 PM

    Originally posted by: SystemAdmin


    Yes. Declare an instance of IloExpr, build up the objective expression in a loop, then use the IloExpr as an argument to IloMinimize. CPLEX ships with examples; the iloqpex3.cpp file builds a quadratic objective in a loop.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Optimization objective with hundreds of variables

    Posted 03/10/13 11:04 PM

    Originally posted by: SystemAdmin


    Thanks, PaulRubin!;)
    #CPLEXOptimizers
    #DecisionOptimization