Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  different objective value from cplexmilp &mipopt for the same problem

    Posted 12/21/11 06:17 PM

    Originally posted by: PingLiu


    I run cplexmilp function in matlab, and the objective value is 145.4595
    [x,fval,exitflag,output] = cplexmilp(f,Aineq,bineq,Aeq,beq,[],[],[],lb,ub,ctype,[],[]);
    

    however, if I run mipopt command in cmd with the .lp file created for the same problem
    then the objective value is 152.748656023068
    why is there such difference?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: different objective value from cplexmilp &mipopt for the same problem

    Posted 12/22/11 01:34 AM

    Originally posted by: John Cui


    Are you sure 21-Dec-2011.lp is same as the model generated by .mat file? And could I know how did you generate 21-Dec-2011.lp?
    I found 21-Dec-2011.lp has 3026 decision variables, but the other only have 3024 decision variables.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: different objective value from cplexmilp &mipopt for the same problem

    Posted 12/24/11 06:59 PM

    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