linprog function over multi period

2 Ansichten (letzte 30 Tage)
Scott
Scott am 24 Aug. 2022
Kommentiert: Torsten am 24 Aug. 2022
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.

Akzeptierte Antwort

Torsten
Torsten am 24 Aug. 2022
Verschoben: Matt J am 24 Aug. 2022
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 Kommentare
Scott
Scott am 24 Aug. 2022
Verschoben: Matt J am 24 Aug. 2022
@Torsten Could you point me to an example of where that is done elsewhere, my attempts have not been sucessful?
Torsten
Torsten am 24 Aug. 2022
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:

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by