/* Simple integer programming problem (Chess set) in Picat. From Applications of Optimization with XPress-MP.pdf page 11. The problem is presented on page 7. This Picat model was created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ import cp. main => go. go ?=> SmallSet :: 0..100, LargeSet :: 0..100, 1*SmallSet + 3*LargeSet #<= 200, 3*SmallSet + 2*LargeSet #<= 160, Z #= 5*SmallSet + 20*LargeSet, solve($[max(Z)],[SmallSet,LargeSet]), println([SmallSet,LargeSet]), nl. go => true.