Difference between revisions of "OptInfo"

Line 1: Line 1:
[[Category:Optimization Functions]]
+
<br> ''New to [[Analytica 4.3]]. Supercedes the earlier [[SolverInfo]] function.''
  
''New to [[Analytica 4.3]].  Supercedes the earlier [[SolverInfo]] function.''
+
= OptInfo(prog, item'', decision, constraint, asRef'')  =
  
= OptInfo(prog,item'',decision,constraint,asRef'') =
+
Provides access to an&nbsp;«item» in the&nbsp;definition of an optimization problem definition («prog») created by&nbsp;[[DefineOptimization]].
  
Provides access to the internals of an optimization problem definition («prog») created from a previous call to [[DefineOptimization]].
+
Possible values for the «item» are:
  
 
Possible values for the «item» are:
 
 
{| border="1"
 
{| border="1"
! "Item" !! Valid For !! Dimensionality || Type || Description
 
 
|-
 
|-
| "objcoef" || LP, QP || Vars || numeric
+
! "Item"
 +
! Used for
 +
! Indexed by
 +
! Type
 +
! Description
 +
|-
 +
| "objcoef"  
 +
| LP, QP  
 +
| Vars  
 +
| numeric
 
|-
 
|-
|"Q" || QP || Vars, Vars2 || numeric
+
| "Q"  
 +
| QP  
 +
| Vars, Vars2  
 +
| numeric
 
|-
 
|-
| "lhs" || LP, QP || Vars, Constraints || numeric
+
| "lhs"  
 +
| LP, QP  
 +
| Vars, Constraints  
 +
| numeric
 
|-
 
|-
| "lhsQ", || QP || Vars, Vars2, Constraints || numeric
+
| "lhsQ",  
 +
| QP  
 +
| Vars, Vars2, Constraints  
 +
| numeric
 
|-
 
|-
| "rhs" || LP,QP,NLP || Constraints || numeric
+
| "rhs"  
 +
| LP,QP,NLP  
 +
| Constraints  
 +
| numeric
 
|-
 
|-
| "constraintUb" || LP,QP,NLP || Constraints || numeric || Upper bound for each constraint
+
| "constraintUb"  
 +
| LP,QP,NLP  
 +
| Constraints  
 +
| numeric  
 +
| Upper bound for each constraint
 
|-
 
|-
| "constraintLb" || LP,QP,NLP || Constraints || numeric || Lower 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 &amp; ub)
+
| "sense"  
 +
| LP,QP,NLP  
 +
| Constraints  
 +
| '&gt;=','&lt;=', '=', 'R'  
 +
| inequality for each constraint. 'R' for range (lb &amp; ub)
 
|-
 
|-
| "lb" || LP,QP,NLP || Vars || numeric || lower bound for each variable
+
| "lb"  
 +
| LP,QP,NLP  
 +
| Vars  
 +
| numeric  
 +
| lower bound for each variable
 
|-
 
|-
| "ub" || LP,QP,NLP || Vars || numeric || upper bound for each variable
+
| "ub"  
 +
| LP,QP,NLP  
 +
| Vars  
 +
| numeric  
 +
| upper bound for each variable
 
|-
 
|-
| "ctype" || LP,QP,NLP || Vars || 'C', 'I', or 'B'
+
| "ctype"  
 +
| LP,QP,NLP  
 +
| Vars  
 +
| 'C', 'I', or 'B'
 
|-
 
|-
| "group" || LP,QP,NLP || Vars || numeric
+
| "group"  
 +
| LP,QP,NLP  
 +
| Vars  
 +
| numeric
 
|-
 
|-
| "maximize" || LP,QP,NLP || atomic || True, False
+
| "maximize"  
 +
| LP,QP,NLP  
 +
| atomic  
 +
| True, False
 
|-
 
|-
| "engine" || LP,QP,NLP || atomic || text
+
| "engine"  
 +
| LP,QP,NLP  
 +
| atomic  
 +
| text
 
|-
 
|-
| "setting" || LP,QP,NLP || local .Parameter || numeric
+
| "setting"  
 +
| LP,QP,NLP  
 +
| local .Parameter  
 +
| numeric
 
|-
 
|-
| "type" || LP,QP,NLP || atomic || "LP","QP", "QCP" or "NLP"
+
| "type"  
 +
| LP,QP,NLP  
 +
| atomic  
 +
| "LP","QP", "QCP" or "NLP"
 
|-
 
|-
| "vars" || LP,QP,NLP || Vars || elements of the Vars index
+
| "vars"  
 +
| LP,QP,NLP  
 +
| Vars  
 +
| elements of the Vars index
 
|-
 
|-
| "constraints" || LP,QP,NLP || Constraints || the constraint names
+
| "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.
  
«decision» is the identifier of a decision variable passed into the «decisions» parameter of [[DefineOptimization]]. When this is provided, only the portion of the requested item relevant to that decision is retrieved, and 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.  
  
«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 =
  
= See Also =
+
*[[OptEngineInfo]]
 +
*[[DefineOptimization]]
 +
*[[OptRead]]
  
* [[OptEngineInfo]]
+
[[Category:Optimization_Functions]]
* [[DefineOptimization]]
 
* [[OptRead]]
 

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.

See Also

Comments


You are not allowed to post comments.