/* Volsay problem in Picat. From OPL model volsay.mod Slightly different from volsay1.pi Model created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ import cp. % import mip. main => go. go => Products = [Gas, Chloride], Products :: 0..100000, Gas + Chloride #=< 50, 3 * Gas + 4 * Chloride #=< 180, MaxVal #= 40 * Gas + 50 * Chloride, solve([$max(MaxVal)],Products), writeln(gas=Gas), writeln(chloride=Chloride), writeln(max_val=MaxVal), nl.