When using a SubModel for optimization, it would be nice to be able to store the optimization lower and upper bounds and initial value in a vector Data element rather than three different scalar elements. This is especially the case if you have a lot of optimization parameters. If, for example, you have four optimization parameters, it would make sense to have 4 3-item vector data elements rather than 12 separate scalar data elements. However, as shown below, you have to use scalar data elements.
I have an optimization SubModel and I am passing the bounds for an optimization parameter, C1, through the SubModel interface. I pass the bounds and initial value both as a 3-item vector called C1_bounds and also as individual scalar data elements C1_Lower, C1_Initial and C1_Upper.
In the optimization settings for C1, I can reference the scalar values as shown below. It allows me to close the dialog and I can run an optimization.
On the other hand, when I instead reference subitems of the vector C1_bounds (as shown below), I cannot run the optimization. In fact, I can't even close out of this dialog without an error message.
It appears (as seen above) that everything is valid. But as soon as you try to close out of the optimization variable setup, it gives the message below.
It would be nice to be able to consolidate lower, initial and upper bound values for a given optimization parameter into a vector data element rather than having to use three separate scalar data elements.
Ryan
Comments
1 comment