0

I've got a linear programming problem like this:

  • There is a set of projects.
  • each project has a duration in months, and a number of employees required
  • each project must begin on a given month (1..12)
  • there is a total of N employees
  • Not all projects are mandatory

so:

  • Set p
  • duration{p in P}
  • employees{p in P}
  • TOTAL_EMPLOYEES = N

I'd like to know in which month to start each project, and how many employees will be working on more than one project at a time (if in any given month, the sum of required employees in active projects is greater than N)

I've got a variable x(p, m) which equals 1 when a project is scheduled to start on month m.

The problem is, I don't know how to work with overlapping schedules.

It could be solved easily with for/if clauses, however, am not allowed to use them.

Gaston
  • 101

1 Answers1

0

We could introduce a new variable $y_{p,t}$ indicating if project is active. This means we want:

$$x_{p,t}=1 \Rightarrow y_{p,t+j}=1 \>\text{for} j=0,..,d_p-1$$

($d_p$ is duration of project $p$). This can be modeled as:

$$ y_{p,t+j} \ge x_{p,t} $$

Number of employees needed in $t$ is now something like: $$ \sum_p n_p y_{p,t} $$