Constraint modeling in excel question
-
30 июля 2012 г. 9:41
Because the standard Excel solver does not support all the functionalities I need, I started using the Microsoft solver foundation solution. I nevertheless have some trouble with the oml modelling in Excel... Is there somewhere a decent guide about the syntax? I'm not a programmer, but a business analyst.
Here is the rather simple problem I try to solve in a first step:
I have some fixed daily production for different products. I also have starting stock and max buffer sizes. I then optimize Customer demand (added value) with different product priorities.
Everything works, except my restrictions are not taken into account as I was expecting...
With the next restriction, I try to keep the summed delivered quantities of alternative products lower or equal to the ordered quantity for each customer. For one or the other reason, the restriction is summed over all customers. So I guess I use the wrong syntax.
Foreach [{i,Customers}, Sum[{j,Products}, DeliveredQuantity[i,j]] <= OrderQuantity[i]]
Any ideas?
Все ответы
-
30 июля 2012 г. 10:14
I see that when I solve the model, the decision binding indexes for customer and product (my sets) are automatically adapted to other values, while these should stay as they where.
How can I define the range of the indexes? I thought they were automatically set following the range of the according set.
-
31 августа 2012 г. 16:52
Your syntax looks seems to be fine. If it is summing over Customers instead of Products, is it possible that the indices in DeliveredQuantity are reversed?
Should it be DeliveredQuantity[j,i] ?
Good luck,
Shane Torsell
Tele-Tracking Technologies

