Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Tuple Indexing

    Posted 05/30/16 01:13 AM

    Originally posted by: sandeepsinghchauhan


    tuple TP
    {
      key int p;
      float t;
    }
    {TP} P = ...;

     

    tuple su {
      string r;
      string s;  
    }
    {su} Route = ...;

     

    tuple RS {
      key TP p;
      string r;
      string s;  
    }
    {RS} RPr = {<pl.p,r,s> |pl in P, <r,s>  in Route};

    Error
    Cannot use type {<int,string,string>} for {RS}.  

    Please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Tuple Indexing

    Posted 05/30/16 02:24 AM

    Hi,

    I d rather write

    {RS} RPr = {<pl,r,s> |pl in P, <r,s>  in Route};

    Plus since you do the Euclidian product of P and Route I would remove key in

    tuple RS {
      key TP p;
      string r;
      string s;  
    }

    and keep

    tuple RS {
      TP p;
      string r;
      string s;  
    }

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Tuple Indexing

    Posted 05/30/16 02:34 AM

    Originally posted by: sandeepsinghchauhan


    Thanks for your valuable reply

    if i want to extract only p value from tuple TP right now tuple RS will extract both p and t from tuple TP

    Please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer