# Linear Programming aggregate planning

I'm having trouble with the formulation of a linear program constraint, for an aggregate planning problem for 30 months.

Company XYZ wants to maximize profit, and wants to know how many workers the company must have each month, how many workers should the company hire and how many should be laid-off?

The constraint is as follows "Each hired worker must receive a training course, that will last 3 months, and can't be laid-off before the training ends".

Decision Variables are:

a(t)= Number of workers in each day .

b(t) = Number of manufactured units in each day .

c(t)= Number of hired workers in each day.

d(t)= Number of laid-off workers in each day.

The balance constraint is : a(t)=a(t-1)+c(t)-d(t)

I think the constraint would be:

d(t)=0, t=1,2,3,

d(t)<=c(t-3), t=4,5,6....30

But I'm not sure.

It depends upon your objective function. As I mentioned in math.exchange site one constraint to add is the flow balance as
$$a_{t} = a_{t-1}+c_t - d_t$$
where may be $$a_1 =0$$ if month index starts from $$1$$

You may expand your last constraint as such
$$d_1,d_2,d_3=0$$: or no need to create them
$$d_{t+3} \le \sum_{k=1}^{t} c_t$$

Here you are dealing with total numbers and continuous/integer variables. Depending upon your objective if you want to identify workers who are to be fired/retained then you need to define an indicator variable per worker indexed over time, like $$x_{w,t}$$ where $$w$$ can be an index for set of workers to hire from, like a pool, $$\{1,2,...W\}$$ where $$W$$ could be some higher bound like capacity.
You may need another indicator variable to define if a worker is hired from the pool in the first place.
If minimization then, depending upon the objective formula the solver will turn a subset of $$W$$ as workers to be hired/retained.

Hint: The people you lay off must have been hired at least three months (not days) earlier and must not have been laid off previously.

• Sorry about that, the number of workers is per month. Apr 15 at 0:17