(!****************************************************** Mosel Example Problems ====================== file f3landing.mos `````````````````` Schedule plane landings (c) 2008 Fair Isaac Corporation author: S. Heipcke, Mar. 2002 *******************************************************!) model "F-3 Landing schedule" uses "mmxprs" declarations PLANES = 1..10 ! Set of airplanes START, STOP: array(PLANES) of integer ! Start, end of arrival time windows TARGET: array(PLANES) of integer ! Planned arrival times CEARLY, CLATE: array(PLANES) of integer ! Cost of earliness/lateness DIST: array(PLANES,PLANES) of integer ! Minimum interval between planes M: array(PLANES,PLANES) of integer ! Sufficiently large positive values prec: array(PLANES,PLANES) of mpvar ! 1 if plane i precedes j land: array(PLANES) of mpvar ! Arrival time early,late: array(PLANES) of mpvar ! Earliness/lateness end-declarations initializations from 'f3landing.dat' START STOP TARGET CEARLY CLATE DIST end-initializations forall(p,q in PLANES) M(p,q):= STOP(p) + DIST(p,q) - START(q) ! Objective: total penalty for deviations from planned arrival times Cost:= sum(p in PLANES) (CEARLY(p)*early(p) + CLATE(p)*late(p)) ! Keep required intervals between plan arrivals forall(p,q in PLANES | p>q) land(p) + DIST(p,q) <= land(q) + M(p,q)*prec(q,p) forall(p,q in PLANES | p= TARGET(p) - land(p) late(p) >= land(p) - TARGET(p) land(p) = TARGET(p) - early(p) + late(p) end-do forall(p in PLANES) do START(p) <= land(p); land(p) <= STOP(p) early(p) <= TARGET(p)-START(p) late(p) <= STOP(p)-TARGET(p) end-do forall(p,q in PLANES | p