Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Objective Function Declaration

    Posted 06/20/08 12:40 PM

    Originally posted by: SystemAdmin


    [golopang said:]

    Hi, is there anyone know how to write an objective function, which is a summation with index value as a decision variable?? Something like below:

    tuple Arc {
      int FromNode;
      int ToNode;
    }
    {Arc} arcs = ...;
    float ArcCost[arcs] = ...;

    dvar int+ successor[0..2*numJobs] in 1..2*numJobs+1;

    minimize
        forall (a in 0..2*numJobs) sum ArcCost[<a, successor&#91;a&#93;>];

    Thanks.
    Anthony
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Objective Function Declaration

    Posted 06/20/08 01:47 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    try something like :

    minimize
        sum (a in 0..2*numJobs) ArcCost[<a, successor&#91;a&#93;>];

    Hope this helps,

    Alain
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Objective Function Declaration

    Posted 06/20/08 02:21 PM

    Originally posted by: SystemAdmin


    [golopang said:]

    Dear Alain,

    Thanks for your prompt reply, but still prompted to error message. I have sent you my model and data files, with almost all constraints disabled.

    Thanks.
    Anthony

    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: Objective Function Declaration

    Posted 06/20/08 05:09 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    With the datastructure you have, you can write the following which seems to be equivalent to your statement:


    minimize
        forall (a in 0..2*numJobs, t in arcs : t.FromNode == a) sum ArcCost[t]*(t.ToNode == successor[a]);


    If your problem is a job scheduling problem (just saying this in case your graph is a temporal network), maybe you can also consider using the detailed scheduling feature of OPL 6 (with time intervals).
    #DecisionOptimization
    #OPLusingCPOptimizer