Bases: decida.ItclObjectx.ItclObjectx
parameter attribute manager class.
synopsis:
Parameter manages one parameter with a number of attributes.
A set of Parameter instances is managed by the Parameters class.
constructor arguments:
- par (string)
parameter name
- **kwargs (dict)
keyword=value specifications: configuration-options (parameter attributes)
configuration options (parameter attributes):
- initial_value (float, default=0.0)
first value of parameter
- current_value (float, default=0.0)
current value of parameter
- include (book, default=True)
parameter is not fixed
- lower_limited (bool, default=True)
parameter has a lower-limit
- lower_limit (float, default=0.0)
the lower-limit
- upper_limited (bool, default=False)
parameter has an upper-limit
- upper_limit (float, default=0.0)
the upper-limit
- step (float, default=0.0)
absolute step for derivatives
- relative_step (float, default=0.0)
relative step for derivatives
- side (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 step
- tied (string, default="")
expression to tie parameter with other parameters
- print (bool, default=True)
if True, print parameter value at each iteration
public methods:
- public methods from ItclObjectx
check parameter conditions.
arguments:
- condition (string)
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 current value to initial value.
results:
- current_value attribute is set to initial value_attribute.
show parameter attributes.
results:
- print out parameter attributes.