opt.lp 328 B

12345678910111213
  1. { hotel(1..5) } = 1.
  2. star(1,5). cost(1,170).
  3. star(2,4). cost(2,140).
  4. star(3,3). cost(3,90).
  5. star(4,3). cost(4,75). main_street(4).
  6. star(5,2). cost(5,60).
  7. noisy :- hotel(X), main_street(X).
  8. #maximize { Y@1, X : hotel(X), star(X, Y) }.
  9. #minimize { Y/Z@2, X : hotel(X), cost(X,Y), star(X, Z) }.
  10. :~ noisy. [ 1@3 ]
  11. #show hotel/1.