RootStrategy¶

class
RootStrategy
(*args)¶ Base class for root strategies.
RootStrategy is used through its derived classes:
See also
Methods
getClassName
(self)Accessor to the object’s name.
getId
(self)Accessor to the object’s id.
getImplementation
(self)Accessor to the underlying implementation.
getMaximumDistance
(self)Get the maximum distance.
getName
(self)Accessor to the object’s name.
getOriginValue
(self)Get the origin value.
getSolver
(self)Get the solver.
getStepSize
(self)Get the step size.
setMaximumDistance
(self, maximumDistance)Set the maximum distance.
setName
(self, name)Accessor to the object’s name.
setOriginValue
(self, originValue)Set the origin value.
setSolver
(self, solver)Set the solver.
setStepSize
(self, stepSize)Set the step size.
solve
(self, function, value)Give all the roots found applying the root strategy.

__init__
(self, \*args)¶ Initialize self. See help(type(self)) for accurate signature.

getClassName
(self)¶ Accessor to the object’s name.
 Returns
 class_namestr
The object class name (object.__class__.__name__).

getId
(self)¶ Accessor to the object’s id.
 Returns
 idint
Internal unique identifier.

getImplementation
(self)¶ Accessor to the underlying implementation.
 Returns
 implImplementation
The implementation class.

getMaximumDistance
(self)¶ Get the maximum distance.
 Returns
 maximumDistancepositive float
Distance from the center of the standard space until which we research an intersection with the limit state function along each direction. By default, the maximum distance is equal to the value defined through the key RootStrategyImplementationDefaultMaximumDistance of the
ResourceMap
.

getName
(self)¶ Accessor to the object’s name.
 Returns
 namestr
The name of the object.

getOriginValue
(self)¶ Get the origin value.
 Returns
 originfloat
Value of the limit state function at the center of the standard space.

getSolver
(self)¶ Get the solver.
 Returns
 solver
Solver
Non linear solver which will research the root in a segment.
 solver

getStepSize
(self)¶ Get the step size.
 Returns
 stepSizefloat
Length of each segment inside which the root research is performed. By default, the step size is equal to the value defined through the key RootStrategyImplementationDefaultStepSize of the
ResourceMap
.

setMaximumDistance
(self, maximumDistance)¶ Set the maximum distance.
 Parameters
 maximumDistancepositive float
Distance from the center of the standard space until which we research an intersection with the limit state function along each direction. By default, the maximum distance is equal to the value defined through the key RootStrategyImplementationDefaultMaximumDistance of the
ResourceMap
.

setName
(self, name)¶ Accessor to the object’s name.
 Parameters
 namestr
The name of the object.

setOriginValue
(self, originValue)¶ Set the origin value.
 Parameters
 originfloat
Value of the limit state function at the center of the standard space.

setSolver
(self, solver)¶ Set the solver.
 Parameters
 solver
Solver
Non linear solver which will research the root in a segment.
 solver

setStepSize
(self, stepSize)¶ Set the step size.
 Parameters
 stepSizefloat
Length of each segment inside which the root research is performed. By default, the step size is equal to the value defined through the key RootStrategyImplementationDefaultStepSize of the
ResourceMap
.

solve
(self, function, value)¶ Give all the roots found applying the root strategy.
 Parameters
 function
Function
Function from to along the ray, a linear function along the direction.
 valuefloat
 function
 Returns
 roots
ScalarCollection
All the roots found applying the root strategy.
If
SafeAndSlow
: all the real values such as function(x) = value researched in each segment of length stepSize, within [origin, maximumDistance].If
RiskyAndFast
: the real value such as function(x) = value researched within [origin, maximumDistance].If
MediumSafe
: the real value such as function(x) = value researched the first segment of length stepSize, within [origin, maximumDistance] where a sign changement of function has been detected.
 roots
