Originally posted by: PingLiu
I write a .m file by myself,and got the 21-Dec-2011.lp file, which is a little different from that generated by using
cplex.writeModel(FileName)
. but both of them are got with the same parameters*(f,Aineq,bineq,Aeq,beq,lb,ub,ctype,-1)*
actually, there are 178 fixed variables in 21-Dec-2011.lp.
so after running
cplex.readModel(FileName);
cplex.solve();
x = cplex.Solution.x;
we got only 3026 decision variables in x matrix.
but if we read the other .lp file generated by cplex.writeModel() even though the same 178 variables are fixed, when we run the same code
cplex.readModel(FileName);
cplex.solve();
x = cplex.Solution.x;
we can get all of the value of x with 3204 size.
I don't know the real reason for this difference, could you explain to me?
BTW, the index of x is not the same as that of variables, so how can we get the index of variables in x matrix?
thanks very much.
#CPLEXOptimizers#DecisionOptimization