CONOPT
Loading...
Searching...
No Matches
leastsq2.LeastSqModelData Class Reference

Public Member Functions

 __init__ (self, int numobs, int dimensionx)
 
 rndx (self)
 Defines a pseudo random number between 0 and 1.
 
 define_data (self)
 Defines the data for the problem.
 
 buildModel (self)
 adding the variables and constraints to the model
 
 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
 
 evaluateSDLagrangian (self, x, u, hessianrow, hessiancol)
 Computes and returns the numerical values of the Lagrangian of the Hessian.
 

Data Fields

int seed = 12359
 
 nobs = numobs
 
 dimx = dimensionx
 
list A = [0] * (self.nobs * self.dimx)
 
list B = [0] * (self.nobs * self.dimx)
 
list Obs = [0] * self.nobs
 
list varx = []
 
list varres = []
 
list consresidual = []
 
 consobj
 

Detailed Description

Definition at line 18 of file leastsq2.py.

Constructor & Destructor Documentation

◆ __init__()

leastsq2.LeastSqModelData.__init__ ( self,
int numobs,
int dimensionx )

Definition at line 19 of file leastsq2.py.

Member Function Documentation

◆ rndx()

leastsq2.LeastSqModelData.rndx ( self)

Defines a pseudo random number between 0 and 1.

NOTE: it would be possible to use random module to generate the random numbers. We have written our own random number generator to be consistent with the original Fortran example.

Definition at line 37 of file leastsq2.py.

◆ define_data()

leastsq2.LeastSqModelData.define_data ( self)

Defines the data for the problem.

Definition at line 50 of file leastsq2.py.

Field Documentation

◆ seed

int leastsq2.LeastSqModelData.seed = 12359

Definition at line 20 of file leastsq2.py.

◆ nobs

leastsq2.LeastSqModelData.nobs = numobs

Definition at line 22 of file leastsq2.py.

◆ dimx

leastsq2.LeastSqModelData.dimx = dimensionx

Definition at line 23 of file leastsq2.py.

◆ A

list leastsq2.LeastSqModelData.A = [0] * (self.nobs * self.dimx)

Definition at line 25 of file leastsq2.py.

◆ B

list leastsq2.LeastSqModelData.B = [0] * (self.nobs * self.dimx)

Definition at line 26 of file leastsq2.py.

◆ Obs

list leastsq2.LeastSqModelData.Obs = [0] * self.nobs

Definition at line 27 of file leastsq2.py.

◆ varx

list leastsq2.LeastSqModelData.varx = []

Definition at line 29 of file leastsq2.py.

◆ varres

list leastsq2.LeastSqModelData.varres = []

Definition at line 30 of file leastsq2.py.

◆ consresidual

list leastsq2.LeastSqModelData.consresidual = []

Definition at line 31 of file leastsq2.py.

◆ consobj

leastsq2.LeastSqModelData.consobj
Initial value:
= self.addConstraint(
co.ConstraintType_Free, 0.0, objVarIdx, objCoeffs, objNlf
)

Definition at line 104 of file leastsq2.py.


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