Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

How to constraint the modes in the sched_rcpspmm Example

  • 1.  How to constraint the modes in the sched_rcpspmm Example

    Posted Fri November 16, 2018 12:16 AM

    Originally posted by: Mahmoud Fayek


    In the "Multi-mode resource-constrained project scheduling" Provided Example,
    How to constraint the modes choosing process like; the sum of some value in the mode definition for all chosen modes must equal  a value.

    To access this example, go toexamples/opl/sched_rcpspmm.


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: How to constraint the modes in the sched_rcpspmm Example

    Posted Tue November 20, 2018 06:59 AM

    Originally posted by: GGR


    Hi Mahmoud

     

    To model the modes in sched_rcpspmm., an alternative constraint tells that a task[t] interval variable is an alternative among itsmodes[m]  interval variables.

     alternative(task[t], all(m in Modes: m.taskId==t.id) mode[m]);
    

    An optional internal variable it allow to tell a constraint presenceOf(it) that is true if and only if the interval variable is present.

     

    Then you can use this constraint as a Integer [0,1] expression to post constraint. For an unrealistic example, the pondered by task, sum of the mode selection must be less than a constant c

    sum (t in tasks) t.taskId*presenceOf(mode(<t.task.id, 0>)) <= c;
    

    You can have a look on

    https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.8.0/ilog.odms.cpo.help/refcppcpoptimizer/html/interval_variables.html

    https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.8.0/ilog.odms.ide.help/OPL_Studio/opllang_quickref/topics/tlr_oplsch_presenceOf.html

    https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.8.0/ilog.odms.ide.help/OPL_Studio/opllangref/topics/opl_langref_scheduling_logical.html

     

    Hope that helps

     

     

     

     

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: How to constraint the modes in the sched_rcpspmm Example

    Posted Sun December 02, 2018 06:12 AM

    Originally posted by: Mahmoud Fayek


    Thank you very much.


    #DecisionOptimization
    #OPLusingCPOptimizer