Hello,
I have a data set like given below
I need to write constraints based on the products. For e.g., only one of the product A is selected. I have a binary variable which is 1 if the product i is selected and zero otherwise. I have the following so far.
reset;
load amplxl.dll;
model EP.mod;
table Data IN "amplxl" "DataEdited.xlsx":
SKU <- [SKU], Product, Price;
read table Data;
I tried this and got syntax error.
set SKU;
s.t. mid: sum{ i in SKU : Product[SKU]= "A"} y[i] = 1;
I am trying to write the constraint y_1+y_3+y_6 = 1.
Any help is really appreciated. Thanks