Parameter¶
-
class
decida.Parameter.
Parameter
(par, **kwargs)¶ Bases:
decida.ItclObjectx.ItclObjectx
synopsis:
Parameter attribute manager class.
Parameter manages one parameter with a number of attributes.
A set of Parameter instances is managed by the Parameters class.
constructor arguments:
par (str)
parameter name**kwargs (dict)
keyword=value specifications: configuration-options (parameter attributes)configuration options (parameter attributes):
initial_value (float, default=0.0)
first value of parametercurrent_value (float, default=0.0)
current value of parameterinclude (bool, default=True)
if include is True, parameter is not fixedlower_limited (bool, default=True)
parameter has a lower-limitlower_limit (float, default=0.0)
the lower-limitupper_limited (bool, default=False)
parameter has an upper-limitupper_limit (float, default=0.0)
the upper-limitstep (float, default=0.0)
absolute step for derivativesrelative_step (float, default=0.0)
relative step for derivativesside (int, default=1)
side to take derivatives:
- 1: forward
- -1: reverse
- 2: two-sided
minstep (float, default=0.0)
minimum iteration step (not used)maxstep (float, default=0.0)
maximum iteration steptied (str, default=””)
expression to tie parameter with other parametersprint (bool, default=True)
if True, print parameter value at each iterationpublic methods:
- public methods from ItclObjectx
-
check
(condition, verbose=False)¶ check parameter conditions.
arguments:
condition (str)
Specify one of the conditions: “fixed”, “included”, “tied”, “untied”, “free”, “limited”, “step_limited”, “at_upper_limit”, “at_lower_limit”, “within_limits”, “correct_limits”, “correct_step_limits”verbose (bool, default=False)
If verbose is True, print more information if available.results:
- Return True or False, depending on condition.
condition: description: fixed parameter is not allowed to vary included parameter is allowed to vary (free or tied) tied parameter is tied others by an expression untied not tied free parameter is allowed to vary limited parameter is limited (upper or lower) step_limited value of parameter change for one iteration is limited at_upper_limit parameter current value is at upper-limit at_lower_limit parameter current value is at lower-limit within_limits parameter current value is within limits correct_limits parameter upper_limit > lower_limit correct_step_limits parameter maxstep > minstep
-
reset
()¶ reset current value to initial value.
results:
- current_value attribute is set to initial value_attribute.
-
show
()¶ show parameter attributes.
results:
- print out parameter attributes.