This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi,
I just updated to 10.6 and found the optimization tool. This would be a great tool to solve some scheduling problems but I am not quite sure about the input format required....Maybe because I am not a R user?
I have created a sample with excel to solve a scheduling question as reference.
The question (from online http://services.byu.edu/t/quant/opt.html):
Imagine that a restaurant has the following forecast for demand (customer groups) for each hour of the day:
Hour | 11 | 12 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Groups | 4 | 24 | 16 | 4 | 4 | 12 | 24 | 40 | 32 | 20 |
This data might be represented by an array variable D, where Dt is the forecasted demand for period t in number of groups of customers. (For clarity, we will use t=1 for the 11:00 a.m. hour, t=2 for the noon hour, etc.)
If each server can handle 4 customer groups per hour, how many employees will we need during each hour. This question is complicated by the fact that our employees either work part-time 4 hours per day or full-time 8 hours per day. (For simplicity we will not presently consider break times, which is an interesting problem in itself.) Imagine that full-time employees are paid $6 per hour, and part time employees are paid $8 per hour, according to union rules.
Let us define a decision variable set Ft which tells how many full-time employees will start at period t. Also, let us have a decision variable set Pt that will tell the number of part-time employees starting at period t.
Our objective function will be to minimize the total cost of labor (to have enough for demand). This is as follows (since full-time employees work 8 hours at $6 per hour and part-time employees work 4 hours at $8)
minimize:
subject to
Ft ≥ 0 , Pt ≥ 0 t ={1..10}
Thanks.
Kenneth
Solved! Go to Solution.
@kennethli we just posted some samples on the Predictive District. Check those out, and if you still need guidance, I bet the author @KuoL would love to help you out when she gets back from the R conference.
Hi @kennethli , here is a quick solution to the problem. See the comments in the workflow for details.
Feel free to give us some feedbacks if you have any suggestions of how we can make the tool more intuitive to use.
Thank you!