Decision Optimization

Decision Optimization

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


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

Needed help with house3.mod example.

  • 1.  Needed help with house3.mod example.

    Posted 02/14/08 08:24 PM

    Originally posted by: SystemAdmin


    [seigon said:]

    Hi

    I am a new user of ILog OPL Studio. Right now I am looking on different examples and in particular ‘house3.mod’. Can anybody explain me how the objective function from this example works? Why the objective function does not have the assignment binary variable like:

    var int assignment[Workers,Tasks] in 0..1;
    forall(w in Workers)
    minimize sum(t in Tasks)duration[t]*assignment[w,t];

    How does ILog figures out that by writing:
    minimize
    max(w in Workers) durationWorkers[w];

    the duration of all the tasks assigned to the workers should be added and the sum should be minimized? 

    I appreciate your help!

    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Needed help with house3.mod example.

    Posted 02/18/08 01:30 PM

    Originally posted by: SystemAdmin


    [oussedik said:]

    Hi,

    The model you're mentioning house3.mod is a constraint programming scheduling example (not a MIP) that was included in OPL version 3.7 and some earlier versions. The actual version is OPL 5.5, a new constraint programming engine (CP Optimizer) is provided with it.

    Regarding your question,

    - The objective function is (minimize max(w inWorkers) durationWorkers[w]) as the objective is to be fair among workers and this is achieved by minimizing the maximum work duration for any worker.

    - Regarding how durationWorkers[w] is instanciated, among the variables,

    var int durationWorkers[Workers] in 0..totalDuration; is the variable that is used in the objective

    Activity attendance[w in Workers](durationWorkers[w]); is also a variable, an activity is defined by its start time, end time and duration (duration =end time - start time), all can be variable or fixed. In this case durationWorkers is a variable and is instanciated by the constraints

    forall(t in Tasks)
    forall(w in Workers)
    activityHasSelectedResource(task[t], s, worker[w]) => attendance[w].start <= task[t].start & attendance[w].end >= task[t].end;

    durationWorkers[w] is then automatically (attendance[w].end - attendance[w].start)

    Hope this helps,

    Sofiane
    #DecisionOptimization
    #OPLusingCPOptimizer