I am fairly new to glpk and linear programming. I am working on a scheduling problem, and have been facing some problems in the specification of one of its constraints.

The variables in my problem are binary, encoding the schedule for a given series of jobs. In my problem I have a total of

My problem is related to the fact that, while some jobs only require one time slot to complete; others may require multiple, consecutive time slots. Imagine that a given job - job B, for example - requires 2 time slots. I know that xB must only take the value "1" in 2 consecutive time slots, taking the value "0" in the remaining (n-2) slots. But how can I write this as a problem constraint?

I have tried to make use of the

Any suggestions/comments are very welcome.

Best regards,

Joaquim

--------------EE74701981F1F26922530AD2-- From MAILER-DAEMON Thu Jul 12 18:14:30 2018 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fdjr4-0006co-8N for mharc-help-glpk@gnu.org; Thu, 12 Jul 2018 18:14:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from

Am 12=2E07=2E18, 23:34, "Joaquim Leit=C3=A3o" <jpleit=
ao@dei=2Euc=2Ept> schrieb:

From MAILER-DAEMON Wed Jul 18 03:19:40 2018
Received: from list by lists.gnu.org with archive (Exim 4.71)
id 1ffgkO-0001co-SM
for mharc-help-glpk@gnu.org; Wed, 18 Jul 2018 03:19:40 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50732)
by lists.gnu.org with esmtp (Exim 4.71) (envelope-from =20 Hi All,

I am fairly new to glpk and linear programming=2E I am working on a scheduling problem, and have been facing some problems in the specification of one of its constraints=2E

The variables in my problem are binary, encoding the schedule for a given series of jobs=2E In my problem I have a total ofntime slots that can be used to schedule certain jobs: If I was considering a total of three jobs I would have three sets of variables - xA, xB and xC, all of dimensionn-, and for a given indexi(1 <=3D i <=3D n) if xA[i] =3D 1 then job A would be scheduled for time sloti=2E

My problem is related to the fact that, while some jobs only require one time slot to complete; others may require multiple, consecutive time slots=2E Imagine that a given job - job B, for example - requires 2 time slots=2E I know that xB must only take the value "1" = in 2 consecutive time slots, taking the value "0" in the remainin= g (n-2) slots=2E But how can I write this as a problem constraint?

I have tried to make use of theexistskeyword but as far as I can understand I cannot use it in constraints in linear problems=2E=2E=2E An obvious constraint that comes to mind is to make = the sum of xB for allibe equal to 2 (sum{i in 1=2E=2En} xB[i]&nbs= p; =3D 2), but this only restricts the total number of assigned slots and does not make them consecutive=2E

Any suggestions/comments are very welcome=2E

Best regards,

Joaquim

=20 _______________________________________________ Help-glpk mailing list Help-glpk@gnu=2Eorg https://lists=2Egnu=2Eorg/mailman/listinfo/help-glpk