|
model 'remainder'
! Description : Remainder puzzle
! Source : Boris Kordemsky - The Moscow Puzzles (P136)
! Date written : MAGIC 19/11/92, Xpress-MP 22/6/98, Mosel 17/4/03
! Written by : M J Chlond
uses 'mmxprs'
declarations
x: array(1..4) of mpvar
n: mpvar
end-declarations
minnum:= n
cona:= -3*x(1) + n = 1
conb:= -4*x(2) + n = 2
conc:= -5*x(3) + n = 3
cond:= -6*x(4) + n = 4
forall(i in 1..4)
x(i) is_integer
n is_integer
minimise(minnum)
write(getsol(n))
end-model
|