Originally posted by: SystemAdmin
[Ningning said:]
what's wrong with my program?
#include <ilcplex/ilocplex.h>
ILOSTLBEGIN
void main()
{
IloEnv env;
try {
IloModel model(env);
IloCplex cplex(env);
IloObjective obj;
IloNumVarArray var(env);
IloRangeArray rng(env);
cplex.importModel(model,"qpex.lp",obj,var,rng );
cplex.extract(model);
cplex.solve();
env.out() << "Solution status = " << cplex.getStatus() << endl;<br /> env.out() << "Solution value = " << cplex.getObjValue() << endl;<br />
}
catch (IloException& ex) {
cerr << "Error: " << ex << endl;<br /> }
catch (...) {
cerr << "Error" << endl;<br /> }
env.end();
}
The result is"CPLEX Error:1423:Could not open file 'qpex.lp' for reading"."qpex.lp" is one example published with CPLEX and is definitely right.
But what's wrong with my program ?
Hope for your help !
Thanks a lot !
#CPLEXOptimizers#DecisionOptimization