nervus 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nervus-0.1.0/.gitignore +25 -0
- nervus-0.1.0/CHANGELOG.md +302 -0
- nervus-0.1.0/CONTRIBUTING.md +72 -0
- nervus-0.1.0/LICENSE +21 -0
- nervus-0.1.0/PKG-INFO +208 -0
- nervus-0.1.0/README.md +172 -0
- nervus-0.1.0/docs/analysis.md +104 -0
- nervus-0.1.0/docs/app-help/analysis.md +38 -0
- nervus-0.1.0/docs/app-help/can.md +195 -0
- nervus-0.1.0/docs/app-help/codegen.md +193 -0
- nervus-0.1.0/docs/app-help/coming_from_simulink.md +106 -0
- nervus-0.1.0/docs/app-help/concepts.md +120 -0
- nervus-0.1.0/docs/app-help/datatypes.md +62 -0
- nervus-0.1.0/docs/app-help/editor.md +146 -0
- nervus-0.1.0/docs/app-help/getting_started.md +86 -0
- nervus-0.1.0/docs/app-help/libraries.md +84 -0
- nervus-0.1.0/docs/app-help/model_files.md +41 -0
- nervus-0.1.0/docs/app-help/obd.md +201 -0
- nervus-0.1.0/docs/app-help/physical.md +203 -0
- nervus-0.1.0/docs/app-help/shortcuts.md +32 -0
- nervus-0.1.0/docs/app-help/simulation.md +62 -0
- nervus-0.1.0/docs/app-help/statecharts.md +197 -0
- nervus-0.1.0/docs/app-help/subsystems.md +167 -0
- nervus-0.1.0/docs/app-help/testing.md +151 -0
- nervus-0.1.0/docs/app-help/tutorial_abs.md +74 -0
- nervus-0.1.0/docs/app-help/tutorial_can_network.md +61 -0
- nervus-0.1.0/docs/app-help/tutorial_charging_system.md +75 -0
- nervus-0.1.0/docs/app-help/tutorial_circuits.md +104 -0
- nervus-0.1.0/docs/app-help/tutorial_component_libraries.md +78 -0
- nervus-0.1.0/docs/app-help/tutorial_coolant_fan.md +58 -0
- nervus-0.1.0/docs/app-help/tutorial_coupled_tanks.md +75 -0
- nervus-0.1.0/docs/app-help/tutorial_dc_motor.md +79 -0
- nervus-0.1.0/docs/app-help/tutorial_drive_cycle.md +100 -0
- nervus-0.1.0/docs/app-help/tutorial_engine_modes.md +78 -0
- nervus-0.1.0/docs/app-help/tutorial_ev_range.md +76 -0
- nervus-0.1.0/docs/app-help/tutorial_first_model.md +176 -0
- nervus-0.1.0/docs/app-help/tutorial_fixed_point.md +68 -0
- nervus-0.1.0/docs/app-help/tutorial_fmi.md +80 -0
- nervus-0.1.0/docs/app-help/tutorial_fuel_film.md +61 -0
- nervus-0.1.0/docs/app-help/tutorial_gear_shift.md +157 -0
- nervus-0.1.0/docs/app-help/tutorial_idle.md +88 -0
- nervus-0.1.0/docs/app-help/tutorial_ignition.md +69 -0
- nervus-0.1.0/docs/app-help/tutorial_injector_driver.md +82 -0
- nervus-0.1.0/docs/app-help/tutorial_inverted_pendulum.md +82 -0
- nervus-0.1.0/docs/app-help/tutorial_lambda.md +97 -0
- nervus-0.1.0/docs/app-help/tutorial_mass_spring_damper.md +87 -0
- nervus-0.1.0/docs/app-help/tutorial_model_to_code.md +109 -0
- nervus-0.1.0/docs/app-help/tutorial_ntc_sensor.md +71 -0
- nervus-0.1.0/docs/app-help/tutorial_obd_diagnostics.md +76 -0
- nervus-0.1.0/docs/app-help/tutorial_physical.md +73 -0
- nervus-0.1.0/docs/app-help/tutorial_rc_rlc.md +70 -0
- nervus-0.1.0/docs/app-help/tutorial_requirements_testing.md +94 -0
- nervus-0.1.0/docs/app-help/tutorial_robustness_monte_carlo.md +94 -0
- nervus-0.1.0/docs/app-help/tutorial_sensor_diagnostics.md +59 -0
- nervus-0.1.0/docs/app-help/tutorial_traction.md +64 -0
- nervus-0.1.0/docs/app-help/tutorial_truck.md +51 -0
- nervus-0.1.0/docs/app-help/tutorial_xcp_calibration.md +98 -0
- nervus-0.1.0/docs/app-help/tutorials.md +142 -0
- nervus-0.1.0/docs/app-help/verification.md +129 -0
- nervus-0.1.0/docs/app-help/workspace.md +155 -0
- nervus-0.1.0/docs/blocks/automotive-electrics.md +130 -0
- nervus-0.1.0/docs/blocks/can.md +272 -0
- nervus-0.1.0/docs/blocks/continuous.md +112 -0
- nervus-0.1.0/docs/blocks/control.md +77 -0
- nervus-0.1.0/docs/blocks/diagnostics.md +89 -0
- nervus-0.1.0/docs/blocks/discontinuities.md +118 -0
- nervus-0.1.0/docs/blocks/discrete.md +247 -0
- nervus-0.1.0/docs/blocks/electrical.md +306 -0
- nervus-0.1.0/docs/blocks/hydraulic.md +133 -0
- nervus-0.1.0/docs/blocks/index.md +200 -0
- nervus-0.1.0/docs/blocks/logic-and-bit-operations.md +64 -0
- nervus-0.1.0/docs/blocks/lookup-tables.md +153 -0
- nervus-0.1.0/docs/blocks/math-operations.md +137 -0
- nervus-0.1.0/docs/blocks/ports-subsystems.md +134 -0
- nervus-0.1.0/docs/blocks/rotational.md +162 -0
- nervus-0.1.0/docs/blocks/semiconductors.md +110 -0
- nervus-0.1.0/docs/blocks/sensors-actuators.md +65 -0
- nervus-0.1.0/docs/blocks/signal-attributes.md +87 -0
- nervus-0.1.0/docs/blocks/signal-routing.md +60 -0
- nervus-0.1.0/docs/blocks/sinks.md +75 -0
- nervus-0.1.0/docs/blocks/sources.md +224 -0
- nervus-0.1.0/docs/blocks/state-machines.md +49 -0
- nervus-0.1.0/docs/blocks/thermal.md +95 -0
- nervus-0.1.0/docs/blocks/user-defined.md +35 -0
- nervus-0.1.0/docs/can.md +198 -0
- nervus-0.1.0/docs/codegen.md +337 -0
- nervus-0.1.0/docs/coming-from-simulink.md +106 -0
- nervus-0.1.0/docs/concepts.md +120 -0
- nervus-0.1.0/docs/datatypes.md +65 -0
- nervus-0.1.0/docs/developer/architecture.md +95 -0
- nervus-0.1.0/docs/developer/custom-blocks.md +64 -0
- nervus-0.1.0/docs/editor.md +199 -0
- nervus-0.1.0/docs/getting-started.md +182 -0
- nervus-0.1.0/docs/images/analysis-nyquist.png +0 -0
- nervus-0.1.0/docs/images/analysis-pid-tuning.png +0 -0
- nervus-0.1.0/docs/images/analysis-root-locus.png +0 -0
- nervus-0.1.0/docs/images/analysis.png +0 -0
- nervus-0.1.0/docs/images/blocks/abs_braking.png +0 -0
- nervus-0.1.0/docs/images/blocks/can_arbitration.png +0 -0
- nervus-0.1.0/docs/images/blocks/can_frame.png +0 -0
- nervus-0.1.0/docs/images/blocks/can_network.png +0 -0
- nervus-0.1.0/docs/images/blocks/charging_system.png +0 -0
- nervus-0.1.0/docs/images/blocks/chart_engine_modes.png +0 -0
- nervus-0.1.0/docs/images/blocks/chart_hierarchy.png +0 -0
- nervus-0.1.0/docs/images/blocks/circuits.png +0 -0
- nervus-0.1.0/docs/images/blocks/coolant_fan.png +0 -0
- nervus-0.1.0/docs/images/blocks/counter.png +0 -0
- nervus-0.1.0/docs/images/blocks/cruise_tolerance.png +0 -0
- nervus-0.1.0/docs/images/blocks/datatype_conversion.png +0 -0
- nervus-0.1.0/docs/images/blocks/dead_zone.png +0 -0
- nervus-0.1.0/docs/images/blocks/debounce.png +0 -0
- nervus-0.1.0/docs/images/blocks/diagnostic_monitor.png +0 -0
- nervus-0.1.0/docs/images/blocks/discrete_filter.png +0 -0
- nervus-0.1.0/docs/images/blocks/discrete_integrator.png +0 -0
- nervus-0.1.0/docs/images/blocks/drive_cycle.png +0 -0
- nervus-0.1.0/docs/images/blocks/drive_cycle_block.png +0 -0
- nervus-0.1.0/docs/images/blocks/edge_detect.png +0 -0
- nervus-0.1.0/docs/images/blocks/engine_comparison.png +0 -0
- nervus-0.1.0/docs/images/blocks/engine_modes.png +0 -0
- nervus-0.1.0/docs/images/blocks/ev_range.png +0 -0
- nervus-0.1.0/docs/images/blocks/fixed_point_sensor.png +0 -0
- nervus-0.1.0/docs/images/blocks/fmi_exchange.png +0 -0
- nervus-0.1.0/docs/images/blocks/from_workspace.png +0 -0
- nervus-0.1.0/docs/images/blocks/fuel_film.png +0 -0
- nervus-0.1.0/docs/images/blocks/gain_modes.png +0 -0
- nervus-0.1.0/docs/images/blocks/gear_shift.png +0 -0
- nervus-0.1.0/docs/images/blocks/idle_speed_control.png +0 -0
- nervus-0.1.0/docs/images/blocks/ignition_knock.png +0 -0
- nervus-0.1.0/docs/images/blocks/injector_driver.png +0 -0
- nervus-0.1.0/docs/images/blocks/integrator_limits.png +0 -0
- nervus-0.1.0/docs/images/blocks/lab_coupled_tanks.png +0 -0
- nervus-0.1.0/docs/images/blocks/lab_dc_motor.png +0 -0
- nervus-0.1.0/docs/images/blocks/lab_inverted_pendulum.png +0 -0
- nervus-0.1.0/docs/images/blocks/lab_mass_spring_damper.png +0 -0
- nervus-0.1.0/docs/images/blocks/lambda_trims.png +0 -0
- nervus-0.1.0/docs/images/blocks/lookup_1d.png +0 -0
- nervus-0.1.0/docs/images/blocks/lookup_2d.png +0 -0
- nervus-0.1.0/docs/images/blocks/mux_demux.png +0 -0
- nervus-0.1.0/docs/images/blocks/ntc_divider.png +0 -0
- nervus-0.1.0/docs/images/blocks/ntc_fault.png +0 -0
- nervus-0.1.0/docs/images/blocks/obd_ecu.png +0 -0
- nervus-0.1.0/docs/images/blocks/physical_models.png +0 -0
- nervus-0.1.0/docs/images/blocks/pid_anti_windup.png +0 -0
- nervus-0.1.0/docs/images/blocks/pid_structure.png +0 -0
- nervus-0.1.0/docs/images/blocks/prelookup.png +0 -0
- nervus-0.1.0/docs/images/blocks/pulse.png +0 -0
- nervus-0.1.0/docs/images/blocks/ramp.png +0 -0
- nervus-0.1.0/docs/images/blocks/rate_limiter.png +0 -0
- nervus-0.1.0/docs/images/blocks/rate_transition.png +0 -0
- nervus-0.1.0/docs/images/blocks/rc_rlc.png +0 -0
- nervus-0.1.0/docs/images/blocks/relay.png +0 -0
- nervus-0.1.0/docs/images/blocks/saturation.png +0 -0
- nervus-0.1.0/docs/images/blocks/sensor_model.png +0 -0
- nervus-0.1.0/docs/images/blocks/sine.png +0 -0
- nervus-0.1.0/docs/images/blocks/step.png +0 -0
- nervus-0.1.0/docs/images/blocks/sum_signs.png +0 -0
- nervus-0.1.0/docs/images/blocks/switch.png +0 -0
- nervus-0.1.0/docs/images/blocks/traction_control.png +0 -0
- nervus-0.1.0/docs/images/blocks/transfer_function.png +0 -0
- nervus-0.1.0/docs/images/blocks/truck.png +0 -0
- nervus-0.1.0/docs/images/blocks/unit_delay.png +0 -0
- nervus-0.1.0/docs/images/blocks/xcp_calibration.png +0 -0
- nervus-0.1.0/docs/images/blocks/xcp_live.png +0 -0
- nervus-0.1.0/docs/images/blocks/zero_order_hold.png +0 -0
- nervus-0.1.0/docs/images/can-trace.png +0 -0
- nervus-0.1.0/docs/images/chart-editor-transition.png +0 -0
- nervus-0.1.0/docs/images/chart-editor.png +0 -0
- nervus-0.1.0/docs/images/circuit.png +0 -0
- nervus-0.1.0/docs/images/codegen.png +0 -0
- nervus-0.1.0/docs/images/console.png +0 -0
- nervus-0.1.0/docs/images/context-menu.png +0 -0
- nervus-0.1.0/docs/images/data-dictionary.png +0 -0
- nervus-0.1.0/docs/images/data-inspector.png +0 -0
- nervus-0.1.0/docs/images/datatypes.png +0 -0
- nervus-0.1.0/docs/images/drive-cycle-model.png +0 -0
- nervus-0.1.0/docs/images/drive-cycle-vehicle.png +0 -0
- nervus-0.1.0/docs/images/editor-dark.png +0 -0
- nervus-0.1.0/docs/images/editor.png +0 -0
- nervus-0.1.0/docs/images/electronic-throttle.png +0 -0
- nervus-0.1.0/docs/images/engine-comparison.png +0 -0
- nervus-0.1.0/docs/images/engine-component.png +0 -0
- nervus-0.1.0/docs/images/first-model-1-blocks.png +0 -0
- nervus-0.1.0/docs/images/first-model-2-wired.png +0 -0
- nervus-0.1.0/docs/images/first-model-3-parameters.png +0 -0
- nervus-0.1.0/docs/images/first-model-4-scope.png +0 -0
- nervus-0.1.0/docs/images/first-model-5-inspector.png +0 -0
- nervus-0.1.0/docs/images/gear-shift-car.png +0 -0
- nervus-0.1.0/docs/images/gear-shift-engine.png +0 -0
- nervus-0.1.0/docs/images/gear-shift-model.png +0 -0
- nervus-0.1.0/docs/images/gear-shift-tcu.png +0 -0
- nervus-0.1.0/docs/images/help-gain.png +0 -0
- nervus-0.1.0/docs/images/help.png +0 -0
- nervus-0.1.0/docs/images/lambda-ecu.png +0 -0
- nervus-0.1.0/docs/images/lambda-model.png +0 -0
- nervus-0.1.0/docs/images/library-linked.png +0 -0
- nervus-0.1.0/docs/images/mask-dialog.png +0 -0
- nervus-0.1.0/docs/images/mask-properties.png +0 -0
- nervus-0.1.0/docs/images/obd-record.png +0 -0
- nervus-0.1.0/docs/images/requirements.png +0 -0
- nervus-0.1.0/docs/images/rotated-blocks.png +0 -0
- nervus-0.1.0/docs/images/sample-time-colours.png +0 -0
- nervus-0.1.0/docs/images/scope-dark.png +0 -0
- nervus-0.1.0/docs/images/scope.png +0 -0
- nervus-0.1.0/docs/images/settings.png +0 -0
- nervus-0.1.0/docs/images/signal-editor.png +0 -0
- nervus-0.1.0/docs/images/starter-motor.png +0 -0
- nervus-0.1.0/docs/images/subsystem-gated.png +0 -0
- nervus-0.1.0/docs/images/subsystem-inner.png +0 -0
- nervus-0.1.0/docs/images/subsystem-outer.png +0 -0
- nervus-0.1.0/docs/images/subsystem-tasks.png +0 -0
- nervus-0.1.0/docs/images/sweep-metric.png +0 -0
- nervus-0.1.0/docs/images/sweep-signals.png +0 -0
- nervus-0.1.0/docs/images/test-manager.png +0 -0
- nervus-0.1.0/docs/images/variants-dialog.png +0 -0
- nervus-0.1.0/docs/images/variants-properties.png +0 -0
- nervus-0.1.0/docs/images/workspace-panel.png +0 -0
- nervus-0.1.0/docs/images/workspace.png +0 -0
- nervus-0.1.0/docs/index.md +36 -0
- nervus-0.1.0/docs/libraries.md +90 -0
- nervus-0.1.0/docs/model-files.md +43 -0
- nervus-0.1.0/docs/obd.md +203 -0
- nervus-0.1.0/docs/physical.md +205 -0
- nervus-0.1.0/docs/statecharts.md +197 -0
- nervus-0.1.0/docs/subsystems.md +200 -0
- nervus-0.1.0/docs/testing.md +210 -0
- nervus-0.1.0/docs/tutorials/abs.md +74 -0
- nervus-0.1.0/docs/tutorials/can-network.md +61 -0
- nervus-0.1.0/docs/tutorials/charging-system.md +75 -0
- nervus-0.1.0/docs/tutorials/circuits.md +104 -0
- nervus-0.1.0/docs/tutorials/component-libraries.md +82 -0
- nervus-0.1.0/docs/tutorials/coolant-fan.md +58 -0
- nervus-0.1.0/docs/tutorials/coupled-tanks.md +75 -0
- nervus-0.1.0/docs/tutorials/dc-motor.md +79 -0
- nervus-0.1.0/docs/tutorials/drive-cycle.md +104 -0
- nervus-0.1.0/docs/tutorials/engine-modes.md +78 -0
- nervus-0.1.0/docs/tutorials/ev-range.md +76 -0
- nervus-0.1.0/docs/tutorials/first-model.md +178 -0
- nervus-0.1.0/docs/tutorials/fixed-point.md +68 -0
- nervus-0.1.0/docs/tutorials/fmi.md +80 -0
- nervus-0.1.0/docs/tutorials/fuel-film.md +61 -0
- nervus-0.1.0/docs/tutorials/gear-shift.md +165 -0
- nervus-0.1.0/docs/tutorials/idle-speed-control.md +88 -0
- nervus-0.1.0/docs/tutorials/ignition-knock.md +69 -0
- nervus-0.1.0/docs/tutorials/index.md +142 -0
- nervus-0.1.0/docs/tutorials/injector-driver.md +82 -0
- nervus-0.1.0/docs/tutorials/inverted-pendulum.md +82 -0
- nervus-0.1.0/docs/tutorials/lambda-control.md +101 -0
- nervus-0.1.0/docs/tutorials/mass-spring-damper.md +87 -0
- nervus-0.1.0/docs/tutorials/model-to-code.md +109 -0
- nervus-0.1.0/docs/tutorials/ntc-sensor.md +71 -0
- nervus-0.1.0/docs/tutorials/obd-diagnostics.md +76 -0
- nervus-0.1.0/docs/tutorials/physical-models.md +77 -0
- nervus-0.1.0/docs/tutorials/rc-rlc.md +70 -0
- nervus-0.1.0/docs/tutorials/requirements-testing.md +96 -0
- nervus-0.1.0/docs/tutorials/robustness-monte-carlo.md +94 -0
- nervus-0.1.0/docs/tutorials/sensor-diagnostics.md +59 -0
- nervus-0.1.0/docs/tutorials/traction-control.md +64 -0
- nervus-0.1.0/docs/tutorials/truck.md +51 -0
- nervus-0.1.0/docs/tutorials/xcp-calibration.md +98 -0
- nervus-0.1.0/docs/verification.md +130 -0
- nervus-0.1.0/docs/workspace.md +169 -0
- nervus-0.1.0/examples/abs_braking.nervus +697 -0
- nervus-0.1.0/examples/abs_braking.py +220 -0
- nervus-0.1.0/examples/active_filter.nervus +236 -0
- nervus-0.1.0/examples/buck_converter.nervus +274 -0
- nervus-0.1.0/examples/can_network.nervus +928 -0
- nervus-0.1.0/examples/can_network.py +218 -0
- nervus-0.1.0/examples/charging_system.nervus +595 -0
- nervus-0.1.0/examples/charging_system.py +189 -0
- nervus-0.1.0/examples/circuits.py +214 -0
- nervus-0.1.0/examples/coolant_fan.nervus +367 -0
- nervus-0.1.0/examples/coolant_fan.py +113 -0
- nervus-0.1.0/examples/coupled_tanks.nervus +616 -0
- nervus-0.1.0/examples/coupled_tanks.py +165 -0
- nervus-0.1.0/examples/cruise_control.nervus +255 -0
- nervus-0.1.0/examples/cruise_control.py +91 -0
- nervus-0.1.0/examples/cruise_tolerance.py +71 -0
- nervus-0.1.0/examples/data/chassis.dbc +44 -0
- nervus-0.1.0/examples/data/idle_requirements.csv +6 -0
- nervus-0.1.0/examples/data/vehicle.dbc +28 -0
- nervus-0.1.0/examples/dc_motor_lab.py +203 -0
- nervus-0.1.0/examples/dc_motor_position.nervus +402 -0
- nervus-0.1.0/examples/dc_motor_speed.nervus +472 -0
- nervus-0.1.0/examples/drive_cycle.nervus +1135 -0
- nervus-0.1.0/examples/drive_cycle.py +288 -0
- nervus-0.1.0/examples/electronic_throttle.nervus +690 -0
- nervus-0.1.0/examples/electronic_throttle.py +190 -0
- nervus-0.1.0/examples/engine_comparison.nervus +1107 -0
- nervus-0.1.0/examples/engine_library.py +222 -0
- nervus-0.1.0/examples/engine_modes.nervus +696 -0
- nervus-0.1.0/examples/engine_modes.py +209 -0
- nervus-0.1.0/examples/ev_range.nervus +1146 -0
- nervus-0.1.0/examples/ev_range.py +106 -0
- nervus-0.1.0/examples/fixed_point_sensor.nervus +321 -0
- nervus-0.1.0/examples/fixed_point_sensor.py +86 -0
- nervus-0.1.0/examples/fmi_exchange.py +85 -0
- nervus-0.1.0/examples/fmi_plant.nervus +257 -0
- nervus-0.1.0/examples/fuel_film.nervus +1073 -0
- nervus-0.1.0/examples/fuel_film.py +239 -0
- nervus-0.1.0/examples/gear_shift.nervus +2007 -0
- nervus-0.1.0/examples/gear_shift.py +446 -0
- nervus-0.1.0/examples/generated/ECU/ECU.a2l +70 -0
- nervus-0.1.0/examples/generated/ECU/ECU.c +66 -0
- nervus-0.1.0/examples/generated/ECU/ECU.h +60 -0
- nervus-0.1.0/examples/generated/ECU/main_example.c +23 -0
- nervus-0.1.0/examples/generated/cruise_monte_carlo.csv +201 -0
- nervus-0.1.0/examples/generated/idle_coverage.html +5 -0
- nervus-0.1.0/examples/generated/idle_traceability.html +9 -0
- nervus-0.1.0/examples/idle_requirements.nervus +800 -0
- nervus-0.1.0/examples/idle_requirements.py +73 -0
- nervus-0.1.0/examples/idle_speed_control.nervus +712 -0
- nervus-0.1.0/examples/idle_speed_control.py +200 -0
- nervus-0.1.0/examples/ignition_knock.nervus +876 -0
- nervus-0.1.0/examples/ignition_knock.py +209 -0
- nervus-0.1.0/examples/injector_driver.nervus +506 -0
- nervus-0.1.0/examples/injector_driver.py +139 -0
- nervus-0.1.0/examples/inverted_pendulum.nervus +470 -0
- nervus-0.1.0/examples/inverted_pendulum.py +173 -0
- nervus-0.1.0/examples/lambda_control.nervus +885 -0
- nervus-0.1.0/examples/lambda_control.py +232 -0
- nervus-0.1.0/examples/library/engine_parts.nervlib +464 -0
- nervus-0.1.0/examples/mass_spring_damper_pid.nervus +329 -0
- nervus-0.1.0/examples/mass_spring_damper_pid.py +116 -0
- nervus-0.1.0/examples/ntc_sensor.nervus +938 -0
- nervus-0.1.0/examples/ntc_sensor.py +226 -0
- nervus-0.1.0/examples/obd_ecu.nervus +690 -0
- nervus-0.1.0/examples/obd_ecu.py +179 -0
- nervus-0.1.0/examples/rc_filter.nervus +225 -0
- nervus-0.1.0/examples/rc_rlc.py +137 -0
- nervus-0.1.0/examples/rectifier.nervus +233 -0
- nervus-0.1.0/examples/relay_driver.nervus +302 -0
- nervus-0.1.0/examples/rlc_circuit.nervus +247 -0
- nervus-0.1.0/examples/starter_motor.nervus +484 -0
- nervus-0.1.0/examples/starter_motor.py +131 -0
- nervus-0.1.0/examples/throttle_ecu.nervus +414 -0
- nervus-0.1.0/examples/throttle_ecu.py +154 -0
- nervus-0.1.0/examples/throttle_pi.nervus +278 -0
- nervus-0.1.0/examples/throttle_pi.py +115 -0
- nervus-0.1.0/examples/throttle_tight.nervcal +10 -0
- nervus-0.1.0/examples/traction_control.nervus +814 -0
- nervus-0.1.0/examples/traction_control.py +194 -0
- nervus-0.1.0/examples/truck.nervus +800 -0
- nervus-0.1.0/examples/truck.py +217 -0
- nervus-0.1.0/examples/xcp_calibration.a2l +33 -0
- nervus-0.1.0/examples/xcp_calibration.nervus +425 -0
- nervus-0.1.0/examples/xcp_calibration.py +142 -0
- nervus-0.1.0/examples/xcp_tool.py +67 -0
- nervus-0.1.0/mkdocs.yml +170 -0
- nervus-0.1.0/pyproject.toml +119 -0
- nervus-0.1.0/scripts/benchmark.py +48 -0
- nervus-0.1.0/scripts/check.sh +10 -0
- nervus-0.1.0/scripts/gen_block_reference.py +42 -0
- nervus-0.1.0/scripts/gen_figures.py +1909 -0
- nervus-0.1.0/scripts/gen_tutorials.py +173 -0
- nervus-0.1.0/scripts/screenshots.py +699 -0
- nervus-0.1.0/src/nervus/__init__.py +35 -0
- nervus-0.1.0/src/nervus/advisor.py +258 -0
- nervus-0.1.0/src/nervus/analysis.py +527 -0
- nervus-0.1.0/src/nervus/blocks/__init__.py +236 -0
- nervus-0.1.0/src/nervus/blocks/automotive_electrics.py +243 -0
- nervus-0.1.0/src/nervus/blocks/can_blocks.py +826 -0
- nervus-0.1.0/src/nervus/blocks/chart.py +696 -0
- nervus-0.1.0/src/nervus/blocks/chart_model.py +349 -0
- nervus-0.1.0/src/nervus/blocks/continuous.py +389 -0
- nervus-0.1.0/src/nervus/blocks/control.py +210 -0
- nervus-0.1.0/src/nervus/blocks/diagnostics.py +250 -0
- nervus-0.1.0/src/nervus/blocks/discontinuities.py +215 -0
- nervus-0.1.0/src/nervus/blocks/discrete.py +521 -0
- nervus-0.1.0/src/nervus/blocks/electrical.py +497 -0
- nervus-0.1.0/src/nervus/blocks/fmi.py +184 -0
- nervus-0.1.0/src/nervus/blocks/hydraulic.py +222 -0
- nervus-0.1.0/src/nervus/blocks/logic.py +159 -0
- nervus-0.1.0/src/nervus/blocks/lookup.py +364 -0
- nervus-0.1.0/src/nervus/blocks/math_ops.py +306 -0
- nervus-0.1.0/src/nervus/blocks/mechanical.py +384 -0
- nervus-0.1.0/src/nervus/blocks/physical_ports.py +25 -0
- nervus-0.1.0/src/nervus/blocks/ports.py +381 -0
- nervus-0.1.0/src/nervus/blocks/registry.py +48 -0
- nervus-0.1.0/src/nervus/blocks/routing.py +183 -0
- nervus-0.1.0/src/nervus/blocks/semiconductors.py +267 -0
- nervus-0.1.0/src/nervus/blocks/sensors.py +146 -0
- nervus-0.1.0/src/nervus/blocks/signal_builder.py +220 -0
- nervus-0.1.0/src/nervus/blocks/sinks.py +95 -0
- nervus-0.1.0/src/nervus/blocks/sources.py +338 -0
- nervus-0.1.0/src/nervus/blocks/user.py +101 -0
- nervus-0.1.0/src/nervus/can.py +240 -0
- nervus-0.1.0/src/nervus/canbus.py +346 -0
- nervus-0.1.0/src/nervus/circuit.py +102 -0
- nervus-0.1.0/src/nervus/cli.py +57 -0
- nervus-0.1.0/src/nervus/codegen/__init__.py +23 -0
- nervus-0.1.0/src/nervus/codegen/a2l.py +180 -0
- nervus-0.1.0/src/nervus/codegen/fmu.py +302 -0
- nervus-0.1.0/src/nervus/codegen/functions.py +164 -0
- nervus-0.1.0/src/nervus/codegen/generator.py +1245 -0
- nervus-0.1.0/src/nervus/codegen/integer.py +490 -0
- nervus-0.1.0/src/nervus/codegen/misra.py +87 -0
- nervus-0.1.0/src/nervus/codegen/sil.py +182 -0
- nervus-0.1.0/src/nervus/codegen/templates.py +1263 -0
- nervus-0.1.0/src/nervus/core/__init__.py +46 -0
- nervus-0.1.0/src/nervus/core/block.py +436 -0
- nervus-0.1.0/src/nervus/core/datatypes.py +229 -0
- nervus-0.1.0/src/nervus/core/diagram.py +472 -0
- nervus-0.1.0/src/nervus/core/dictionary.py +150 -0
- nervus-0.1.0/src/nervus/core/errors.py +43 -0
- nervus-0.1.0/src/nervus/core/expressions.py +189 -0
- nervus-0.1.0/src/nervus/core/layout.py +106 -0
- nervus-0.1.0/src/nervus/core/params.py +154 -0
- nervus-0.1.0/src/nervus/core/requirements.py +234 -0
- nervus-0.1.0/src/nervus/core/sample_time.py +75 -0
- nervus-0.1.0/src/nervus/core/settings.py +83 -0
- nervus-0.1.0/src/nervus/core/signals.py +106 -0
- nervus-0.1.0/src/nervus/core/testcase.py +111 -0
- nervus-0.1.0/src/nervus/core/types.py +28 -0
- nervus-0.1.0/src/nervus/core/workspace.py +292 -0
- nervus-0.1.0/src/nervus/coverage.py +245 -0
- nervus-0.1.0/src/nervus/cycles.py +66 -0
- nervus-0.1.0/src/nervus/data/cycles/ftp75.csv +1877 -0
- nervus-0.1.0/src/nervus/data/cycles/wltc_class3b.csv +1803 -0
- nervus-0.1.0/src/nervus/examples.py +30 -0
- nervus-0.1.0/src/nervus/gui/__init__.py +6 -0
- nervus-0.1.0/src/nervus/gui/__main__.py +5 -0
- nervus-0.1.0/src/nervus/gui/app.py +42 -0
- nervus-0.1.0/src/nervus/gui/controllers/__init__.py +6 -0
- nervus-0.1.0/src/nervus/gui/controllers/codegen_controller.py +87 -0
- nervus-0.1.0/src/nervus/gui/controllers/commands.py +565 -0
- nervus-0.1.0/src/nervus/gui/controllers/editor_controller.py +681 -0
- nervus-0.1.0/src/nervus/gui/controllers/file_controller.py +91 -0
- nervus-0.1.0/src/nervus/gui/controllers/simulation_controller.py +134 -0
- nervus-0.1.0/src/nervus/gui/controllers/test_controller.py +93 -0
- nervus-0.1.0/src/nervus/gui/models/__init__.py +4 -0
- nervus-0.1.0/src/nervus/gui/models/diagram_model.py +327 -0
- nervus-0.1.0/src/nervus/gui/models/simulation_model.py +99 -0
- nervus-0.1.0/src/nervus/gui/qtfix.py +33 -0
- nervus-0.1.0/src/nervus/gui/resources/__init__.py +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/__init__.py +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/abs_braking.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/can_arbitration.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/can_frame.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/can_network.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/charging_system.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/chart-editor-transition.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/chart-editor.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/chart_engine_modes.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/chart_hierarchy.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/circuits.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/coolant_fan.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/counter.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/cruise_tolerance.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/datatype_conversion.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/dead_zone.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/debounce.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/diagnostic_monitor.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/discrete_filter.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/discrete_integrator.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/drive_cycle.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/drive_cycle_block.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/edge_detect.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/engine_comparison.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/engine_modes.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/ev_range.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/first-model-1-blocks.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/first-model-2-wired.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/first-model-3-parameters.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/first-model-4-scope.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/first-model-5-inspector.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/fixed_point_sensor.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/fmi_exchange.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/from_workspace.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/fuel_film.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/gain_modes.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/gear_shift.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/idle_speed_control.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/ignition_knock.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/injector_driver.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/integrator_limits.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/lab_coupled_tanks.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/lab_dc_motor.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/lab_inverted_pendulum.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/lab_mass_spring_damper.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/lambda_trims.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/lookup_1d.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/lookup_2d.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/mux_demux.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/ntc_divider.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/ntc_fault.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/obd_ecu.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/physical_models.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/pid_anti_windup.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/pid_structure.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/prelookup.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/pulse.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/ramp.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/rate_limiter.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/rate_transition.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/rc_rlc.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/relay.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/saturation.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/sensor_model.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/signal-editor.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/sine.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/step.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/sum_signs.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/switch.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/traction_control.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/transfer_function.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/truck.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/unit_delay.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/xcp_calibration.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/xcp_live.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/figures/zero_order_hold.png +0 -0
- nervus-0.1.0/src/nervus/gui/resources/help/__init__.py +0 -0
- nervus-0.1.0/src/nervus/gui/resources/help/analysis.md +38 -0
- nervus-0.1.0/src/nervus/gui/resources/help/can.md +195 -0
- nervus-0.1.0/src/nervus/gui/resources/help/codegen.md +193 -0
- nervus-0.1.0/src/nervus/gui/resources/help/coming_from_simulink.md +106 -0
- nervus-0.1.0/src/nervus/gui/resources/help/concepts.md +120 -0
- nervus-0.1.0/src/nervus/gui/resources/help/datatypes.md +62 -0
- nervus-0.1.0/src/nervus/gui/resources/help/editor.md +146 -0
- nervus-0.1.0/src/nervus/gui/resources/help/getting_started.md +86 -0
- nervus-0.1.0/src/nervus/gui/resources/help/libraries.md +84 -0
- nervus-0.1.0/src/nervus/gui/resources/help/model_files.md +41 -0
- nervus-0.1.0/src/nervus/gui/resources/help/obd.md +201 -0
- nervus-0.1.0/src/nervus/gui/resources/help/physical.md +203 -0
- nervus-0.1.0/src/nervus/gui/resources/help/shortcuts.md +32 -0
- nervus-0.1.0/src/nervus/gui/resources/help/simulation.md +62 -0
- nervus-0.1.0/src/nervus/gui/resources/help/statecharts.md +197 -0
- nervus-0.1.0/src/nervus/gui/resources/help/subsystems.md +167 -0
- nervus-0.1.0/src/nervus/gui/resources/help/testing.md +151 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_abs.md +74 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_can_network.md +61 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_charging_system.md +75 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_circuits.md +104 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_component_libraries.md +78 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_coolant_fan.md +58 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_coupled_tanks.md +75 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_dc_motor.md +79 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_drive_cycle.md +100 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_engine_modes.md +78 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_ev_range.md +76 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_first_model.md +176 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_fixed_point.md +68 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_fmi.md +80 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_fuel_film.md +61 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_gear_shift.md +157 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_idle.md +88 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_ignition.md +69 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_injector_driver.md +82 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_inverted_pendulum.md +82 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_lambda.md +97 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_mass_spring_damper.md +87 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_model_to_code.md +109 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_ntc_sensor.md +71 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_obd_diagnostics.md +76 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_physical.md +73 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_rc_rlc.md +70 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_requirements_testing.md +94 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_robustness_monte_carlo.md +94 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_sensor_diagnostics.md +59 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_traction.md +64 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_truck.md +51 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorial_xcp_calibration.md +98 -0
- nervus-0.1.0/src/nervus/gui/resources/help/tutorials.md +142 -0
- nervus-0.1.0/src/nervus/gui/resources/help/verification.md +129 -0
- nervus-0.1.0/src/nervus/gui/resources/help/workspace.md +155 -0
- nervus-0.1.0/src/nervus/gui/theme.py +246 -0
- nervus-0.1.0/src/nervus/gui/views/__init__.py +1 -0
- nervus-0.1.0/src/nervus/gui/views/advisor_dialog.py +73 -0
- nervus-0.1.0/src/nervus/gui/views/analysis_dialog.py +330 -0
- nervus-0.1.0/src/nervus/gui/views/can_trace_dialog.py +139 -0
- nervus-0.1.0/src/nervus/gui/views/canvas.py +743 -0
- nervus-0.1.0/src/nervus/gui/views/chart_editor.py +856 -0
- nervus-0.1.0/src/nervus/gui/views/codegen_dialog.py +191 -0
- nervus-0.1.0/src/nervus/gui/views/completer.py +61 -0
- nervus-0.1.0/src/nervus/gui/views/console_panel.py +173 -0
- nervus-0.1.0/src/nervus/gui/views/data_inspector.py +268 -0
- nervus-0.1.0/src/nervus/gui/views/diagnostics.py +88 -0
- nervus-0.1.0/src/nervus/gui/views/dictionary_panel.py +124 -0
- nervus-0.1.0/src/nervus/gui/views/glyphs.py +160 -0
- nervus-0.1.0/src/nervus/gui/views/help_browser.py +145 -0
- nervus-0.1.0/src/nervus/gui/views/icons.py +123 -0
- nervus-0.1.0/src/nervus/gui/views/items.py +637 -0
- nervus-0.1.0/src/nervus/gui/views/library.py +182 -0
- nervus-0.1.0/src/nervus/gui/views/main_window.py +1266 -0
- nervus-0.1.0/src/nervus/gui/views/mask_dialog.py +95 -0
- nervus-0.1.0/src/nervus/gui/views/math_render.py +70 -0
- nervus-0.1.0/src/nervus/gui/views/obd_dialog.py +351 -0
- nervus-0.1.0/src/nervus/gui/views/properties.py +395 -0
- nervus-0.1.0/src/nervus/gui/views/requirements_panel.py +185 -0
- nervus-0.1.0/src/nervus/gui/views/routing.py +211 -0
- nervus-0.1.0/src/nervus/gui/views/scope_window.py +121 -0
- nervus-0.1.0/src/nervus/gui/views/settings_dialog.py +125 -0
- nervus-0.1.0/src/nervus/gui/views/signal_editor.py +515 -0
- nervus-0.1.0/src/nervus/gui/views/sweep_dialog.py +403 -0
- nervus-0.1.0/src/nervus/gui/views/test_manager.py +510 -0
- nervus-0.1.0/src/nervus/gui/views/usages_dialog.py +44 -0
- nervus-0.1.0/src/nervus/gui/views/variant_dialog.py +112 -0
- nervus-0.1.0/src/nervus/gui/views/workspace_panel.py +210 -0
- nervus-0.1.0/src/nervus/help.py +187 -0
- nervus-0.1.0/src/nervus/io/__init__.py +5 -0
- nervus-0.1.0/src/nervus/io/model_file.py +311 -0
- nervus-0.1.0/src/nervus/library.py +185 -0
- nervus-0.1.0/src/nervus/mdf.py +98 -0
- nervus-0.1.0/src/nervus/obd.py +464 -0
- nervus-0.1.0/src/nervus/obd_can.py +213 -0
- nervus-0.1.0/src/nervus/obd_sim.py +208 -0
- nervus-0.1.0/src/nervus/physical/network.py +587 -0
- nervus-0.1.0/src/nervus/py.typed +0 -0
- nervus-0.1.0/src/nervus/sim/__init__.py +7 -0
- nervus-0.1.0/src/nervus/sim/compiler.py +834 -0
- nervus-0.1.0/src/nervus/sim/flatten.py +167 -0
- nervus-0.1.0/src/nervus/sim/result.py +179 -0
- nervus-0.1.0/src/nervus/sim/simulator.py +597 -0
- nervus-0.1.0/src/nervus/simulink.py +425 -0
- nervus-0.1.0/src/nervus/solvers/__init__.py +13 -0
- nervus-0.1.0/src/nervus/solvers/fixed.py +32 -0
- nervus-0.1.0/src/nervus/solvers/variable.py +89 -0
- nervus-0.1.0/src/nervus/spice.py +368 -0
- nervus-0.1.0/src/nervus/sweep.py +177 -0
- nervus-0.1.0/src/nervus/testing.py +259 -0
- nervus-0.1.0/src/nervus/tutorials.py +205 -0
- nervus-0.1.0/src/nervus/xcp.py +300 -0
- nervus-0.1.0/tests/conftest.py +46 -0
- nervus-0.1.0/tests/gui/__init__.py +0 -0
- nervus-0.1.0/tests/gui/conftest.py +53 -0
- nervus-0.1.0/tests/gui/test_analysis_gui.py +58 -0
- nervus-0.1.0/tests/gui/test_can_trace_dialog.py +45 -0
- nervus-0.1.0/tests/gui/test_chart_editor.py +102 -0
- nervus-0.1.0/tests/gui/test_codegen_checks.py +44 -0
- nervus-0.1.0/tests/gui/test_codegen_gui.py +68 -0
- nervus-0.1.0/tests/gui/test_console.py +69 -0
- nervus-0.1.0/tests/gui/test_dictionary_panel.py +43 -0
- nervus-0.1.0/tests/gui/test_editor.py +218 -0
- nervus-0.1.0/tests/gui/test_help.py +44 -0
- nervus-0.1.0/tests/gui/test_inspector_mdf.py +21 -0
- nervus-0.1.0/tests/gui/test_integer_dialog.py +34 -0
- nervus-0.1.0/tests/gui/test_obd_dialog.py +38 -0
- nervus-0.1.0/tests/gui/test_physical_gui.py +46 -0
- nervus-0.1.0/tests/gui/test_port_grid.py +33 -0
- nervus-0.1.0/tests/gui/test_properties_typing.py +54 -0
- nervus-0.1.0/tests/gui/test_requirements_panel.py +39 -0
- nervus-0.1.0/tests/gui/test_routing.py +70 -0
- nervus-0.1.0/tests/gui/test_signal_editor.py +106 -0
- nervus-0.1.0/tests/gui/test_simulink_import_gui.py +12 -0
- nervus-0.1.0/tests/gui/test_subsystem_gui.py +290 -0
- nervus-0.1.0/tests/gui/test_sweep_dialog.py +79 -0
- nervus-0.1.0/tests/gui/test_testing_gui.py +114 -0
- nervus-0.1.0/tests/gui/test_usages.py +67 -0
- nervus-0.1.0/tests/gui/test_window.py +94 -0
- nervus-0.1.0/tests/gui/test_workspace_gui.py +89 -0
- nervus-0.1.0/tests/test_adaptive_map.py +68 -0
- nervus-0.1.0/tests/test_advisor.py +86 -0
- nervus-0.1.0/tests/test_algebraic_loops.py +83 -0
- nervus-0.1.0/tests/test_analysis.py +156 -0
- nervus-0.1.0/tests/test_atomic.py +70 -0
- nervus-0.1.0/tests/test_automotive_physics.py +144 -0
- nervus-0.1.0/tests/test_blocks.py +224 -0
- nervus-0.1.0/tests/test_can.py +103 -0
- nervus-0.1.0/tests/test_can_fd.py +133 -0
- nervus-0.1.0/tests/test_canbus.py +228 -0
- nervus-0.1.0/tests/test_chart.py +165 -0
- nervus-0.1.0/tests/test_chart_hierarchy.py +128 -0
- nervus-0.1.0/tests/test_chart_model.py +118 -0
- nervus-0.1.0/tests/test_cli.py +37 -0
- nervus-0.1.0/tests/test_codegen.py +372 -0
- nervus-0.1.0/tests/test_codegen_functions.py +113 -0
- nervus-0.1.0/tests/test_compiler.py +132 -0
- nervus-0.1.0/tests/test_continuous_reset.py +52 -0
- nervus-0.1.0/tests/test_core.py +179 -0
- nervus-0.1.0/tests/test_coverage.py +54 -0
- nervus-0.1.0/tests/test_cycles.py +45 -0
- nervus-0.1.0/tests/test_datatypes.py +134 -0
- nervus-0.1.0/tests/test_diagnostics.py +107 -0
- nervus-0.1.0/tests/test_dictionary.py +83 -0
- nervus-0.1.0/tests/test_docs.py +49 -0
- nervus-0.1.0/tests/test_ecu_blocks.py +224 -0
- nervus-0.1.0/tests/test_enabled.py +174 -0
- nervus-0.1.0/tests/test_examples.py +533 -0
- nervus-0.1.0/tests/test_expressions.py +43 -0
- nervus-0.1.0/tests/test_fmi.py +81 -0
- nervus-0.1.0/tests/test_function_call.py +54 -0
- nervus-0.1.0/tests/test_integer_code.py +111 -0
- nervus-0.1.0/tests/test_integrator_ports.py +142 -0
- nervus-0.1.0/tests/test_integrator_reset.py +75 -0
- nervus-0.1.0/tests/test_io.py +91 -0
- nervus-0.1.0/tests/test_library.py +71 -0
- nervus-0.1.0/tests/test_masks.py +67 -0
- nervus-0.1.0/tests/test_mcdc.py +65 -0
- nervus-0.1.0/tests/test_mdf.py +51 -0
- nervus-0.1.0/tests/test_misra.py +105 -0
- nervus-0.1.0/tests/test_obd.py +165 -0
- nervus-0.1.0/tests/test_obd_sim.py +139 -0
- nervus-0.1.0/tests/test_physical.py +277 -0
- nervus-0.1.0/tests/test_prelookup.py +72 -0
- nervus-0.1.0/tests/test_requirements.py +65 -0
- nervus-0.1.0/tests/test_semiconductors.py +151 -0
- nervus-0.1.0/tests/test_sensors.py +55 -0
- nervus-0.1.0/tests/test_signal_builder.py +58 -0
- nervus-0.1.0/tests/test_simulation.py +285 -0
- nervus-0.1.0/tests/test_simulink_import.py +140 -0
- nervus-0.1.0/tests/test_solvers.py +22 -0
- nervus-0.1.0/tests/test_spice.py +83 -0
- nervus-0.1.0/tests/test_subsystems.py +140 -0
- nervus-0.1.0/tests/test_sweep.py +60 -0
- nervus-0.1.0/tests/test_tasks_codegen.py +93 -0
- nervus-0.1.0/tests/test_testing.py +159 -0
- nervus-0.1.0/tests/test_tutorials.py +21 -0
- nervus-0.1.0/tests/test_typed_params.py +80 -0
- nervus-0.1.0/tests/test_variable_events.py +43 -0
- nervus-0.1.0/tests/test_variants.py +110 -0
- nervus-0.1.0/tests/test_workspace.py +146 -0
- nervus-0.1.0/tests/test_xcp.py +132 -0
- nervus-0.1.0/tests/test_zero_crossing.py +119 -0
nervus-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
.venv/
|
|
4
|
+
.env
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.coverage
|
|
12
|
+
htmlcov/
|
|
13
|
+
site/
|
|
14
|
+
.DS_Store
|
|
15
|
+
.idea/
|
|
16
|
+
.vscode/
|
|
17
|
+
|
|
18
|
+
# FMUs are built for one platform; the examples create them
|
|
19
|
+
*.fmu
|
|
20
|
+
|
|
21
|
+
# Conflict copies made by macOS file sync ("name 2.md")
|
|
22
|
+
* [0-9].*
|
|
23
|
+
|
|
24
|
+
# graphify knowledge-graph output
|
|
25
|
+
graphify-out/
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-11-24
|
|
9
|
+
|
|
10
|
+
The first release on PyPI: `pip install "nervus[gui]"`.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Simulation 10-25 % faster: physical networks are assembled in plain lists and solved once per time point;
|
|
14
|
+
cheaper Step sources and integrators.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- A model that needs an optional package says which and how to install it (e.g. `pip install "nervus[can]"`),
|
|
18
|
+
instead of an error about missing ports.
|
|
19
|
+
- Setting several block parameters at once (and undoing it) validates them together, so combinations that are
|
|
20
|
+
only valid as a whole work; a failed change also restores the expressions.
|
|
21
|
+
- Wires between blocks can be drawn straight: every port sits on the grid (ports 20 px apart, centred), so a
|
|
22
|
+
two-input Sum's output is level with the next block's input.
|
|
23
|
+
- Editor crash when a parameter was entered with Enter in the Properties panel (e.g. the PID's `I` in Tutorial
|
|
24
|
+
1): the panel touched the field it had just rebuilt.
|
|
25
|
+
- `nervus` without the editor's packages explains how to install them (`uv sync --extra gui`) instead of a
|
|
26
|
+
traceback; troubleshooting section in Getting started.
|
|
27
|
+
- Variable-step solvers: a zero crossing whose bracket is lost to rounding (platform dependent) is located at
|
|
28
|
+
the step's end instead of stopping the simulation with "f(a) and f(b) must have different signs".
|
|
29
|
+
- Generated code: blocks with a sample-time offset output their initial values from the first step, as in
|
|
30
|
+
the simulation (they were 0 until their first hit).
|
|
31
|
+
- `examples/fixed_point_sensor.py` subtracted the sensor offset in counts instead of kPa, so the ADC read 0;
|
|
32
|
+
the test now checks that the pressure crosses the limit.
|
|
33
|
+
- XCP: frames from real hardware could be missed when another block polled the interface at the same instant;
|
|
34
|
+
the XCP master discards late answers to earlier commands.
|
|
35
|
+
- Gain, Sum, Product and Bias inherited the boolean type of a comparison, so `3 · true` gave 1; arithmetic on
|
|
36
|
+
booleans now gives double.
|
|
37
|
+
- A continuous PID with clamping anti-windup followed a wrong trajectory with variable-step solvers when it
|
|
38
|
+
slid along its output limit (the integrator stayed clamped too long; only the final value was right), or
|
|
39
|
+
chattered for tens of seconds. Clamping now uses a boundary layer during variable-step integration and
|
|
40
|
+
matches a fine fixed-step reference. The derivative filter no longer integrates when D = 0.
|
|
41
|
+
- Blocks with a parameter given as a not-yet-resolved workspace expression were validated with the default
|
|
42
|
+
value (e.g. a 2-D Interpolation with `table="ign_map"` failed); they are now validated once resolved.
|
|
43
|
+
- On Linux and Windows, Help and Help for Selected Block were both on F1, so F1 did nothing; Help is now Ctrl+?.
|
|
44
|
+
- Test checks failed to notice NaN/inf: a bounds check passed on a diverged signal. Checks now fail.
|
|
45
|
+
- `generate_c` for an atomic subsystem ignored its own sample time.
|
|
46
|
+
- Out blocks could be scheduled before the block driving them, so generated C output last step's value.
|
|
47
|
+
- Generated C for 2-point lookup axes compared an unsigned value with 0 (rejected by GCC with -Werror).
|
|
48
|
+
- A Transfer Fcn without dynamics (e.g. `3/2`) failed to build its state-space form.
|
|
49
|
+
- 1-D lookup with `nearest` interpolation and linear extrapolation rounded halves to even.
|
|
50
|
+
- An empty diagram passed to the editor model or a Subsystem was replaced by a default one.
|
|
51
|
+
- Discrete blocks with an inherited sample time used −1 as their period (Rate Limiter, Discrete Filter, ...).
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
- Integer-only code generation (no floating point, for processors without an FPU): "Integer arithmetic only" in
|
|
55
|
+
the code generation dialog, `generate_c(..., integer_only=True)`; bit-true with the simulation.
|
|
56
|
+
- Simulink `.slx` import (File ▸ Import Simulink Model, `nervus.simulink.read_slx`): the common blocks with their
|
|
57
|
+
parameters and positions, subsystems and masks; untranslated blocks become empty subsystems, listed in a report.
|
|
58
|
+
- Condition coverage and MC/DC for Logical Operator decisions: in the Test Manager, the coverage report (with
|
|
59
|
+
the evaluations a test still needs) and `Coverage.mcdc_percent` / `mcdc_missing()`.
|
|
60
|
+
- Packaging for PyPI: `pip install "nervus[gui]"`; the examples are in the package (File ▸ Open Example,
|
|
61
|
+
`nervus --copy-examples DIR`); `nervus --version`; a release workflow (tag `vX.Y.Z`) with trusted publishing.
|
|
62
|
+
- Code generation: subsystems with a *function_name* become one reusable C function, called once per subsystem
|
|
63
|
+
with its own signals, states and calibration (in the A2L file; back-to-back tested, MISRA checked).
|
|
64
|
+
- Signal Builder block and signal editor: piecewise-linear test signals in groups (scenarios), drawn by dragging
|
|
65
|
+
points (double-click the block), with a table and a text view.
|
|
66
|
+
- Properties panel: clicking in (or hovering over) a field shows what can be written there, with examples (e.g.
|
|
67
|
+
Sum *signs*: `+-` subtracts the second input), the unit, the range and the default.
|
|
68
|
+
- Graphical chart editor: double-click a State Chart block to edit states, transitions, priorities and the
|
|
69
|
+
chart's interface as a diagram (with a synchronised text view); the layout is saved in the model.
|
|
70
|
+
- MISRA C:2012: the generated code follows it (checked with cppcheck's MISRA addon for every block template);
|
|
71
|
+
`nervus.codegen.misra.misra_check` and a MISRA check button in the code generation dialog.
|
|
72
|
+
- FMI 2.0: Code ▸ Export FMU (co-simulation, from the generated C code) and the FMU block (import, with fmpy:
|
|
73
|
+
extra `fmi`). Example `fmi_exchange.py` and tutorial.
|
|
74
|
+
- Results can be read by a subsystem's name (`res["ECU"]`, `res["ECU:1"]`). Tutorial on reusable components
|
|
75
|
+
(subsystems, masks and libraries).
|
|
76
|
+
- Blocks: Variable Resistor (resistance from a signal) and Thermistor (NTC, β model). Example `ntc_sensor.py` and
|
|
77
|
+
tutorials: NTC sensor interface, sensor fault diagnosis (P0117/P0118), on-board diagnostics.
|
|
78
|
+
- Tutorials grouped by topic (a registry in `nervus.tutorials` generates the overview, navigation and help
|
|
79
|
+
list). New tutorials: mass-spring-damper, DC motor, coupled tanks and inverted pendulum (control lab
|
|
80
|
+
experiments), engine operating modes, radiator fan, from model to ECU C code, fixed point, and live calibration
|
|
81
|
+
over XCP (`examples/xcp_tool.py`, a command-line calibration tool).
|
|
82
|
+
- CAN Bus block: the `udp_multicast` interface connects several programs on one computer (needs msgpack, now in
|
|
83
|
+
the `can` extra).
|
|
84
|
+
- State Charts: nested and parallel states, history, events (`send`), transitions across levels; generated C
|
|
85
|
+
matches the simulation.
|
|
86
|
+
- Requirements traceability: a Requirements tab (CSV import, HTML report), links from blocks (right-click ▸
|
|
87
|
+
Requirements…) and test cases, status per requirement from the test results, and a Model Advisor rule.
|
|
88
|
+
- Algebraic loop solver (Simulation ▸ Settings ▸ Algebraic loops = solve): loops are torn and solved with
|
|
89
|
+
Newton's method at every evaluation, reported as warnings; code generation refuses them.
|
|
90
|
+
- Tutorial 1, *your first model*: a cruise control built step by step in the editor, with screenshots
|
|
91
|
+
(`examples/cruise_control.py`); a tutorial overview with learning paths; every tutorial now starts with what
|
|
92
|
+
you will learn, what to do first and how to follow along, and ends with a link to the next one. The app's
|
|
93
|
+
tutorial pages are generated from the docs.
|
|
94
|
+
- README and docs home list all features.
|
|
95
|
+
- Data dictionary: signal objects (type, unit, range, description) bound to named block outputs (*Name
|
|
96
|
+
Signal…* on a wire); type checks, range warnings, results by signal name, named A2L measurements.
|
|
97
|
+
- Scripting console (View ▸ Console): Python with the model, the results and the block classes in scope;
|
|
98
|
+
changes to the model are one undo step.
|
|
99
|
+
- MDF4 import and export (`nervus.mdf`, extra `mdf`): Data Inspector *Load…* reads `.mf4` measurements,
|
|
100
|
+
*Export* writes them.
|
|
101
|
+
- XCP on CAN (`nervus.xcp`): the XCP Slave block makes a running model measurable and calibratable by INCA,
|
|
102
|
+
CANape or `XcpMaster`; `XcpMaster` reads and writes a real ECU by A2L name; `read_a2l`.
|
|
103
|
+
- CAN FD frames (up to 64 bytes, bit-rate switching on the bus), multiplexed signals (held when not sent),
|
|
104
|
+
value tables in the trace, and Model Workspace ▸ Import DBC (signals and value tables as variables); pack and
|
|
105
|
+
unpack C code now extracts runs of bits, for any frame length. Example DBC `examples/data/chassis.dbc`.
|
|
106
|
+
- Simulated CAN buses (`nervus.canbus`): CAN Transmit / Receive / Bus / Rest Bus / Gateway blocks with
|
|
107
|
+
arbitration, stuff-bit timing, bus load, fault injection (lost, delayed, corrupted frames, bus-off), E2E
|
|
108
|
+
Protect / Check (CRC-8 and alive counter, with C code), Tools ▸ CAN Bus Trace with ASC/BLF export, and real
|
|
109
|
+
interfaces through python-can. Example `can_network.py` and tutorial.
|
|
110
|
+
- Relative file paths (DBC files) inside subsystems now resolve while a model file is loading.
|
|
111
|
+
- Example `truck.py` and tutorial: 40 t truck with heavy-duty diesel, 12-speed AMT and exhaust brake.
|
|
112
|
+
- The official WLTC class 3b (UNECE GTR 15) and FTP-75 (US EPA) speed tables, `nervus.cycles`, and the Drive
|
|
113
|
+
Cycle block (speed and acceleration); the drive-cycle example runs them with `build("wltc3b")`.
|
|
114
|
+
- Adaptive Map block (a learning 2-D table, with C code); example `fuel_film.py` and tutorial: wall wetting
|
|
115
|
+
and x-tau compensation, jump-and-ramp lambda control, long-term trims per load cell.
|
|
116
|
+
- Example `ignition_knock.py` and tutorial: spark advance map, knock sensor and knock control.
|
|
117
|
+
- Sensor Model and Actuator Model blocks: gain/offset errors, reproducible noise, delay, quantization, range,
|
|
118
|
+
rate limit, and injected faults (stuck, open circuit, short to supply, drift).
|
|
119
|
+
- Example `traction_control.py` (tyre slip, magic formula, TCS ECU) with a tutorial; a BSFC fuel map in
|
|
120
|
+
`gear_shift.py` (fuel consumption per gear in the tutorial).
|
|
121
|
+
- Examples `starter_motor.py` and `electronic_throttle.py` with a tutorial; the PID tuner linearizes around
|
|
122
|
+
zero controller output and cancels unobservable pole-zero pairs (`minreal`).
|
|
123
|
+
- Automotive electrics (solenoid, fuel injector, relay, glow plug, alternator) and hydraulics (tank, pump,
|
|
124
|
+
pressure source, orifice, relief valve, volume, sensors) on the physical network solver.
|
|
125
|
+
- Example `circuits.py` and tutorial: rectifier (from a netlist), relay driver with freewheeling diode, buck
|
|
126
|
+
converter, Sallen-Key filter.
|
|
127
|
+
- SPICE-like electronics: Shockley diode (Zener, LED), BJT, MOSFET and op-amp solved with Newton-Raphson
|
|
128
|
+
(junction limiting), E/G controlled sources, sparse solving for big circuits, `nervus.circuit` operating
|
|
129
|
+
point and DC sweep, SPICE netlist import/export (File menu, `nervus.spice`).
|
|
130
|
+
- Drawing circuits in the editor: physical ports in domain colours, links dragged between them (undo,
|
|
131
|
+
delete, context menu), Connection Ports for physical ports on subsystems, symbols for physical blocks.
|
|
132
|
+
- Physical modelling: electrical, rotational and thermal components with physical ports joined by links
|
|
133
|
+
(`Diagram.link`), solved by modified nodal analysis together with the block diagram: R, C, L, sources,
|
|
134
|
+
switch, diode, battery, DC motor, H-bridge, inertia, spring, damper, gear, thermal mass and resistance,
|
|
135
|
+
sensors.
|
|
136
|
+
- Tools → Record from OBD-II…: record PIDs from an ELM327, a CAN interface or a simulated ECU with live
|
|
137
|
+
plots; save the drive or open it in the Data Inspector.
|
|
138
|
+
- A simulated OBD-II ECU (`nervus.obd_sim`) answering the ELM327 protocol (also on a pseudo-terminal) and
|
|
139
|
+
CAN; the OBD Responder block feeds it from a model; `python -m nervus.obd simulate`; example `obd_ecu.py`.
|
|
140
|
+
- OBD over CAN without an ELM327 (`nervus.obd_can`, ISO 15765-4 with ISO-TP); `--can-interface` in the CLI.
|
|
141
|
+
- Diagnostic Monitor block: debounced trouble codes with pending/confirmed (two-trip) status, MIL and
|
|
142
|
+
healing over operation cycles, readiness, clear, and the UDS status byte; generates C code.
|
|
143
|
+
- Linear Analysis: Nyquist and root-locus tabs (with poles and zeros), the closed-loop step response, and PID
|
|
144
|
+
Tuning: the plant seen by a PID block (`plant_at`) and loop-shaping gains (`tune_pid`) with Apply to Block.
|
|
145
|
+
- Analysis → Parameter Sweep / Monte Carlo: vary workspace variables, overlay a signal of every run, plot a
|
|
146
|
+
metric against the parameters or as a histogram, export the table; `nervus.sweep.metric()` and `run_points()`.
|
|
147
|
+
- Parameter fields complete workspace and mask variable names; Model Workspace → Find Usages lists where a
|
|
148
|
+
variable is used (`Diagram.usages()`).
|
|
149
|
+
- Scopes open when a simulation starts and plot live while it runs; simulation pacing (Simulation Settings)
|
|
150
|
+
runs a model no faster than a multiple of real time.
|
|
151
|
+
- Wires are routed around blocks; wire segments can be dragged (manual corners, saved with the model, moving
|
|
152
|
+
a branch point moves all its wires), and right-click → Reset Route returns to automatic routing.
|
|
153
|
+
- Editor: rotate blocks (Ctrl+Shift+R, vertical signal flow), resize them with a corner grip, and move them
|
|
154
|
+
with the arrow keys; wires route into ports on the top and bottom of rotated blocks.
|
|
155
|
+
- View → Show Signal Widths and Sample Time Colours: vector wires labelled and drawn thicker; blocks and
|
|
156
|
+
wires coloured by sample time, with a legend in the status bar.
|
|
157
|
+
- Example `gear_shift.py` and tutorial: automatic-gearbox shift logic (shift maps, kickdown, hysteresis)
|
|
158
|
+
on a car with engine, gearbox and road grade; the TCU generates C code.
|
|
159
|
+
- Initial Condition block (Signal Attributes): a defined output in the first step, then the input; in C too.
|
|
160
|
+
- Interpolation using Prelookup handles 3-D and 4-D tables (n-D maps), in simulation and C.
|
|
161
|
+
- Integrator: *initial_source* `external` adds an **x0** input (start and reset value from a signal);
|
|
162
|
+
*saturation_port* adds an output that shows when the integrator is at a limit.
|
|
163
|
+
- Blocks can declare which inputs feed through (`feedthrough_ports()`), and that they are never constant.
|
|
164
|
+
- State charts: `param` declarations read calibration parameters from the workspace or a mask; in C they are
|
|
165
|
+
calibration parameters (typed, in the A2L file).
|
|
166
|
+
- Example `engine_modes.py`: engine operating modes with scenario test cases and C code.
|
|
167
|
+
- Model outputs are available in results under the name of their Out block (`res["fuel"]`).
|
|
168
|
+
- Function-call subsystems: *trigger* = `function_call` runs the subsystem once per change of the trigger
|
|
169
|
+
value, e.g. a call counter incremented by a State Chart; identical C code.
|
|
170
|
+
- Continuous Integrator: *external_reset* input (rising, falling, either, level). Variable-step solvers stop
|
|
171
|
+
exactly at the reset edge and restart from the initial value. Blocks can make their state jump at a major
|
|
172
|
+
step (`Block.major_step`).
|
|
173
|
+
- Workspace variables have a data type (`int16`, `fixdt(1,16,7)`, ...) and a calibratable flag (Type and Cal.
|
|
174
|
+
columns). Typed parameters are stored as integers in C and scaled where they are read (scalars, lookup
|
|
175
|
+
tables, breakpoints); the simulation uses the stored values (bit-true); the A2L file has the matching record
|
|
176
|
+
layouts and linear conversions. Non-calibratable variables become constants in ROM (`const <name>_C`).
|
|
177
|
+
- C code with one function per task for an RTOS (`generate_c(..., tasks=True)`, a checkbox in the Generate C
|
|
178
|
+
dialog), an RTOS `main_example.c`, and the Rate Transition block (fast_to_slow, slow_to_fast) that makes data
|
|
179
|
+
transfer between tasks deterministic; missing transitions are reported. Blocks can declare the rate their
|
|
180
|
+
outputs pass on (`output_sample_time`).
|
|
181
|
+
- Test suites as `.nervtest` files (Test Manager: Export…/Import…), an HTML test report (Report…), and
|
|
182
|
+
parameter sweeps and Monte Carlo runs from Python (`nervus.sweep`).
|
|
183
|
+
- Prelookup and Interpolation using Prelookup blocks (1-D/2-D maps over shared axes), with C code.
|
|
184
|
+
- Documentation: a feature overview in the README, the docs home page and the in-app Getting started page;
|
|
185
|
+
in-app pages *Concepts*, *Coming from Simulink* (rewritten: masks, variants, libraries, tasks, codegen,
|
|
186
|
+
verification) and *Model files*; the GitHub editor page now has all sections of the in-app one; calibration
|
|
187
|
+
maps over shared axes; all examples listed. Tests keep the Help window, the GitHub navigation and the
|
|
188
|
+
example lists complete.
|
|
189
|
+
- Discrete-Time Integrator: *external_reset* input (rising, falling, either, level); identical C code.
|
|
190
|
+
- Port tooltips show input names (e.g. "input 2: reset (rising)").
|
|
191
|
+
- Flip blocks (Ctrl+Shift+F): inputs on the right and outputs on the left, for feedback paths; saved with the model.
|
|
192
|
+
The lambda and drive-cycle examples use it.
|
|
193
|
+
- Example and tutorial: a car with a driver model on the ECE-15 urban drive cycle (driver and vehicle
|
|
194
|
+
subsystems, road loads, wheel energy, effect of mass).
|
|
195
|
+
- Right-click menus on blocks, subsystems, wires and the canvas (rename, open, mask, variants, library, code,
|
|
196
|
+
delete wire, layout, ...).
|
|
197
|
+
- Example and tutorial: lambda closed-loop control with short- and long-term fuel trims (vacuum leak, clogged
|
|
198
|
+
injector), with the link to the OBD-II fuel trim PIDs.
|
|
199
|
+
- Atomic subsystems: a subsystem *sample_time* makes it a task; inherited blocks inside run at that period,
|
|
200
|
+
inputs are sampled and outputs held; the period is shown on the block; multirate C code.
|
|
201
|
+
- OBD-II: read stored, pending and permanent trouble codes (with descriptions of common codes), freeze frame
|
|
202
|
+
values and the VIN; `python -m nervus.obd dtc`. Clearing codes is deliberately not supported.
|
|
203
|
+
- Example `engine_library.py`: a mean-value engine and a throttle actuator as masked library components,
|
|
204
|
+
used twice in `engine_comparison.nervus` to compare a 1.6 l and a 2.0 l engine.
|
|
205
|
+
- Python Function blocks have a *parameters* vector (`p[0]`, `p[1]`, ...) that can use workspace and mask
|
|
206
|
+
variables.
|
|
207
|
+
- Component libraries: `.nervlib` files whose subsystems are reusable components; linked copies are updated
|
|
208
|
+
from the library when a model opens, keep their own mask values, are read-only inside, and fall back to the
|
|
209
|
+
saved copy when the library is missing. Library panel, Save Subsystem to Library, Break Link, Update
|
|
210
|
+
Library Links.
|
|
211
|
+
- Variant subsystems: alternative implementations chosen by conditions on workspace variables (or by hand);
|
|
212
|
+
Variants dialog, active variant in the Properties panel and on the block; saved in model files.
|
|
213
|
+
- Expressions support comparisons (`==`, `!=`, `<`, ...) and `and`/`or`/`not`, also in MATLAB spelling
|
|
214
|
+
(`~=`, `&&`, `||`, `~`).
|
|
215
|
+
- Triggered subsystems: a trigger input (rising, falling or either edge) runs the subsystem only on edges;
|
|
216
|
+
works together with the enable input; edge detection in generated C matches the simulation.
|
|
217
|
+
- OBD-II (read-only): decoding of 21 standard mode 01 PIDs, an ELM327 client and `python -m nervus.obd record`
|
|
218
|
+
to record a drive into a `.nervres`/CSV file for the Data Inspector and test inputs (optional extra `obd`).
|
|
219
|
+
- Roadmap: OBD-II diagnostics (Phase 22).
|
|
220
|
+
- Enabled subsystems: an enable input gates every block inside (outputs and states held, optional reset when
|
|
221
|
+
enabled again), decided at major steps; gated C code.
|
|
222
|
+
- Roadmap: electrical/physical modelling (Phase 20) and CAN bus networks (Phase 21).
|
|
223
|
+
- Masked subsystems: mask parameters (values or expressions of workspace variables, nested masks), icon text
|
|
224
|
+
and description; Edit Mask dialog and mask parameters in the Properties panel; per-instance values in C.
|
|
225
|
+
- Model coverage (`nervus.coverage`): decision outcomes of switches, comparisons, saturations, limits, relays,
|
|
226
|
+
rate limiters, lookups and charts; `simulate(coverage=...)`, `run_tests(coverage=...)`, HTML report; the Test
|
|
227
|
+
Manager shows coverage and opens the report.
|
|
228
|
+
- Model Advisor (`nervus.advisor`, Analysis → Model Advisor) with 10 rules for ECU modelling practice.
|
|
229
|
+
- CAN: DBC files (optional `cantools`), CAN Pack and CAN Unpack blocks (Intel/Motorola, signed, factor/offset,
|
|
230
|
+
rounding and saturation), bit-exact C code; file pickers and message suggestions in the editor.
|
|
231
|
+
- Data types: double, single, boolean, int8…uint32 and fixed point (`fixdt`), with rounding and overflow modes;
|
|
232
|
+
type propagation; bit-true simulation; Data Type Conversion block; `output_type` on In, Constant, Gain, Sum,
|
|
233
|
+
Product, Bias and lookup tables; View → Show Data Types.
|
|
234
|
+
- Generated C: typed input/output structs and quantization helpers matching the simulation bit for bit.
|
|
235
|
+
- Example: fixed-point pressure sensor chain compared with double.
|
|
236
|
+
- Linear analysis (`nervus.analysis`): linearize between In and Out blocks around initial or trimmed
|
|
237
|
+
states, transfer function, poles, DC gain, Bode, gain/phase margins, step response; Analysis → Linear
|
|
238
|
+
Analysis dialog (Ctrl+L).
|
|
239
|
+
- Example and tutorial: idle speed control on a mean-value engine model (throttle flow, manifold, cylinder
|
|
240
|
+
flow, torque, crankshaft) with PI control, AC feed-forward, requirement tests and C code.
|
|
241
|
+
- A2L (ASAM MCD-2 MC) file with every C code generation: parameters as CHARACTERISTICs with units/limits from
|
|
242
|
+
the workspace, signals as MEASUREMENTs; `fill_addresses()` resolves addresses from the built binary.
|
|
243
|
+
- State Chart block: state machines with entry/during/exit actions, prioritised transitions with guards and
|
|
244
|
+
actions, local variables, `after(n)` and `t_in_state`; written in a small text language, evaluated safely,
|
|
245
|
+
and generated as C.
|
|
246
|
+
- Zero-crossing detection for variable-step solvers: discontinuous blocks freeze their mode during
|
|
247
|
+
integration and events are located exactly; a chattering guard reports a warning. A clamped continuous PID
|
|
248
|
+
that took 33 s now takes 0.1 s. Toggle with `settings.zero_crossing`.
|
|
249
|
+
- Stop Simulation and Assertion blocks.
|
|
250
|
+
- Test cases saved with the model (schema version 4): input signals for top-level In blocks, parameter
|
|
251
|
+
overrides or a parameter-set file, stop time, and checks (`bounds`, `final_value`, `reaches`, `max`, `min`,
|
|
252
|
+
`baseline`). `nervus.testing.run_tests()` runs them.
|
|
253
|
+
- `simulate(..., inputs={...})` drives top-level In blocks with `Signal`s (steps, ramps, CSV).
|
|
254
|
+
- Results: `SimResult.save()/load()` (`.nervres`), `to_mat()`, and `compare_results()`.
|
|
255
|
+
- Editor: Test Manager panel (background test runs, pass/fail, undoable edits) and Data Inspector (overlay and
|
|
256
|
+
compare runs, differences, save/load/export).
|
|
257
|
+
- The throttle_ecu example stores three requirement test cases.
|
|
258
|
+
- C code generation (`nervus.codegen.generate_c`) for models and subsystems: `<name>.h`/`<name>.c` with
|
|
259
|
+
`_initialize()`/`_step()`, static memory, input/output/parameter/state structs, shared calibration
|
|
260
|
+
parameters for workspace variables, base-rate multi-rate scheduling, a `main_example.c` template and an
|
|
261
|
+
HTML report with block-to-code traceability. Templates for 38 block types.
|
|
262
|
+
- Software-in-the-loop back-to-back testing (`nervus.codegen.sil`): compiles the generated code and compares
|
|
263
|
+
it with the Python model step by step; tested for every block template.
|
|
264
|
+
- Editor: Code → Generate C Code (Ctrl+B) with a code viewer, SIL check, save and report.
|
|
265
|
+
- Example `throttle_ecu.py` with its generated code committed in `examples/generated/ECU`.
|
|
266
|
+
- Subsystems: Subsystem, In and Out blocks; hierarchies are flattened at compile time; results and errors use
|
|
267
|
+
path names (`ECU/throttle_pi`); model file schema version 3 stores nested systems.
|
|
268
|
+
- Editor: open subsystems by double-click, breadcrumb navigation, Up to Parent, Create Subsystem from
|
|
269
|
+
Selection (Ctrl+G), Auto Layout (Ctrl+Shift+L); undo works across levels.
|
|
270
|
+
- ECU block library: 1-D and 2-D Lookup Tables (linear/nearest/flat, clip/linear extrapolation), Relational
|
|
271
|
+
Operator, Compare To Constant, Logical Operator, Dead Zone, Quantizer, Relay (hysteresis), Rate Limiter,
|
|
272
|
+
Integer Delay, Counter, Edge Detect, Debounce, Discrete Filter (PT1), Moving Average, MinMax, Bias, Ground,
|
|
273
|
+
each with equations, figures and help.
|
|
274
|
+
- Example: radiator fan control with sensor filtering, hysteresis and a lookup table.
|
|
275
|
+
- Model workspace: named variables (value, unit, min/max, description) stored in the model; block
|
|
276
|
+
parameters can be expressions of them (`Gain(gain="Kp")`, `"1/tau"`, `sample_time="Ts"`).
|
|
277
|
+
- Parameter sets (`.nervcal`): save, load and apply calibrations; `simulate(..., params={...})` overrides.
|
|
278
|
+
- Model Workspace panel in the editor, with undo and parameter-set load/save.
|
|
279
|
+
- Model file schema version 2 (adds `workspace`); version 1 files are migrated automatically.
|
|
280
|
+
- Desktop editor (`nervus` command), built with PySide6 in a Model–View–Controller structure: canvas with
|
|
281
|
+
drag-and-drop blocks and wires, block library with search, property editor with expressions and MATLAB-style
|
|
282
|
+
matrices, undo/redo for every edit, copy/paste, diagnostics panel, threaded simulation with progress and stop,
|
|
283
|
+
scope windows with hover readout, simulation settings dialog, recent files, light and dark themes.
|
|
284
|
+
- In-app help: user guide pages and the full block reference (F1 on a selected block), with typeset LaTeX
|
|
285
|
+
equations and explanatory figures.
|
|
286
|
+
- Block figures (`scripts/gen_figures.py`) and editor screenshots (`scripts/screenshots.py`) for the docs.
|
|
287
|
+
- LaTeX equations in every block's documentation.
|
|
288
|
+
- Automatic left-to-right layout for diagrams without block positions.
|
|
289
|
+
- Simulation engine: block base class, diagrams, width propagation, execution ordering, algebraic loop
|
|
290
|
+
detection, sample-time inheritance, multi-rate discrete scheduling.
|
|
291
|
+
- Solvers: fixed-step Euler and RK4; variable-step RK45, RK23, DOP853, Radau, BDF and LSODA (via SciPy).
|
|
292
|
+
Variable-step solvers stop exactly at discontinuities declared by blocks.
|
|
293
|
+
- Simulation results with access by block name, CSV and pandas export.
|
|
294
|
+
- Model files (`.nervus`, JSON) with schema versioning and migrations; simulation settings stored per diagram.
|
|
295
|
+
- Examples: PID control of a mass-spring-damper, electronic throttle control with a discrete PI.
|
|
296
|
+
- Documentation: getting started, concepts, coming from Simulink, model files, architecture, writing blocks,
|
|
297
|
+
and a block reference generated from the code.
|
|
298
|
+
- Block library (30 blocks): Constant, Step, Ramp, Sine Wave, Pulse Generator, Clock, From Workspace, Gain,
|
|
299
|
+
Sum, Product, Abs, Saturation, Math Function, Integrator, Derivative, Transfer Fcn, State-Space, Unit Delay,
|
|
300
|
+
Zero-Order Hold, Discrete-Time Integrator, Discrete Transfer Fcn, PID Controller, Discrete PID Controller,
|
|
301
|
+
Scope, To Workspace, Terminator, Mux, Demux, Switch, Python Function.
|
|
302
|
+
- Project setup: packaging (uv/hatchling), linting (ruff), type checking (mypy), tests (pytest), CI, docs skeleton.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Contributing to Nervus
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
uv sync --extra gui
|
|
7
|
+
uv run pre-commit install
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Pick an item from [`plan.md`](plan.md), or open an issue.
|
|
13
|
+
2. Write the code **and** its tests **and** its documentation, both in the app and on GitHub:
|
|
14
|
+
- block docstrings (shown in the in-app help and the generated reference), with LaTeX equations,
|
|
15
|
+
- in-app guide pages in `src/nervus/gui/resources/help/`,
|
|
16
|
+
- user docs in `docs/`, with pictures where they help:
|
|
17
|
+
`uv run python scripts/gen_figures.py` (block figures) and
|
|
18
|
+
`QT_QPA_PLATFORM=offscreen uv run python scripts/screenshots.py` (editor screenshots),
|
|
19
|
+
- then `uv run python scripts/gen_block_reference.py`.
|
|
20
|
+
3. Run the checks:
|
|
21
|
+
```bash
|
|
22
|
+
uv run ruff check . && uv run ruff format --check . && uv run mypy && uv run pytest
|
|
23
|
+
```
|
|
24
|
+
4. Tick the item off in `plan.md` and add an entry to `CHANGELOG.md` under *Unreleased*.
|
|
25
|
+
5. Commit with a descriptive message.
|
|
26
|
+
|
|
27
|
+
## Architecture rules
|
|
28
|
+
|
|
29
|
+
- `nervus.core`, `nervus.sim`, `nervus.solvers`, `nervus.blocks` and `nervus.io` **must never import Qt**.
|
|
30
|
+
- The GUI (`nervus.gui`) follows Model–View–Controller:
|
|
31
|
+
- *models* wrap the core diagram and emit Qt signals when it changes,
|
|
32
|
+
- *views* render and forward user input, with no business logic,
|
|
33
|
+
- *controllers* change the model through undoable commands.
|
|
34
|
+
- Every block must be verified by tests, against analytical solutions where possible.
|
|
35
|
+
|
|
36
|
+
## Writing a block
|
|
37
|
+
|
|
38
|
+
See [docs/developer/custom-blocks.md](docs/developer/custom-blocks.md).
|
|
39
|
+
|
|
40
|
+
## Continuous integration
|
|
41
|
+
|
|
42
|
+
Run `scripts/check.sh` before every push: it is the full check. CI (`.github/workflows/ci.yml`) runs the tests on
|
|
43
|
+
Python 3.11 and 3.13 when code changes, for pull requests, every Monday and on demand (Actions → CI → *Run
|
|
44
|
+
workflow*); a newer push cancels the run of an older one. Put `[skip ci]` in a commit message to skip it.
|
|
45
|
+
|
|
46
|
+
## Performance
|
|
47
|
+
|
|
48
|
+
`uv run python scripts/benchmark.py` times the simulation of some example models (best of three); run it before
|
|
49
|
+
and after a change to the engine. `--profile MODEL` shows where the time goes.
|
|
50
|
+
|
|
51
|
+
## Releasing
|
|
52
|
+
|
|
53
|
+
Releases go to PyPI from GitHub Actions (`.github/workflows/release.yml`), with
|
|
54
|
+
[trusted publishing](https://docs.pypi.org/trusted-publishers/): no password or token is stored.
|
|
55
|
+
|
|
56
|
+
One-time setup:
|
|
57
|
+
|
|
58
|
+
1. On pypi.org, log in and open *Your account → Publishing → Add a new pending publisher*: PyPI project name
|
|
59
|
+
`nervus`, owner `ikjbi`, repository `nervus`, workflow `release.yml`, environment `pypi`.
|
|
60
|
+
2. On GitHub, *Settings → Environments → New environment* `pypi` (optionally with a required reviewer, so every
|
|
61
|
+
release waits for a click).
|
|
62
|
+
|
|
63
|
+
Each release:
|
|
64
|
+
|
|
65
|
+
1. Set `__version__` in `src/nervus/__init__.py` (e.g. `0.1.0`), and in `CHANGELOG.md` rename *Unreleased* to the
|
|
66
|
+
version with the date.
|
|
67
|
+
2. Commit, then tag and push: `git tag v0.1.0 && git push origin v0.1.0`.
|
|
68
|
+
3. The workflow checks that the tag matches the version, runs the tests, builds the wheel and the source package,
|
|
69
|
+
checks them with `twine check`, and publishes them.
|
|
70
|
+
|
|
71
|
+
Try a package before releasing: `uv build`, then `pip install "dist/nervus-<version>-py3-none-any.whl[gui]"` in a
|
|
72
|
+
fresh environment, and `nervus --copy-examples /tmp/ex`.
|
nervus-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Johan Bjoerk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|