engforge.system
A System is a Configuration that orchestrates dataflow between components, as well as solving systems of equations in the presense of limits, as well as formatting results of each Component into reporting ready dataframe. System’s solver behavior is inspired by NASA’s numerical propulsion simulation system (NPSS) to solve systems of inequalities in complex systems.
- Component or other subsystems are added to a System class with Slots:
``` class CustomSystem(System):
slot_name = Slot.define(Component,ComponentSubclass,System)
- Component’s data flow is established via SignalS that are defined:
``` class CustomSystem(System):
signal_name = Signal.define(source_attr_or_property, target_attr) control_signal = Signal.define(source_attr_or_property, target_attr,control_with=’system.attr or slot.attr`)
``` - source_attr: can reference a locally defined slot attribute (a la attr’s fields) or any locally defined slot system property - target_attr: must be a locally defined slot attribute or system attribute.
update description to include solver
A system calculates its state upon calling System.run(). This executes pre_execute() first which will directly update any attributes based on their Signal definition between Slot components. Once convergence is reached target_attr’s are updated in post_execute() for cyclic SignalS.
If the system encounters a subsystem in its solver routine, the subsystem is evald() and its results used as static in that iteration,ie it isn’t included in the system level dependents if cyclic references are found.
The solver uses the root or cobla scipy optimizer results on quick references to internal component references. Upon solving the system
SignalS can be limited with constrains via min or max values on NumericProperty which can be numeric values (int or float) or functions taking one argument of the component it is defined on. Additionally signals may take arguments of min or max which are numeric values or callbacks which take the system instance as an argument.
Classes
A system defines SlotS for Components, and data flow between them using SignalS |
|
Initialize a filter. |