bio_rtd.adj_par¶
AdjParSlider¶
-
class
bio_rtd.adj_par.
AdjParSlider
(var, v_range, v_init=None, scale_factor=1, par_name=None, gui_type='slider')[source]¶ Bases:
bio_rtd.adj_par.AdjustableParameter
A value slider version of AdjustableParameter
- Parameters
var (
str
) – Variable of a UnitOperation affected by the parameter.or Sequence[bool] (v_init) –
or (float, float) or (float, float, float) (v_range) – Defines range end or [start, end] or [start, end, step]. If step is not defined, the step = (start - end) / 10. If start is not defined the start = 0.
Notes
For more info see docstring of AdjustableParameter superclass.
AdjParRange¶
-
class
bio_rtd.adj_par.
AdjParRange
(var_list, v_range, v_init=None, scale_factor=1, par_name=None, gui_type='range')[source]¶ Bases:
bio_rtd.adj_par.AdjustableParameter
Defines a range slider version of AdjustableParameter
- Variables
var_list (Tuple[str, str]) – Defines attributed affected by the AdjustableParameter. First has value of the start of the interval and second of the end of the interval.
or Tuple[float, float] or Tuple[float, float, float] (v_range) – Defines range end or [start, end] or [start, end, step]. If step is not defined, the step = (start - end) / 10. If start is not defined the start = 0.
v_init (Tuple[float, float]) – Initial value [interval start, interval end]. If None (default), then the initial values are assigned from the initial conditions at the start of the simulation.
AdjParBoolean¶
-
class
bio_rtd.adj_par.
AdjParBoolean
(var, v_init=None, par_name=None, scale_factor=1, gui_type='checkbox')[source]¶ Bases:
bio_rtd.adj_par.AdjustableParameter
A boolean variation of
AdjustableParameter
- Parameters
var (
str
) – Variable of a UnitOperation affected by the parameter.or list of bool (v_init) – Initial value or list of initial values for each item in var_list.
or list of str (par_name) – List of parameter names. If defined, the shape of the should match var_list.
AdjParBooleanMultiple¶
-
class
bio_rtd.adj_par.
AdjParBooleanMultiple
(var_list, v_init=None, par_name=None, scale_factor=1, gui_type='radio_group')[source]¶ Bases:
bio_rtd.adj_par.AdjustableParameter
A radio group variation of AdjustableParameter
- Parameters
var_list (list of str) – A list of attributes of a UnitOperation affected by the AdjustableParameter.
v_init (
Optional
[Sequence
[bool
]]) – Initial value for each entry in var_list. If None (default), the value is inherited from the initial attribute values at the start of the runtime. If specified, the shape should match the shape of var_list.par_name (list of str) – Attribute title (e.g. ‘Initial delay [min]’) for each option. The shape should batch the shape of var_list.
AdjustableParameter¶
-
class
bio_rtd.adj_par.
AdjustableParameter
(var_list, v_range=None, v_init=None, scale_factor=1, par_name=None, gui_type=None)[source]¶ Bases:
abc.ABC
Adjustable parameter for a UnitOperation (or Inlet).
The class does not provide any logic. It just provides a unified way to specify an adjustable attribute.
- Parameters
var_list (
List
[str
]) – A list of attributes of a UnitOperation affected by the AdjustableParameter.v_range (
Union
[Tuple
[float
,float
,float
],Sequence
[str
],Sequence
[float
],Sequence
[Tuple
[str
,str
]],None
]) – Range of values. For boolean set None. For range specify [start, end, step]. For list set list. If the list has two columns, the first one is the title and the second is the value.v_init (
Union
[float
,bool
,Sequence
[float
],None
]) – Initial value. If None (default), the value is inherited from the initial attribute value (at the start of the runtime).scale_factor (
float
) – The scale factor to compensate for differences in units. E.g.: Setting time in [h] for attribute set in [min] requires a scale_factor of 60.par_name (
Union
[str
,Sequence
[str
],None
]) – Attribute title (e.g. ‘Initial delay [min]’) or list of titles in case of multiple options (e.g. radio button group).gui_type (
Optional
[str
]) – Preferred method for setting parameter in gui parameters. If None (default) or the gui does not support the type, then the gui should decide the method based on v_init and/or var_list. Example values: ‘checkbox’, ‘range’, ‘slider’, ‘select’, ‘multi-select’
Notes
Technically the class relates to instance attributes rather than parameters. However, the term ‘process parameters’ is well established in biotech, hence the class name.