Code: Select all
Sets
fruit / apple, orange /
veggie / carrot, tomato /
;
Parameters
FruitCost /
apple .99
orange .89
/
VeggieCost /
tomato .63
carrot .83
/;
Set food / #fruit #veggie /;
Parameter FoodCost(food);
FoodCost(fruit) = FruitCost(fruit);
FoodCost(veggie) = FruitCost(veggie);
display FoodCost;
Code: Select all
68 FoodCost(fruit) = FruitCost(fruit);
**** $171
69 FoodCost(veggie) = FruitCost(veggie);
**** $171
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Error Messages
171 Domain violation for set
**** 2 ERROR(S) 0 WARNING(S)