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: Optional[cosapp.systems.System] = None, **kwargs)[source]¶ Bases:
cosapp.core.module.ModuleAbstract 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]]
-
accept(visitor: cosapp.patterns.visitor.Visitor) → None[source]¶ Specifies course of action when visited by visitor
-
add_child(child: AnyDriver, execution_index: Optional[int] = 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.
desc [str (-) – Sub-driver description in the context of its parent driver.
optional] – Sub-driver description in the context of its parent driver.
- Returns
- Return type
child
Notes
The added child will have its owner set to that of current driver.
-
add_driver(child: AnyDriver, execution_index: Optional[int] = None, desc='') → AnyDriver[source]¶ Alias for
add_child().
-
error_code¶
-
is_standalone() → bool[source]¶ Is this Driver able to solve a system?
- Returns
Ability to solve a system or not.
- Return type
bool
-
options¶
-
property
recorder¶ Recorder attached to this Driver.
- Type
BaseRecorder or None
-
start_time¶
-
status¶