Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.
Trying to get this tool down, so did it the manual input and dense matrix, variables in rows input. Also put it in a batch macro and presented the output differently in a way. Hope this helps someone! I also really appreciate this training on Prescriptive Optimization from Inspire 2022!
O anchor - Variable column represents each unique box. The coefficient field displays each box's unique $ value. The bounds are set between 0 and 1 since a maximum of 1 box and be used. The type represents integer because each box has to represent a whole unit.
A anchor - Each constraint is set up as rows where the variables are represented in columns. The first record represents the kg associated to each box. The preceding records correspond to each box, the 0s and 1s help map record to column.
B anchor - The direction is set up within this anchor. Each record represents the corresponding record from the A anchor. The direction field for each record should be less than or equal to a value. The value is represented in right hand side rhs column. This column displays the max kg to remain under and how many boxes can be used.
A batch macro was used to achieve the desired output here. The control parameter represents the number of boxes from 1 to 4. This value can be dynamic as the user can update the text field. For the macro to be successful, the A and B anchor were updated. The A anchor is configured with variables as rows. The records correspond to the boxes where each column represents kg and qty, respectively. The B anchor is revised to only include kg and qty as rows. The value for rhs dud not change for kg yet qty represents the value from the control parameter. As the macro runs through each batch, the value is changed from 1 to 4.