Error Messages/41337
Example error text
The 'Optlowerbound' attribute of Decision 'Price' contains 2 values, but the decision index, Product1, has a length of 3.
Cause
When this error displays, the indicated attribute of a decision variable to an optimization problem is defined as an unindexed list, the decision variable is declared as 1-D, and the single dimension for this decision variable has a different number of elements as the attribute's unindexed list.
For example, suppose we have:
Index Product1 := ['Prod A', 'Prod B', 'Prod C'] Decision Price OptDimensions of Price: [Product1] OptLowerBound of Price: [0, -INF]
In this example, Price is declared as a 1-D decision (the one dimension being the index Product1), and there are three elements in that index. Hence, Price consists of three scalar decision variables (price of 'Prod A', etc). Only two lower bounds are provided. How should those be interpreted when there are three products? Hence, the ambiguity.
Remedy
First, if your lower bound does not vary with the decision index -- for example, if you have [1, 1, 1], then don't use a list at all. Specify the bound as 1. No indexing. This is cleanest. Use a table or list only if the attribute in question varies along the decision index.
A preferred way of structuring this would be to create a totally separate variable to hold the lower bound. The table could be defined as an edit table with the decision index, e.g.:
Constant Minimum_price := Table(Product1)(0, -INF, -INF)
This makes the index explicit, which makes it more flexible, allows Table Splicing to adjust the table when changes occur, etc. To facilitate table splicing, it is also convenient to set the TableCellDefault value, by issuing the following command in the typescript window:
TableCellDefault Minimum_price : -INF
This way, when the decision index is adjusted, any newly introduced decisions will automatically be unbounded. With this variable now present, you can set the OptLowerBound attribute to be simply the identifier of this variable:
Decision Price OptLowerBound: Minimum_price
Many other options exist. You can simply adjust the list in the attribute to the correct number of elements, or you can replace it with an expression such as:
Decision Price OptLowerBound: If Product1 = 'Prod A' Then 0 Else -INF
Enable comment auto-refresher