Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

tuples execute

  • 1.  tuples execute

    Posted 06/20/16 06:40 AM

    Originally posted by: sandeepsinghchauhan


    capacity=

    Level      c

    1            10

    2            20

    3            40

    1            5

    2            0

    1            1000

    tuple Tcapacity
    {

      int Level;
      int c;  
    }
    {Tcapacity} capacity = ...;

    int Low[1..3];

    execute{
    for(var P in capacity){

    if (P.Level = 1){

    Low[P] = P.capacity;

    }
    }
    }

    ERROR
    The collection "capacity" is immutable because it is referenced by another element.  

    please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: tuples execute

    Posted 06/20/16 08:37 AM

    Hi,

    tuple Tcapacity
    {

      int Level;
      int c;  
    }
    {Tcapacity} capacity = {<1,1>,<2,3>,<3,5>};

    int Low[1..3];

    execute{
    for(var P in capacity){

    if (P.Level == 1){

    Low[P.Level] = P.c;

    }
    }
    }

    works well

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer