CONOPT
Loading...
Searching...
No Matches
tutoriali.TutModelData Class Reference

Public Member Functions

 __init__ (self)
 
 buildModel (self)
 adding the variables and constraints to the model
 
 initFDEvaluation (self, x, rowlist, mode, numthread, ignerr)
 callback method for initialising the first derivative evaluation.
 
 evaluateNonlinearTerm (self, x, rowno, ignerr, thread)
 callback method for evaluating the nonlinear terms in a given row
 
 evaluateNonlinearJacobian (self, x, rowno, jacnum, ignerr, thread)
 callback method for evaluating the jacobian for the nonlinear terms in a given row
 
- Public Member Functions inherited from pyconopt.ModelData
 __init__ (self)
 init(ModelData self) -> ModelData
 
 endFDEvaluation (self, ignerr)
 Optional function, if defined, it will be called at the end of the function evaluation stage.
 
 evaluateSDLagrangian (self, x, u, hessianrow, hessiancol)
 Computes and returns the numerical values of the Lagrangian of the Hessian.
 
 evaluateSDDirLagrangian (self, x, dx, u, newpoint)
 computes the directional second derivative for the Lagrangian
 
 evaluateDirectionalSD (self, x, dx, rowno, jacnum, thread)
 computes the directional second derivative for a single constraint
 
 initDirectionalSDEval (self, x, dx, rowlist, numthread, newpoint)
 a callback for the initialisation of the second derivative evaluation.
 
 endDirectionalSDEval (self)
 called by CONOPT after a sequence of evaluateDirectionalSD() calls each time either the point or the direction changes.
 
 errorInEvaluation (self)
 reports that an error occurred in the evaluation.
 
 setProblemDimension (self, numvar, numcons, numnz, numnlnz)
 sets the problem dimension.
 
 addConstraint (self, *args)
 Overload 1: adds a constraint to the problem.
 
 addVariable (self, *args)
 Overload 1: adds a variable to the model.
 
 setObjectiveElement (self, elem, elemindex)
 sets the index for the objective variable or constraint
 
 setOptimizationSense (self, sense)
 sets the optimisation direction.
 
 setInitialStatusOption (self, inistat)
 the setting to indicate how the initial status of the variables and slack variables will be handled.
 
 numVar (self)
 returns the number of variables in the model
 
 numCons (self)
 returns the number of constraints in the model
 
 numHessianNonzeros (self)
 returns the number of non-zeros in the Hessian
 
 getVariable (self, index)
 returns a reference to the variable object
 
 getConstraint (self, index)
 returns a reference to the constraint object
 
 setSDEvaluationType (self, sdevaltype)
 informs CONOPT of the method for evaluating the second derivative
 
 setSDLagrangianStructure (self, rownum, colnum)
 sets the structure of the second derivatives of the Lagrangian
 
 __disown__ (self)
 
- Public Member Functions inherited from pyconopt.ConoptModelData
 __init__ (self)
 Constructor.
 
 readMatrix (self, lower, curr, upper, vsta, type, rhs, esta, colsta, rowno, value, nlflag, numvar, numcon, numnz)
 loads the structure of the model into CONOPT.
 
 getSDLagrangianRowNumbers (self)
 returns the row numbers in the second derivative of the lagrangian structure
 
 getSDLagrangianColumnNumbers (self)
 returns the column numbers in the second derivative of the lagrangian structure
 
 __disown__ (self)
 

Data Fields

int L = 0
 
int Inp = 0
 
int Out = 0
 
int P = 0
 
float Al = 0.16
 
float Ak = 2.0
 
float Ainp = 0.16
 
float Rho = 1.0
 
float K = 4.0
 
list hold = [0, 0, 0]
 
tuple hold1
 
 hold2 = pow(self.hold1,( -1./self.Rho ))
 
tuple hold3 = self.hold2 / self.hold1
 

Additional Inherited Members

- Properties inherited from pyconopt.ModelData
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
- Properties inherited from pyconopt.ConoptModelData
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Detailed Description

Definition at line 16 of file tutoriali.py.

Constructor & Destructor Documentation

◆ __init__()

tutoriali.TutModelData.__init__ ( self)

Definition at line 17 of file tutoriali.py.

Field Documentation

◆ L

tutoriali.TutModelData.L = 0

Definition at line 18 of file tutoriali.py.

◆ Inp

tutoriali.TutModelData.Inp = 0

Definition at line 19 of file tutoriali.py.

◆ Out

tutoriali.TutModelData.Out = 0

Definition at line 20 of file tutoriali.py.

◆ P

tutoriali.TutModelData.P = 0

Definition at line 21 of file tutoriali.py.

◆ Al

float tutoriali.TutModelData.Al = 0.16

Definition at line 22 of file tutoriali.py.

◆ Ak

float tutoriali.TutModelData.Ak = 2.0

Definition at line 23 of file tutoriali.py.

◆ Ainp

float tutoriali.TutModelData.Ainp = 0.16

Definition at line 24 of file tutoriali.py.

◆ Rho

float tutoriali.TutModelData.Rho = 1.0

Definition at line 25 of file tutoriali.py.

◆ K

float tutoriali.TutModelData.K = 4.0

Definition at line 26 of file tutoriali.py.

◆ hold

list tutoriali.TutModelData.hold = [0, 0, 0]

Definition at line 30 of file tutoriali.py.

◆ hold1

tuple tutoriali.TutModelData.hold1
Initial value:
= (self.Al*pow(self.L, (-self.Rho)) + \
self.Ak*pow(self.K, (-self.Rho)) + \
self.Ainp*pow(self.Inp, (-self.Rho)))

Definition at line 69 of file tutoriali.py.

◆ hold2

tutoriali.TutModelData.hold2 = pow(self.hold1,( -1./self.Rho ))

Definition at line 72 of file tutoriali.py.

◆ hold3

tuple tutoriali.TutModelData.hold3 = self.hold2 / self.hold1

Definition at line 73 of file tutoriali.py.


The documentation for this class was generated from the following file: