Hi Christie
Is the number of valid combinations huge ?
In your examples, if my understanding is clear, all valid combinations, regardless of the individual limit, are :
10*10 total weight 65
10-10*10-10 total weight 85
25*25 total weight 95
10-10-10-10-10*25-25 total weight 145
(10 or 25 represents the weight of one plate, and * represents the barrbell)
So for each individual, you would filter among the combinations the one that respects the individual limit (100 for Bill would filter out the last combination)
Now, you have to assign one of the valid combination for each person, which consumes the resource of each corresponding resources (10 lb / 25 lb and barbell) during the time of the individual exercise
The objective function would be based on the score (for instance the weight) of the combination , something like
Maximize sum(<c,i> in validCombinations of individual) c.weight * presenceOf( intervalVar[<c,i>])
------------------------------
David Gravot
------------------------------
Original Message:
Sent: Wed May 27, 2020 09:27 AM
From: Christie Entwistle
Subject: help with advanced scheduling problem
Thanks everyone.
I had a chance to talk with Paul Rubin yesterday and he explained to me the difference between CPLEX and CPOptimizer :). So yes, I am using CPOptimizer for a scheduling problem written directly in OPL using ILOG CPLEX Optimization Studio.
I have looked at the scheduling tutorial and imported many examples. I am now familiar with using interval variables, sequences of intervals, noOverlap, alternative functions, and a few other things. My current solution is pretty closely modeled after the built-in example sched_tasks.mod and dat. Substitute out the "resources" for "gym equipment" and operations for exercises, and you have the foundation of my current model.
Here is something I am currently struggling with:
I want to create an interval variable for the consumption of plates (to put on barbells). Lets say my small gym has 5 sets of 10 lb plates, and 2 sets of 25. Unlike the mandatory resources (equipment) that I already have coded, plates can be used in any combination to add up to a certain weight as long as the bar is balanced. The weight cannot go over a certain amount depending on the client's ability. The objective function should try to push the weight as high as it can go without going over for that person (e.g. "Bill" has a 1RM of 100). I also have to consider the weight of a 45 lb barbell. Currently I have an objective expression which I'm maximizing called "totalvolume" which multiples the reps times the weight of the resource being used and sums over the client's total workout interval. How can I deal with a resource that can be used in multiple combinations like this? I hope the answer is not that I would have to spell out each possible combination/allocation of plates...
Thanks,
Christie
Original Message:
Sent: 5/27/2020 4:48:00 AM
From: David Gravot
Subject: RE: help with advanced scheduling problem
Scheduling tutorial is very pedagogic and gives a quite wide view on the scheduling concepts through a set of variants around building a house
- using cumulative functions (pulse, heightAtStart...) that model cumulative resources or reservoirs (see the cash example)
- using unary resource with setup times (noOverlap on sequence)
- using calendar to model breaks (intensity / forbid)
- using state functions, for instance : you cannot start electricity if the house is in state 'dirty'
- optional intervals to model alternative
Did you have a look at all this tutorial and get a sound understanding ? These constructs are quite powerful and allow to build from simple to complex models. Though, they are typical pitfalls that people are likely to do when they are new to (and sometimes even experienced with) CP for scheduling. For instance, modeling some constraints with discretizing the time is absolutely a wrong idea (I did it some times ago :-)
Can you elaborate a little bit more on the point where you are stuck ?
David Gravot
DecisionBrain
david(dot)gravot(at)decisionbrain(dot)com
------------------------------
David Gravot
Original Message:
Sent: Tue May 26, 2020 03:15 PM
From: Paul Rubin
Subject: help with advanced scheduling problem
I had a chat with Christie. FWIW, she's using OPL to build a scheduling model and CP Optimizer to solve it.
------------------------------
Paul Rubin
Professor Emeritus
Michigan State University
Original Message:
Sent: Mon May 25, 2020 12:51 AM
From: Daniel Junglas
Subject: help with advanced scheduling problem
You should really provide more details so that we can get an idea about what exactly is blocking you right now. Otherwise it is hard to tell who is the right person to help you.
In case you cannot upload your issues here, you can contact me at daniel(dot)junglas(at)de(dot)ibm(dot)com.
------------------------------
Daniel Junglas
Original Message:
Sent: Fri May 22, 2020 09:53 AM
From: Christie Entwistle
Subject: help with advanced scheduling problem
Hello,
I'm working on a gym equipment optimization algorithm. Part of the goal is to help gyms stay safe during COVID times (scheduled cleaning). I am new to OPL and CPLEX, and based on the examples I've seen in the CPLEX libraries, this problem seems to be intermediate to advanced level. I have gotten to a certain point and I'm now stuck. I don't necessarily want to just post all of my code on here but I would be so grateful if someone who has done some advanced job shop/ scheduling problems would reach out to me, if you are interested in helping me out!
Thanks,
Christie
------------------------------
Christie Entwistle
------------------------------
#DecisionOptimization