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