Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

multiple resources constraints in house building calendar example

  • 1.  multiple resources constraints in house building calendar example

    Posted Fri February 22, 2019 01:47 AM

    Originally posted by: JKRATHORE


    Hi Everybody,

    I am working on a task similar to house_building_calendar (house_building_calendar.py) example mentioned in IBM Decision Optimization Help. In this example, each task has to be assigned to only one worker, what if I need one or more resources for same task, I have modified the existing code with three workers and trying to add a constraint to satisfy minimum workers required for each task, I believe it should be like "count of workers appended to a task should be less than or equal to number of workers required", however I am finding difficulty to implement it. can somebody please assist me to write this sort of constraint. 

    I have attached modified code here. 

    Thank you


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: multiple resources constraints in house building calendar example

    Posted Fri February 22, 2019 10:47 AM

    Originally posted by: Petr Vilím


    Hello,

    if I understand it right you have a group (or multiple groups) of equivalent workers. And each tasks require some minimum number of them (possibly only workers from a particular group). Such a group is what we call a cumulative resource, it could be used by multiple tasks at the same time provided that the total number of workers at a given moment does not exceed the capacity (size of the group).

    You may have a look at RCPSP example here: https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/cp/visu.rcpsp.py.html

    It does something very similar (there are actually multiple cumulative resources that may represent for example groups of workers with different skills).

    Regards, Petr


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: multiple resources constraints in house building calendar example

    Posted Sat February 23, 2019 04:13 AM

    Originally posted by: JKRATHORE


    Hi Peter,

    Thanks for quick response, the RCPSP problem focus on work hour allocation with capacity constraint, in my problem I am interested to assign workers to tasks, and get the result in form of which worker assigned to which task.

     

    Best Wishes,

    Jitendra


    #DecisionOptimization
    #OPLusingCPOptimizer