Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Parallel Machines Problem

Archive User

Archive UserMon November 19, 2018 05:02 AM

  • 1.  Parallel Machines Problem

    Posted Mon November 19, 2018 05:02 AM

    Originally posted by: Stan_Yin


    Hi,

     

    I am working on CP optimizer for parallel machines allocation. A production can be processed on parallet machines. Production rate of each machines is different. And, machines may be used on some products. There is a setup time befor machine processes different product. The objective is to minimize using number of machine for each product. The best is one production is processed on one machine in whole planning horizon. I tried to use cumulFunction to count machine usage by product in each interval and minimize the peak usage. This approach just can minimize usage (number) of machine in each interval, which can't keep the same machine of each production in whole planning horizon. What may I do to improve this modeling?

     

    Product_A, Machine_1, 200

    Product_A, Machine_2, 300

    Product_B, Machine_2, 300

    Product_B, Machine_3, 200

    Product_C, Machine_1, 200

    Product_C, Machine_2, 300

    Product_C, Machine_3, 200

     

    Best Regards,

    Stan Yin

     


    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Parallel Machines Problem

    Posted Mon November 19, 2018 05:59 AM

    Originally posted by: Petr Vilím


    Hello Stan,

    if the real goal is to use a single machine for all all products of the same time then we can add constraints to ensure that (i.e. it could be moved from the objective into constraints part of the model). However I doubt that it is the real business goal, it seems to me that it is just a means (a subgoal) to achieve a real goal. The real goal could be e.g. minimum duration of the schedule or minimum cost of setups: if a machine process just the same time of products then it never loose time/resources on setups. I would ask: assuming there is a big demand for product C and only minimal (or zero) demands for A and B, do you really want to use only one machine for products C and let the other two machines idle most of the time?

    But to answer your question: you may use alternative constraint to choose a machine to process e.g. production of one product A. So we need three interval variables, lets call them for simplicity A1, A1_Machine_1 and A1_Machine2. Interval variable A is present, the other two are optional. Then alternative(A1, [A1_Machine_1, A1_Machine_2]) specifies then either A1_Machine_1 is present (and A1_Machine_2 is absent) or vice versa. A1_Machine_1 is using Machine1 (probably by noOverlap) and similarly A1_Machine_2 is using Machine2. Also A1_Machine_1 has different duration than A1_Machine_2. Now suppose that there is production of another product A, lets call the associated interval variable A2 and its alternatives A2_Machine_1 and A2_Machine_2. We can add constraint presenceOf(A1_Machine_1) == presenceOf(A2_Machine_1) to make sure that if we used Machine1 for A1 then we will also use Machine1 for A2.

    Best regards, Petr


    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: Parallel Machines Problem

    Posted Mon November 19, 2018 11:01 AM

    Originally posted by: Stan_Yin


    Hi Petr,

     

    Thanks a lot for your help again.

     

    The real goal is the minimum cost of setup or the maximum production quantity. Demand time of each product is mixed. The goal of scheduling is production by batch. Batch size depends on the demand quantity during a period, for example, Please check the attached file. Week 1 is ongoing, schedule can't be changed. The demand for week 2 is coming. The demand for Product_A is 1500, Product_B is 400, Product_C is 2000.

    Below, there are two feasible schedules, Schedule_1 & Schedule2. The number of setup in Schedule_1 is 2, Schedule_2 is 3. Schedule_1 is better than Schedule_2. 

    May I know how to modeling this case to minimize setup?


    #ConstraintProgramming-General
    #DecisionOptimization


  • 4.  Re: Parallel Machines Problem

    Posted Fri November 23, 2018 01:12 PM

    Originally posted by: Petr Vilím


    Hello,

    I see two different ways to model this problem: using interval variables or integer variables.

     

    1) With integer variables

    Considering the fact that time unit seems to be one day and there is basically one activity per day on each resource, it is rather timetabling problem then pure scheduling problem (i.e dates are fixed, the unknown what will be done within given time slot). So there could be one integer variable per slot (machine and day) say what kind of product (or setup) the machine does that day, lets call them for example production[machine][day]. And let value 0 denotes setup. Then we can constrain production at the given day to be the same as the day before unless there was a setup the day before.

    ifThen(production[machine][day-1] != 0, production[machine][day] == production[machine][day-1])

    Production of a product 1 during some period could be computed using count expression:

    daily_product1_rate * count(production[machine1][day1], production[machine1][day2], ..., 1)

    In OPL you can use "all" to create the list of values for count expression (the above example is in cpo file format).

    Number of setups could be counted using count expressions.

     

    2) With interval variables

    In that case I'm assuming that what you described is just a simplification of a bigger problem. In particular this model could be useful if you need to create lower-resolution schedule and for example duration of one batch of production A has different duration than batch of product B. In this case I recommend to have a look on example sched_setup (or SchedSetup) that is delivered together with CP Optimizer in different languages. Regarding setup cost, I recommend to have at section "Sequence-dependent setup costs" at the bottom of the following page:

    https://www.ibm.com/support/knowledgecenter/SSSA5P_12.8.0/ilog.odms.cpo.help/CP_Optimizer/User_manual/topics/designsched_costs.html

    Best regards, Petr


    #ConstraintProgramming-General
    #DecisionOptimization


  • 5.  Re: Parallel Machines Problem

    Posted Mon November 26, 2018 09:23 PM

    Originally posted by: Stan_Yin


    Hi Petr,

     

    Thank a lot for your hard work on this case. You got this pain point of this problem.

     

    I have tried "Sequence-dependent setup costs", which can get a better result.  It still is not enought. It is easy to find a alternative solution which can produce the same production quantity with less setup time. I am trying to tune the weighting of objective parameters and OPL exist crieria (longer search time). The planning result still is not optimization (expectation).

     

    Is there a documentation or paper which mentions the modeling / search paramenter tuning? Or, how to read journal of CP engine?

     

    Best Regards,

    Stan

     

     

     

     


    #ConstraintProgramming-General
    #DecisionOptimization


  • 6.  Re: Parallel Machines Problem

    Posted Tue November 27, 2018 10:39 AM

    Originally posted by: ChrisBr


    Hello Stan,

    You will find a general introduction to CP search here, more about search parameters, how to tune the search.

    Here you'll find more details about CPO parameters, and this page is more specific on how to read the search log.

    I hope this helps!

    Regards,

    Chris.


    #ConstraintProgramming-General
    #DecisionOptimization