Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CPLEX OPL Worker Allocation in a House Building Problem

    Posted Wed August 29, 2018 04:27 PM

    Originally posted by: Haktan


    *I was told to post my question here by another user*

    As part of my thesis project, I was given a house building problem. There are 17 tasks in total and some tasks need to be completed before others. There are also 5 different worker types (builder, architect etc) and each task requires different types and amount of workers. I am complete beginner in CPLEX OPL and using the tutorials provided, I was able to minimise the time taken to complete the 17 tasks. I used dvar intervals and endBeforeStart() for this purpose.

    However, I have spent countless hours trying to add workers to my problem with no success. The examples only include workers with names; but in my problem I have different types of workers which the tasks require, and each type has a different number of workers available. How can I add workers to my problem and allocate them to each task in an optimal way? I'm really stuck any help would be amazing! (I've attached my current code to the txt file)


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: CPLEX OPL Worker Allocation in a House Building Problem



  • 3.  Re: CPLEX OPL Worker Allocation in a House Building Problem

    Posted Tue September 04, 2018 05:18 AM

    Originally posted by: PhilippeLaborie


    Your problem seems to be a particular case of Resource-Constrained Project Scheduling Problem (RCPSP): you have a precedence constraint network between a set of tasks and each task also requires a set of non-renewable resources of finite capacity (for instance task 'a' requires 3 units of resource 'R1' and 7 units of resource 'R3' between its start and end time, and each resource 'Ri' has a finite capacity that must not be exceeded at any time)

    So you can also look at the generic formulation of this problem in CP Optimizer:

    CPLEX_Studio128\opl\examples\opl\sched_rcpsp

    In case your problem is more complex and you have different modes for executing the tasks (for instance task 'a' can be executed either in mode1 or in mode 2, if executed in mode1 it will require 3 units of resource 'R1' and 7 units of resource 'R3' whereas if it is executed in mode2 it will require 5 units of resource 'R1' and 3 units of resource 'R2' and the choice of the mode is a decision of the problem), then your problem is a special case of Multi-Mode Resource-Constrained Project Scheduling Problem (MM-RCPSP) and you can find the generic formulation of this problem in CP Optimizer in:

    CPLEX_Studio128\opl\examples\opl\sched_rcpspmm


    #CPOptimizer
    #DecisionOptimization