Difference between revisions of "OptInfo"
Line 1: | Line 1: | ||
− | [[ | + | <br> ''New to [[Analytica 4.3]]. Supercedes the earlier [[SolverInfo]] function.'' |
− | '' | + | = OptInfo(prog, item'', decision, constraint, asRef'') = |
− | + | Provides access to an «item» in the definition of an optimization problem definition («prog») created by [[DefineOptimization]]. | |
− | + | Possible values for the «item» are: | |
− | |||
− | |||
{| border="1" | {| border="1" | ||
− | |||
|- | |- | ||
− | | "objcoef" | + | ! "Item" |
+ | ! Used for | ||
+ | ! Indexed by | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | "objcoef" | ||
+ | | LP, QP | ||
+ | | Vars | ||
+ | | numeric | ||
|- | |- | ||
− | |"Q" | + | | "Q" |
+ | | QP | ||
+ | | Vars, Vars2 | ||
+ | | numeric | ||
|- | |- | ||
− | | "lhs" | + | | "lhs" |
+ | | LP, QP | ||
+ | | Vars, Constraints | ||
+ | | numeric | ||
|- | |- | ||
− | | "lhsQ", | + | | "lhsQ", |
+ | | QP | ||
+ | | Vars, Vars2, Constraints | ||
+ | | numeric | ||
|- | |- | ||
− | | "rhs" | + | | "rhs" |
+ | | LP,QP,NLP | ||
+ | | Constraints | ||
+ | | numeric | ||
|- | |- | ||
− | | "constraintUb" | + | | "constraintUb" |
+ | | LP,QP,NLP | ||
+ | | Constraints | ||
+ | | numeric | ||
+ | | Upper bound for each constraint | ||
|- | |- | ||
− | | "constraintLb" | + | | "constraintLb" |
+ | | LP,QP,NLP | ||
+ | | Constraints | ||
+ | | numeric | ||
+ | | Lower bound for each constraint | ||
|- | |- | ||
− | | "sense" | + | | "sense" |
+ | | LP,QP,NLP | ||
+ | | Constraints | ||
+ | | '>=','<=', '=', 'R' | ||
+ | | inequality for each constraint. 'R' for range (lb & ub) | ||
|- | |- | ||
− | | "lb" | + | | "lb" |
+ | | LP,QP,NLP | ||
+ | | Vars | ||
+ | | numeric | ||
+ | | lower bound for each variable | ||
|- | |- | ||
− | | "ub" | + | | "ub" |
+ | | LP,QP,NLP | ||
+ | | Vars | ||
+ | | numeric | ||
+ | | upper bound for each variable | ||
|- | |- | ||
− | | "ctype" | + | | "ctype" |
+ | | LP,QP,NLP | ||
+ | | Vars | ||
+ | | 'C', 'I', or 'B' | ||
|- | |- | ||
− | | "group" | + | | "group" |
+ | | LP,QP,NLP | ||
+ | | Vars | ||
+ | | numeric | ||
|- | |- | ||
− | | "maximize" | + | | "maximize" |
+ | | LP,QP,NLP | ||
+ | | atomic | ||
+ | | True, False | ||
|- | |- | ||
− | | "engine" | + | | "engine" |
+ | | LP,QP,NLP | ||
+ | | atomic | ||
+ | | text | ||
|- | |- | ||
− | | "setting" | + | | "setting" |
+ | | LP,QP,NLP | ||
+ | | local .Parameter | ||
+ | | numeric | ||
|- | |- | ||
− | | "type" | + | | "type" |
+ | | LP,QP,NLP | ||
+ | | atomic | ||
+ | | "LP","QP", "QCP" or "NLP" | ||
|- | |- | ||
− | | "vars" | + | | "vars" |
+ | | LP,QP,NLP | ||
+ | | Vars | ||
+ | | elements of the Vars index | ||
|- | |- | ||
− | | "constraints" | + | | "constraints" |
+ | | LP,QP,NLP | ||
+ | | Constraints | ||
+ | | the constraint names | ||
|} | |} | ||
+ | <br>If you include as a «decision» the identifier of a decision variable passed into the «decisions» parameter of [[DefineOptimization]], it gives results just for that decision. The result is dimensioned by the decision variable's indexes rather than by the '''.Vars''' index. The «decision» parameter is relevant to any of the «item»s in the above table that show '''.Vars''' in the dimensionality column. | ||
− | + | «constraint» is the identifier of a constraint node passed into the «constraints» parameter of [[DefineOptimization]]. When this is provided, only the portion of the requested item relevant to that constraint is returned, and the result is dimensioned by the constraint's [[OptDimensions]] rather than by the '''.Constraints''' index. The «constraint» parameter is relevant to any of the «item»s in the above table that show '''.Constraints''' in the dimensionality column. | |
− | + | = See Also = | |
− | + | *[[OptEngineInfo]] | |
+ | *[[DefineOptimization]] | ||
+ | *[[OptRead]] | ||
− | + | [[Category:Optimization_Functions]] | |
− | |||
− |
Revision as of 19:12, 24 October 2010
New to Analytica 4.3. Supercedes the earlier SolverInfo function.
OptInfo(prog, item, decision, constraint, asRef)
Provides access to an «item» in the definition of an optimization problem definition («prog») created by DefineOptimization.
Possible values for the «item» are:
"Item" | Used for | Indexed by | Type | Description |
---|---|---|---|---|
"objcoef" | LP, QP | Vars | numeric | |
"Q" | QP | Vars, Vars2 | numeric | |
"lhs" | LP, QP | Vars, Constraints | numeric | |
"lhsQ", | QP | Vars, Vars2, Constraints | numeric | |
"rhs" | LP,QP,NLP | Constraints | numeric | |
"constraintUb" | LP,QP,NLP | Constraints | numeric | Upper bound for each constraint |
"constraintLb" | LP,QP,NLP | Constraints | numeric | Lower bound for each constraint |
"sense" | LP,QP,NLP | Constraints | '>=','<=', '=', 'R' | inequality for each constraint. 'R' for range (lb & ub) |
"lb" | LP,QP,NLP | Vars | numeric | lower bound for each variable |
"ub" | LP,QP,NLP | Vars | numeric | upper bound for each variable |
"ctype" | LP,QP,NLP | Vars | 'C', 'I', or 'B' | |
"group" | LP,QP,NLP | Vars | numeric | |
"maximize" | LP,QP,NLP | atomic | True, False | |
"engine" | LP,QP,NLP | atomic | text | |
"setting" | LP,QP,NLP | local .Parameter | numeric | |
"type" | LP,QP,NLP | atomic | "LP","QP", "QCP" or "NLP" | |
"vars" | LP,QP,NLP | Vars | elements of the Vars index | |
"constraints" | LP,QP,NLP | Constraints | the constraint names |
If you include as a «decision» the identifier of a decision variable passed into the «decisions» parameter of DefineOptimization, it gives results just for that decision. The result is dimensioned by the decision variable's indexes rather than by the .Vars index. The «decision» parameter is relevant to any of the «item»s in the above table that show .Vars in the dimensionality column.
«constraint» is the identifier of a constraint node passed into the «constraints» parameter of DefineOptimization. When this is provided, only the portion of the requested item relevant to that constraint is returned, and the result is dimensioned by the constraint's OptDimensions rather than by the .Constraints index. The «constraint» parameter is relevant to any of the «item»s in the above table that show .Constraints in the dimensionality column.
Enable comment auto-refresher