Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Unary resource constraint

    Posted 06/29/12 01:16 PM

    Originally posted by: Dmartinc


    Hi all,

    I am starting with CP due to I would like to code a crew scheduling model, which I´ve already solved with Cplex using C++ and compare their computational results. After having solved several simple models I am on a deadlock.

    My main issue right now are the disjunctive constraints or unary (disjunctive) resources. Those of this kind:

    -Unary capacity of the resource: Cap(A)=1, meaning this that activities cannot be overlapped.
    -Any two non-preemptive activites are related by the disjunctive constraint A<<B or B<<A

    Being this example the starting point which will open many doors:

    • One machine with jobs running on it,being this the constraint:

    Constraint: Cumulative(http://task(Start(A),P(A),End(A),1, A),...,task(Start(An),P(An),End(An),1, An), Options)

    A..An: Activity identifiers
    Start(A): Start time of the activity
    P(A): Processing time
    End(A): Completation time of the activity
    Options: options for different propagation algorithms
    4th parameter of the task =1: unit consumption of the resource

    I would appreciate any hint or literature references on how to code this in Ilog CP using C++.

    Cheers,

    David
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Unary resource constraint

    Posted 07/04/12 11:44 AM

    Originally posted by: SystemAdmin


    Hello David.

    CP Optimizer supports disjunctive and cumulative resources in a completely different way. Instead of integer variables there are interval variables (IloIntervalVar), disjunctive resource is modeled using noOverlap constraint (IloNoOverlap) and cumulative resource is modeled using cumulative function (IloCumulFunctionExpr).

    I recommend you to have a look into the documentation. Here are few possible starting points (links to online copy of the documentation):
    http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r4/index.jsp?topic=%2Filog.odms.cpo.help%2Frefcppcpoptimizer%2Fhtml%2Fintroduction.html
    http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r4/index.jsp?topic=%2Filog.odms.cpo.help%2FCP_Optimizer%2FGetting_started%2Ftopics%2Fschedseq.html
    http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r4/index.jsp?topic=%2Filog.odms.cpo.help%2FCP_Optimizer%2FUser_manual%2Ftopics%2Fdesignsched.html

    You can also have a look on C++ delivered examples, you can find them in directory cpoptimizer/examples/src/cpp. Scheduling examples start with sched_. You can find noOverlap constraint for example in sched_jobshop.cpp.

    I hope it helps, Petr
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Unary resource constraint

    Posted 07/10/12 11:29 AM

    Originally posted by: Dmartinc


    Cheers Petr
    #CPOptimizer
    #DecisionOptimization