Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  About postprocess

    Posted 09/24/08 10:23 AM

    Originally posted by: SystemAdmin


    [voydge said:]

    Dear all,

    I stuck in a problem:

    At the beginning, I have defined 2 tuple types and initialized 2 sets respectively.

    [b]tuple ship{
    int id;
    int bay;
    }[/b]

    and

    [b]tuple job{
    int qc;
    ship ves;
    }[/b]

    [b]{ship} Ships=...;
    {job} Jobs=...;[/b]

    One of my decision variables is:

    [b]dvar int+ x[Jobs] in 0..1;[/b]

    Without the postprocess part, my model works well. In order to interpret the final result more easily, I add the postprocess part at the end of the model. The following is my postprocess:

    [b]tuple result{
       int qc;
       int bay;
    }
    {result} Results[Ships];

    execute{
    var k;
    for(k in Jobs)
          if(x[k]==1)
       [b][color=red]   Results[k.ves]=<k.qc, k.ves.bay>;[/color][/b]
    }; [/b]

    However, ILOG provides me the runtime error for the line in RED above:

    [color=red]error: Scripting compiler error: missing expression. [/color]

    I have tried my best to fix it but still can not figure it out :(.

    Seek your great help! Thanks a lot!

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: About postprocess

    Posted 09/24/08 03:47 PM

    Originally posted by: SystemAdmin


    [fwagner@Ilog.fr said:]

    Try
          Results[k.ves].add(k.qc, k.ves.bay);
    instead.

    Scripting syntax does not support modelling syntax for tuples <,>.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: About postprocess

    Posted 09/24/08 04:19 PM

    Originally posted by: SystemAdmin


    [voydge said:]

    Thanks.
    I try your method. However, this time it reports that : [color=red]undefined method 'add'[/color]. Do I miss something?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: About postprocess

    Posted 09/24/08 04:58 PM

    Originally posted by: SystemAdmin


    [fwagner@Ilog.fr said:]

    How is Results declared?

    This snippet works for me:
    tuple T {
        int i;
        int j;
    }

    range R = 1..10;
    {T} A[R];

    execute {
        for(var i in R) {
              A[i].add(i,i);
        }
        writeln(A);
    }

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: About postprocess

    Posted 09/25/08 06:49 AM

    Originally posted by: SystemAdmin


    [voydge said:]

    I have run your code.

    [b]tuple T {
        int i;
        int j;
    }

    range R = 1..10;
    {T} A[R];

    execute {
        for(var i in R) {
         [color=red] A[ i ].add(i,i);[/color]
        }
        writeln(A);
    }[/b]

    [color=red]Scripting runtime error: undefined method 'add'.[/color]

    My Ilog is version 5.0.

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: About postprocess

    Posted 09/25/08 12:55 PM

    Originally posted by: SystemAdmin


    [fwagner@Ilog.fr said:]

    It works with 6.0.1.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer