cosapp.drivers.driver¶
Classes driving simulation on CoSApp System
.
Classes
|
Abstract base class for all systems drivers. |
- class cosapp.drivers.driver.Driver(name: str, owner: 'cosapp.systems.System' | None = None, **kwargs)[source]¶
Bases:
Module
Abstract base class for all systems drivers.
- Parameters:
- name¶
Name of the driver
- Type:
str
- options¶
- Options for the current driver:verbose : int, {0, 1}Verbosity level of the driver; default 0 (i.e. minimal information)
- Type:
- solution¶
List of (name, value) for the iteratives when a solution is reached
- Type:
List[Tuple[str, float]]
- add_child(child: AnyDriver, execution_index: int | None = None, desc='') AnyDriver [source]¶
Add a child Driver to the current Driver.
When adding a child Driver, it is possible to specified its position in the execution order.
- Parameters:
child (-) – Driver to add to the current Driver
execution_index (-) – Index of the execution order list at which the Module should be inserted; default latest.
[str (- desc) – Sub-driver description in the context of its parent driver.
optional] – Sub-driver description in the context of its parent driver.
- Return type:
child
Notes
The added child will have its owner set to that of current driver.
- add_driver(child: AnyDriver, execution_index: int | None = None, desc='') AnyDriver [source]¶
Alias for
add_child()
.
- error_code: str¶
- is_standalone() bool [source]¶
Is this Driver able to solve a system?
- Returns:
Ability to solve a system or not.
- Return type:
bool
- options: OptionsDictionary¶
- property recorder: BaseRecorder | None¶
Recorder attached to this Driver.
- Type:
BaseRecorder or None
- start_time: float¶
- status: str¶