LP Input | Minizinc Input | Output |
n_pizzas(4). pizza(1,10). pizza(2,5). pizza(3,20). pizza(4,15). n_vouchers(2). voucher(1,1,1). voucher(2,2,1). | n = 4; price = [10,5,20,15]; m = 2; buy = [1,2]; free = [1,1]; | cost(35). |
n_pizzas(4). pizza(1,10). pizza(2,15). pizza(3,20). pizza(4,15). n_vouchers(7). voucher(1,1,1). voucher(2,2,1). voucher(3,2,2). voucher(4,8,9). voucher(5,3,1). voucher(6,1,0). voucher(7,4,1). | n = 4; price = [10,15,20,15]; m = 7; buy = [1,2,2,8,3,1,4]; free = [1,1,2,9,1,0,1]; | cost(35). |
n_pizzas(10). pizza(1,70). pizza(2,10). pizza(3,60). pizza(4,60). pizza(5,30). pizza(6,100). pizza(7,60). pizza(8,40). pizza(9,60). pizza(10,20). n_vouchers(4). voucher(1,1,1). voucher(2,2,1). voucher(3,1,1). voucher(4,1,0). | n = 10; price = [70,10,60,60,30,100,60,40,60,20]; m = 4; buy = [1,2,1,1]; free = [1,1,1,0]; | cost(340). |