Mathematical Modeling with LPL : Explain and run a Model
Problem Statement
Modeling Description
||
Back to MatMod
model math09a "Wine Cask Puzzle II"; set n,m:=[nephew1 nephew2 nephew3 nephew4 nephew5]; c:=['Empty' '1/4' '1/2' '3/4' 'Full']; parameter HOWFULL{c} := [0 0.25 0.5 0.75 1]; integer variable x{n,c} [1..5]; constraint A{n}: sum{c} x = 9; B{c}: sum{n} x = 9; C{n}: sum{c} HOWFULL*x = 4.5; F{n,m|n>m}: or{c} (x[n,c]<>x[m,c]); solve; Writep(x); end
Problem Statement
Modeling Description
Back to model
The solution is as follows:
The LOG-File output of LPL is as follows: