Mathematical Modeling with LPL : Explain and run a Model
Problem Statement
Modeling Description
||
Back to MatMod
model cats "Cats among Pigeons"; set c,p := [Downs Heath Field Forest Marsh] "c stands for cats; p stands for pigeons"; binary variable x{c,p|c<>p}; constraint A{c}: sum{p} x = 1; B{p}: sum{c} x = 1; C: x['Heath','Downs']; D{p}: x['Downs',p] = x[p,'Marsh']; E{p}: x['Field',p] = x[p,'Forest']; for{c} do minimize obj: x['Forest',c]; if(x['Forest',c]) then Write('%s was the owner of the pigeon killed by Mrs. Forests cat.', c); end end end
Problem Statement
Modeling Description
Back to model
The solution is as follows:
The LOG-File output of LPL is as follows: