linprog function over multi period
1 次查看(过去 30 天)
显示 更早的评论
For the following question.
A Company expects an increase of demand and needs to scale-up.
Using MATLAB linprog to propose a recruitment plan to meet demand and minimise cost for the next 6 years.
Expected hours of work to meet demand
Year 1 4000
Year 2 4500
Year 3 3500
Year 4 5000
Year 5 4500
Year 6 5500
When a new worker is recruited, they need to be trained by an experienced worker for one year.
After training they become experienced worker.
Each Experienced worker can do 75 hours per year.
This is reduced to 25 hours for a experienced worker who is training a new worker.
At the beginning of Year 1 there are 60 experienced workers.
5% of experienced workers choose to leave the company every year but cannot be fired.
The labour cost of an experienced worker is $ 3500 per year and It is $ 2000 for newly recruited worker during their first year.
close all
clear all
f=[3500;2000];
A=[150,-100; 150,-100;150,-100;150,-100;150,-100;150,-100];
b=[4000;4500;3500;5000;4500;5500];
[x,fval,exitflag,output,lambda] = ...
linprog(f,A,b,[],[],[],[],options);
I have made a start but I was hoping someone could point me towards some documentation to guide me on solving this. I don't see how this fits with the linprog function as the Experienced workers after attrition are dependent on the decision variable of recuited workers. I didn't find any examples in the matlab help files under linprog. Do I need to consider a recursive loop and how would that work in linprog.
0 个评论
采纳的回答
Torsten
2022-8-24
移动:Matt J
2022-8-24
Hint:
Define x_1,i to be the number of experienced workers in year i and x2_i the number of new workers in year i.
Set up the equations for each year and then solve the complete system in one call to linprog.
2 个评论
Torsten
2022-8-24
I think the easiest way is to look into your lecture notes.
Your problem is the translation of the written text into an optimization problem. The MATLAB implementation is the step that follows.
Maybe this could give you a start:
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!