Topic
  • 2 replies
  • Latest Post - ‏2013-06-05T23:19:50Z by lydiazhao
lydiazhao
lydiazhao
6 Posts

Pinned topic how to get the value of decision value in main block?

‏2013-05-09T06:35:45Z |

Hi,everyone,I know

cplex.getObjValue()

can give us the objective value of the problem.

But,is there someone who know how to get the value of decision virable?

this.x  does't work suppose x is the decision varible.(it only output the character x)

x.solutionValue doesn't work either.

Thanks.

  • Zahar
    Zahar
    4 Posts

    Re: how to get the value of decision value in main block?

    ‏2013-05-12T11:13:51Z  

    Access it through OPL object (IloOplModel object in your main code), like

    opl.x

    If the main script and the model itself are in the same file you can use thisOplModel global variable

    thisOplModel.x

     

    Regards,

    Zahar

  • lydiazhao
    lydiazhao
    6 Posts

    Re: how to get the value of decision value in main block?

    ‏2013-06-05T23:19:50Z  
    • Zahar
    • ‏2013-05-12T11:13:51Z

    Access it through OPL object (IloOplModel object in your main code), like

    opl.x

    If the main script and the model itself are in the same file you can use thisOplModel global variable

    thisOplModel.x

     

    Regards,

    Zahar

    Thanks alot.

    Lydia