|
CONOPT
|
Functions | |
| tutorialk.TutModelData.buildModel (self) | |
| adding the variables and constraints to the model | |
| tutorialk.TutModelData.evaluateNonlinearTerm (self, x, rowno, ignerr, thread) | |
| callback method for evaluating the nonlinear terms in a given row | |
| tutorialk.TutModelData.evaluateNonlinearJacobian (self, x, rowno, jacnum, ignerr, thread) | |
| callback method for evaluating the jacobian for the nonlinear terms in a given row | |
This model is a revision of Tutorial in which we have made the capital stock, K, a variable in the model fixed at the value 4.
The variable is inserted as variable 2 and the remaining variables are renumbered.
For more information about the individual callbacks, please have a look at the source code.
| tutorialk.TutModelData.buildModel | ( | self | ) |
adding the variables and constraints to the model
Definition at line 25 of file tutorialk.py.
| tutorialk.TutModelData.evaluateNonlinearTerm | ( | self, | |
| x, | |||
| rowno, | |||
| ignerr, | |||
| thread ) |
callback method for evaluating the nonlinear terms in a given row
| x | the solution vector that needs to be evaluated. |
| rowno | the number for the row in which the nonlinear term exists. |
| ignerr | a boolean to indicate whether the current point is safe or unsafe. |
| thread | the index of the thread from which this method is being called from. |
Notes: an error in the evaluation is reported by calling errorInEvaluation()
Definition at line 62 of file tutorialk.py.
| tutorialk.TutModelData.evaluateNonlinearJacobian | ( | self, | |
| x, | |||
| rowno, | |||
| jacnum, | |||
| ignerr, | |||
| thread ) |
callback method for evaluating the jacobian for the nonlinear terms in a given row
| x | the solution vector that needs to be evaluated. |
| rowno | the number for the row in which the nonlinear term exists. |
| jacnum | vector with a list of column numbers for the nonlinear nonzero Jacobian elements in the row. |
| ignerr | a boolean to indicate whether the current point is safe or unsafe. |
| thread | the index of the thread from which this method is being called from. |
Notes: an error in the evaluation is reported by calling errorInEvaluation()
NOTE: The jacobian is returned as a list of length jacnum. In this example, the returned list is constructed using append. It is also possible to initially create a list of length jacnum containing only 0s, then update the values by the variable indices.
Definition at line 88 of file tutorialk.py.