Difference between revisions of "Error Messages/41336"
(Created page with '= Example Error Text = :The ''Optlowerbound'' attribute of Decision ''Inventory_goal'' is defined as an unindexed list, which is ambiguous since Decision ''Inventory_goal'' is d…') |
|||
Line 1: | Line 1: | ||
− | + | [[Category: Error messages]] | |
− | :The | + | == Example error text == |
+ | <pre style="background:white; border:white; margin-left: 1em; font-style:italic"> | ||
+ | The 'Optlowerbound' attribute of Decision 'Inventory_goal' is defined as an unindexed list, which is ambiguous since Decision 'Inventory_goal' is declared to be 2-dimensional (i.e., its OptDimensions attribute lists 2 indexes). | ||
+ | </pre> | ||
− | = Cause = | + | == Cause == |
You have a multi-dimensional decision variable with the indicated attribute (e.g., ''Optlowerbound'') set to an unindexed list. Let's look at an example: | You have a multi-dimensional decision variable with the indicated attribute (e.g., ''Optlowerbound'') set to an unindexed list. Let's look at an example: | ||
+ | <pre style="background:white; border:white; margin-left: 1em;"> | ||
Decision Inventory_goal | Decision Inventory_goal | ||
OptDimensions: [Product1,Time] | OptDimensions: [Product1,Time] | ||
− | OptLowerBound: [150,100,50] | + | OptLowerBound: [150, 100, 50] |
+ | </pre> | ||
Note that there is a list of values listed in the [[OptLowerBound]]. But does this indicate that the lower bound varies along the Product index, or does it vary along the Time index? Well, from this it isn't possible to tell. Hence, the ''OptLowerBound'' as specified is ambiguous, and this error message results. | Note that there is a list of values listed in the [[OptLowerBound]]. But does this indicate that the lower bound varies along the Product index, or does it vary along the Time index? Well, from this it isn't possible to tell. Hence, the ''OptLowerBound'' as specified is ambiguous, and this error message results. | ||
− | = Remedy = | + | == Remedy == |
First, if your lower bound does not vary with any indexes, drop the list entirely and set it to a single value. | First, if your lower bound does not vary with any indexes, drop the list entirely and set it to a single value. | ||
− | + | Otherwise, change [[OptLowerBound]] to an expression that evaluates to an array having the correct index. For example, if you want these to be the lower bounds for different products, then you could set: | |
− | + | :<code>OptLowerBound: Array(Product1, [150, 100, 50])</code> | |
A preferable way to do this is place the expression in a separate variable, e.g.: | A preferable way to do this is place the expression in a separate variable, e.g.: | ||
− | Constant Inventory_goal_lb := | + | <pre style="background:white; border:white; margin-left: 1em;"> |
+ | Constant Inventory_goal_lb := Table(Product1)(150, 100, 50) | ||
| | ||
Decision Inventory_goal | Decision Inventory_goal | ||
− | OptDimensions: [Product1,Time] | + | OptDimensions: [Product1, Time] |
OptLowerBound: Inventory_goal_lb | OptLowerBound: Inventory_goal_lb | ||
+ | </pre> | ||
− | + | == See Also == | |
− | = See Also = | ||
− | |||
* [[DefineOptimization]] | * [[DefineOptimization]] | ||
+ | * [[Function calls and parameters]] | ||
+ | * [[Classes of variables and other objects]] | ||
+ | * [[Indexes and arrays: An introduction]] |
Revision as of 00:55, 11 March 2016
Example error text
The 'Optlowerbound' attribute of Decision 'Inventory_goal' is defined as an unindexed list, which is ambiguous since Decision 'Inventory_goal' is declared to be 2-dimensional (i.e., its OptDimensions attribute lists 2 indexes).
Cause
You have a multi-dimensional decision variable with the indicated attribute (e.g., Optlowerbound) set to an unindexed list. Let's look at an example:
Decision Inventory_goal OptDimensions: [Product1,Time] OptLowerBound: [150, 100, 50]
Note that there is a list of values listed in the OptLowerBound. But does this indicate that the lower bound varies along the Product index, or does it vary along the Time index? Well, from this it isn't possible to tell. Hence, the OptLowerBound as specified is ambiguous, and this error message results.
Remedy
First, if your lower bound does not vary with any indexes, drop the list entirely and set it to a single value.
Otherwise, change OptLowerBound to an expression that evaluates to an array having the correct index. For example, if you want these to be the lower bounds for different products, then you could set:
OptLowerBound: Array(Product1, [150, 100, 50])
A preferable way to do this is place the expression in a separate variable, e.g.:
Constant Inventory_goal_lb := Table(Product1)(150, 100, 50) Decision Inventory_goal OptDimensions: [Product1, Time] OptLowerBound: Inventory_goal_lb
Enable comment auto-refresher