This problem is related to math09.
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
[1] MatMod. Homepage for Learning Mathematical Modeling : https://matmod.ch.
[2] Hürlimann T. Reference Manual for the LPL Modeling Language, most recent version. https://matmod.ch/lpl/doc/manual.pdf.