Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

IloNumVar in the solution

Archive User

Archive UserMon January 19, 2015 08:45 AM

  • 1.  IloNumVar in the solution

    Posted Mon January 19, 2015 08:45 AM

    Originally posted by: MafCey


    Hello,

     

    How do I convert a IloNumvar into a result when writeln() runs a IloNumVar?

     

    Best regards.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: IloNumVar in the solution

    Posted Tue January 20, 2015 10:01 AM

    Hi,

    could the followings lines added to the example volsay help ?

    dvar float+ Gas;

    dvar float+ Chloride;

     

     

    maximize

    40 * Gas + 50 * Chloride;

    subject to{

    ctMaxTotal:

    Gas + Chloride <= 50;

    ctMaxTotal2:

    3 * Gas + 4 * Chloride <= 180;

     

    }

     

    execute

    {

    writeln("hello world");

    writeln(Gas," ",Chloride);

    }

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer