Difference between revisions of "Optimizer Functions"
Jhernandez3 (talk | contribs) |
Jhernandez3 (talk | contribs) |
||
Line 1: | Line 1: | ||
[[Category: Analytica Optimizer Guide]] | [[Category: Analytica Optimizer Guide]] | ||
− | <breadcrumbs> Analytica Optimizer Guide > {{PAGENAME}}</breadcrumbs | + | <breadcrumbs> Analytica Optimizer Guide > {{PAGENAME}}</breadcrumbs> |
− | For a complete listing and definition of Analytica optimization functions in versions 4.3 and | + | This chapter discusses optimization functions in Analytica versions 4.3 and above. |
+ | |||
+ | == Using Named Parameters == | ||
+ | |||
+ | When calling a function in Analytica, you can use the conventional method of listing parameters in their standard sequence, or named-parameter syntax, where you type the parameter name, followed by a colon (:), followed by the parameter value. Here is an example: | ||
+ | |||
+ | <nowiki> DefineOptimization( | ||
+ | Decisions: [d1, d2], | ||
+ | Constraints: [c1, c2, c3], | ||
+ | Maximize: x)</nowiki> | ||
+ | |||
+ | Since DefineOptimization() has a large number of optional parameters, named-parameters are much more convenient to write and read. So, we use that method in our examples. | ||
+ | |||
+ | You can view the full parameter declarations from Analytica, in the actual parameter order, by selecting Definition > Optimizer > <function> from the Analytica menu. | ||
+ | |||
+ | == Primary Optimization Functions == | ||
+ | Using just these three functions, you will be able to define any optimization and view results. | ||
+ | * DefineOptimization() | ||
+ | * OptSolution() | ||
+ | * OptObjective() | ||
+ | |||
+ | == Optimization Status Functions == | ||
+ | Optimization status functions can reveal important details such as the selected engine matrix coefficients, and other information that may be helpful with troubleshooting. These functions are: | ||
+ | * OptStatusNum(Opt) / OptStatusText(Opt) | ||
+ | * OptInfo(Opt, "Item", Decision, Constraint, asRef) | ||
+ | * OptEngineInfo("Engine", "Item", asRef) | ||
+ | * OptShadow(Opt, Constraint, PassNonFeasible) | ||
+ | * OptReducedCost(Opt, Decision, PassNonFeasible) | ||
+ | * OptObjectiveSa(Opt, Decision) | ||
+ | * OptRhsSa(Opt, Constraint) | ||
+ | * OptSlack(Opt, Constraint, PassNonFeasible) | ||
+ | * OptFindIIS(Opt, newLp) | ||
+ | * OptWriteIIS(Opt, filename, format) | ||
+ | * OptRead(Opt, DecisionVector, ConstraintVector, format) | ||
+ | * OptWrite(Opt, filename, format)<br /> | ||
+ | |||
+ | |||
+ | For a complete listing and definition of Analytica optimization functions in versions 4.3 and above, please see [http://wiki.analytica.com/index.php?title=Category%3AOptimization_Functions Analytica Optimization Functions]. | ||
<footer> Key Concepts: The Airline NLP Example / {{PAGENAME}} / Optimizer Function Reference</footer> | <footer> Key Concepts: The Airline NLP Example / {{PAGENAME}} / Optimizer Function Reference</footer> |
Revision as of 14:34, 23 November 2015
This chapter discusses optimization functions in Analytica versions 4.3 and above.
Using Named Parameters
When calling a function in Analytica, you can use the conventional method of listing parameters in their standard sequence, or named-parameter syntax, where you type the parameter name, followed by a colon (:), followed by the parameter value. Here is an example:
DefineOptimization( Decisions: [d1, d2], Constraints: [c1, c2, c3], Maximize: x)
Since DefineOptimization() has a large number of optional parameters, named-parameters are much more convenient to write and read. So, we use that method in our examples.
You can view the full parameter declarations from Analytica, in the actual parameter order, by selecting Definition > Optimizer > <function> from the Analytica menu.
Primary Optimization Functions
Using just these three functions, you will be able to define any optimization and view results.
- DefineOptimization()
- OptSolution()
- OptObjective()
Optimization Status Functions
Optimization status functions can reveal important details such as the selected engine matrix coefficients, and other information that may be helpful with troubleshooting. These functions are:
- OptStatusNum(Opt) / OptStatusText(Opt)
- OptInfo(Opt, "Item", Decision, Constraint, asRef)
- OptEngineInfo("Engine", "Item", asRef)
- OptShadow(Opt, Constraint, PassNonFeasible)
- OptReducedCost(Opt, Decision, PassNonFeasible)
- OptObjectiveSa(Opt, Decision)
- OptRhsSa(Opt, Constraint)
- OptSlack(Opt, Constraint, PassNonFeasible)
- OptFindIIS(Opt, newLp)
- OptWriteIIS(Opt, filename, format)
- OptRead(Opt, DecisionVector, ConstraintVector, format)
- OptWrite(Opt, filename, format)
For a complete listing and definition of Analytica optimization functions in versions 4.3 and above, please see Analytica Optimization Functions.
Enable comment auto-refresher