From 3a623816c81384f4fbd38adeb9c4f34c638c3dc3 Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Thu, 8 Jul 2021 14:36:54 +1000 Subject: [PATCH] Add the AMPL model from the introduction --- assets/misc/intro_open_shop.mod | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 assets/misc/intro_open_shop.mod diff --git a/assets/misc/intro_open_shop.mod b/assets/misc/intro_open_shop.mod new file mode 100644 index 0000000..dc3c570 --- /dev/null +++ b/assets/misc/intro_open_shop.mod @@ -0,0 +1,16 @@ +param Machines integer > 0;@\Vlabel{line:intro:param:start}@ +param Jobs integer > 0; +param Duration {1..Machines, 1..Jobs};@\Vlabel{line:intro:param:end}@ + +var start {1..Machines, 1..Jobs} integer >= 0;@\Vlabel{line:intro:var:start}@ +var end_time integer >= 0;@\Vlabel{line:intro:var:end}@ + +minimize goal: end_time;@\Vlabel{line:intro:goal}@ +subject to job_exclusive {m in 1..Machines, j1 in 1..Jobs, j2 in j1+1..Jobs}:@\Vlabel{line:intro:con:start}@ + start[m,j1] + Duration[m,j1] <= start[m,j2] + or start[m,j2] + Duration[m,j2] <= start[m,j1]; +subject to machine_exclusive {j in 1..Jobs, m1 in 1..Machines, m2 in m1+1..Machines}: + start[m1,j] + Duration[m1,j] <= start[m2,j] + or start[m2,j] + Duration[m2,j] <= start[m1,j]; +subject to push_end_time {m in 1..Machines, j in 1..Jobs}: + start[m,j] + Duration[m,j] <= end_time;@\Vlabel{line:intro:con:end}@