pySimBlocks 0.1.0__tar.gz → 0.1.1__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.
- {pysimblocks-0.1.0/pySimBlocks.egg-info → pysimblocks-0.1.1}/PKG-INFO +25 -36
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/README.md +20 -31
- pysimblocks-0.1.1/docs/source/_ext/api_generator.py +295 -0
- pysimblocks-0.1.1/docs/source/conf.py +116 -0
- pysimblocks-0.1.1/examples/quick_start/filter.py +35 -0
- pysimblocks-0.1.1/examples/quick_start/gui/run.py +14 -0
- pysimblocks-0.1.1/examples/tutorials/tutorial_1_python/main.py +99 -0
- pysimblocks-0.1.1/examples/tutorials/tutorial_2_gui/run.py +14 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/tutorials/tutorial_3_sofa/finger/Finger.py +1 -1
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/tutorials/tutorial_3_sofa/finger/FingerController.py +3 -5
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/controllers/pid.py +74 -56
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/controllers/state_feedback.py +65 -39
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/interfaces/external_input.py +32 -26
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/interfaces/external_output.py +33 -33
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/observers/luenberger.py +79 -42
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/algebraic_function.py +95 -53
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/dead_zone.py +72 -44
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/delay.py +63 -62
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/demux.py +49 -27
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/discrete_derivator.py +48 -76
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/discrete_integrator.py +63 -88
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/gain.py +65 -67
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/mux.py +48 -35
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/product.py +66 -47
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/rate_limiter.py +70 -53
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/saturation.py +63 -50
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/sum.py +53 -54
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/zero_order_hold.py +50 -27
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/optimizers/quadratic_program.py +67 -91
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/chirp.py +75 -22
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/constant.py +34 -27
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/file_source.py +83 -28
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/function_source.py +67 -17
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/ramp.py +44 -36
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/sinusoidal.py +46 -35
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/step.py +47 -71
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/white_noise.py +46 -35
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/systems/linear_state_space.py +57 -37
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/systems/non_linear_state_space.py +88 -71
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/systems/polytopic_state_space.py +65 -33
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/systems/sofa/sofa_controller.py +139 -182
- pysimblocks-0.1.1/pySimBlocks/blocks/systems/sofa/sofa_exchange_i_o.py +126 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/systems/sofa/sofa_plant.py +147 -85
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/block.py +84 -63
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/block_source.py +45 -21
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/config.py +33 -15
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/fixed_time_manager.py +39 -8
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/model.py +104 -43
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/scheduler.py +32 -4
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/simulator.py +121 -76
- pysimblocks-0.1.1/pySimBlocks/core/task.py +103 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/file_source.md +2 -3
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/addons/sofa/sofa_dialog.py +54 -6
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/addons/sofa/sofa_service.py +49 -8
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/block_dialog_session.py +22 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/block_meta.py +103 -81
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/controllers/pid.py +22 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/controllers/state_feedback.py +10 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/interfaces/external_input.py +9 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/interfaces/external_output.py +9 -8
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/observers/luenberger.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/algebraic_function.py +45 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/dead_zone.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/delay.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/demux.py +23 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/discrete_derivator.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/discrete_integrator.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/gain.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/mux.py +23 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/product.py +23 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/rate_limiter.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/saturation.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/sum.py +25 -2
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/operators/zero_order_hold.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/optimizers/quadratic_program.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/parameter_meta.py +15 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/port_meta.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/chirp.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/constant.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/file_source.py +46 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/function_source.py +45 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/ramp.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/sinusoidal.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/step.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/sources/white_noise.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/systems/linear_state_space.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/systems/non_linear_state_space.py +45 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/systems/polytopic_state_space.py +9 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/systems/sofa/sofa_exchange_i_o.py +45 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/blocks/systems/sofa/sofa_plant.py +45 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/block_dialog.py +33 -7
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/display_yaml_dialog.py +21 -3
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/help_dialog.py +11 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/plot_dialog.py +31 -16
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/settings/plots.py +41 -12
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/settings/project.py +29 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/settings/simulation.py +28 -4
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/settings_dialog.py +31 -1
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/unsaved_dialog.py +21 -2
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/editor.py +16 -5
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/graphics/block_item.py +81 -17
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/graphics/connection_item.py +146 -87
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/graphics/port_item.py +67 -17
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/graphics/theme.py +17 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/main_window.py +103 -27
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/models/block_instance.py +53 -15
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/models/connection_instance.py +37 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/models/port_instance.py +37 -4
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/models/project_simulation_params.py +28 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/models/project_state.py +84 -9
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/project_controller.py +209 -74
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/services/project_loader.py +43 -5
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/services/project_saver.py +40 -1
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/services/simulation_runner.py +15 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/services/yaml_tools.py +61 -4
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/widgets/block_list.py +46 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/widgets/diagram_view.py +173 -65
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/widgets/toolbar_view.py +56 -18
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/build_model.py +18 -25
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/generate_run_script.py +29 -21
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/generate_sofa_controller.py +52 -8
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/load_project_config.py +28 -3
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/load_simulation_config.py +54 -35
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/load_simulator.py +19 -2
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/plot_from_config.py +26 -42
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/real_time/real_time_runner.py +43 -43
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/tools/blocks_registry.py +55 -34
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/tools/generate_blocks_index.py +45 -22
- {pysimblocks-0.1.0 → pysimblocks-0.1.1/pySimBlocks.egg-info}/PKG-INFO +25 -36
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks.egg-info/SOURCES.txt +6 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks.egg-info/requires.txt +5 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pyproject.toml +7 -5
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/core/test_core_multirate_tasks.py +18 -9
- pysimblocks-0.1.0/pySimBlocks/blocks/systems/sofa/sofa_exchange_i_o.py +0 -120
- pysimblocks-0.1.0/pySimBlocks/core/task.py +0 -73
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/LICENSE.md +0 -0
- {pysimblocks-0.1.0/examples/quick_start → pysimblocks-0.1.1/docs/_build/html/_downloads/005a2fbb3c705d1ad26b3514425388ea}/filter.py +0 -0
- {pysimblocks-0.1.0/examples/basics/algebraic_function → pysimblocks-0.1.1/docs/_build/html/_downloads/55a3b8989a3f25f02b02155793932456}/run.py +0 -0
- {pysimblocks-0.1.0/examples/tutorials/tutorial_1_python → pysimblocks-0.1.1/docs/_build/html/_downloads/6f0602c197379a812604b0c5d14a0785}/main.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/hardware/block_diagram.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/hardware/camera.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/hardware/gui_emio.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/hardware/lmi.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/hardware/main.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/hardware/parameters.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/qp_problem/params.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/qp_problem/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/gui/finger/Finger.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/gui/finger/FingerController.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/gui/finger/parameters_auto.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/gui/sofa_plant/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/python/Finger.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/python/FingerController.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/python/closedloop.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/advanced/sofa/python/openloop.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/algebraic_function/g.py +0 -0
- {pysimblocks-0.1.0/examples/basics/state_feedback/gui → pysimblocks-0.1.1/examples/basics/algebraic_function}/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/dc_motor/gui/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/dc_motor/multiple_order.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/dc_motor/openloop.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/dc_motor/pi.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/dc_motor/pid.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/dc_motor/pid_block.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/dc_motor/pid_block_vs_manual.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/external/parameters.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/external/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/file_sources/temp.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/observer.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_feedback/gui/parameters.py +0 -0
- {pysimblocks-0.1.0/examples/quick_start → pysimblocks-0.1.1/examples/basics/state_feedback}/gui/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_feedback/state_feedback.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_space/linear/gui/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_space/linear/ss_block.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_space/linear/ss_manual.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_space/non_linear/nlss.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_space/non_linear/run.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_space/polytope/params.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/basics/state_space/polytope/weights.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/comparison/simulink/convert.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/comparison/simulink/openloop.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/comparison/simulink/pi.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/comparison/simulink/pid.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/examples/comparison/simulink/pid_backward.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/controllers/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/interfaces/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/observers/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/operators/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/optimizers/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/sources/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/systems/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/blocks/systems/sofa/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/cli.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/core/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/controllers/pid.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/controllers/state_feedback.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/interfaces/external_input.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/interfaces/external_output.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/observers/luenberger.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/algebraic_function.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/dead_zone.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/delay.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/demux.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/discrete_derivator.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/discrete_integrator.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/gain.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/mux.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/product.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/rate_limiter.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/saturation.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/sum.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/operators/zero_order_hold.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/optimizers/quadratic_program.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/chirp.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/constant.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/function_source.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/ramp.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/sinusoidal.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/step.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/sources/white_noise.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/systems/linear_state_space.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/systems/non_linear_state_space.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/systems/polytopic_state_space.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/systems/sofa/sofa_exchange_i_o.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/docs/blocks/systems/sofa/sofa_plant.md +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/addons/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/addons/sofa/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/dialogs/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/graphics/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/models/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/services/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/gui/widgets/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/project/pySimBlocks_blocks_index.yaml +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/real_time/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks/tools/__init__.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks.egg-info/dependency_links.txt +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks.egg-info/entry_points.txt +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/pySimBlocks.egg-info/top_level.txt +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/setup.cfg +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/controllers/test_pid.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/controllers/test_state_feedback.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/observers/test_luenberger.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_algebraic_function.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_dead_zone.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_delay.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_demux.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_discrete_derivator.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_discrete_integrator.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_gain.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_mux.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_product.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_rate_limiter.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_saturation.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_sum.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/operators/test_zero_order_hold.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_chirp.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_constant.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_file_source.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_function_source.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_ramp.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_sinusoidal.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_step.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/sources/test_white_noise.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/systems/test_linear_state_space.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/blocks/systems/test_polytopic_state_space.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/core/test_core_errors_and_determinism.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/core/test_core_two_phase_and_propagation.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/gui/main_window_open_test.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/gui/test_block_meta_param_cache.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/gui/test_file_source_meta.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/gui/test_function_source_meta.py +0 -0
- {pysimblocks-0.1.0 → pysimblocks-0.1.1}/tests/regression/test_simulink_dc_motor.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pySimBlocks
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A block-diagram simulation environment with PySide6 editor
|
|
5
5
|
Author-email: Antoine Alessandrini <antoine.alessandrini@univ-lille.fr>
|
|
6
6
|
License-Expression: LGPL-3.0-or-later
|
|
@@ -11,10 +11,6 @@ Keywords: simulation,block-diagram,control,discrete-time,pyside6
|
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
13
|
Classifier: Intended Audience :: Education
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
18
14
|
Classifier: Topic :: Scientific/Engineering
|
|
19
15
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
20
16
|
Requires-Python: >=3.10
|
|
@@ -28,6 +24,10 @@ Requires-Dist: typing_extensions; python_version < "3.11"
|
|
|
28
24
|
Provides-Extra: examples
|
|
29
25
|
Requires-Dist: control; extra == "examples"
|
|
30
26
|
Requires-Dist: qpsolvers[clarabel,osqp]; extra == "examples"
|
|
27
|
+
Provides-Extra: docs
|
|
28
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
29
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
30
|
+
Requires-Dist: furo; extra == "docs"
|
|
31
31
|
Provides-Extra: tests
|
|
32
32
|
Requires-Dist: pytest; extra == "tests"
|
|
33
33
|
Requires-Dist: pytest-qt; extra == "tests"
|
|
@@ -35,45 +35,34 @@ Dynamic: license-file
|
|
|
35
35
|
|
|
36
36
|
# pySimBlocks
|
|
37
37
|
|
|
38
|
+
[](https://pypi.org/project/pySimBlocks/)
|
|
39
|
+
[](https://pypi.org/project/pySimBlocks/)
|
|
40
|
+
[](./LICENSE.md)
|
|
41
|
+
[](https://pysimblocks.readthedocs.io)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
38
45
|
A deterministic block-diagram simulation framework for discrete-time modeling,
|
|
39
46
|
co-simulation and research prototyping in Python.
|
|
40
47
|
|
|
41
|
-
pySimBlocks allows you to build, configure, and execute discrete-time systems
|
|
48
|
+
pySimBlocks allows you to build, configure, and execute discrete-time systems
|
|
42
49
|
using either:
|
|
43
50
|
|
|
44
51
|
- A pure Python API
|
|
45
52
|
- A graphical editor (PySide6)
|
|
46
|
-
- YAML project configuration
|
|
53
|
+
- YAML project configuration with exportable Python runner (`run.py`)
|
|
47
54
|
- Optional SOFA and hardware integration
|
|
48
55
|
|
|
49
|
-

|
|
54
|
-
- Deterministic discrete-time simulation engine
|
|
55
|
-
- PySide6 graphical editor
|
|
56
|
-
- YAML-based project serialization
|
|
57
|
-
- Exportable Python runner (`run.py`)
|
|
58
|
-
- Extensible block architecture
|
|
56
|
+

|
|
59
57
|
|
|
60
58
|
## Installation
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Install directly from GitHub using pip:
|
|
65
|
-
```
|
|
66
|
-
pip install git+https://github.com/AlessandriniAntoine/pySimBlocks
|
|
60
|
+
```bash
|
|
61
|
+
pip install pySimBlocks
|
|
67
62
|
```
|
|
68
63
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Clone the repository and install locally:
|
|
72
|
-
```
|
|
73
|
-
git clone https://github.com/AlessandriniAntoine/pySimBlocks.git
|
|
74
|
-
cd pySimBlocks
|
|
75
|
-
pip install .
|
|
76
|
-
```
|
|
64
|
+
Full documentation — user guide, tutorials, and API reference — is available on
|
|
65
|
+
[**Read the Docs**](https://pysimblocks.readthedocs.io).
|
|
77
66
|
|
|
78
67
|
## Getting Started
|
|
79
68
|
|
|
@@ -125,7 +114,7 @@ plot_from_config(logs, plot_cfg)
|
|
|
125
114
|
|
|
126
115
|
The resulting plot should look like this:
|
|
127
116
|
|
|
128
|
-

|
|
129
118
|
|
|
130
119
|
See [examples/quick_start/filter.py](./examples/quick_start/filter.py)
|
|
131
120
|
to run the example yourself.
|
|
@@ -148,14 +137,14 @@ The quick-start GUI project is stored in a single
|
|
|
148
137
|
|
|
149
138
|
#### Tutorials
|
|
150
139
|
|
|
151
|
-
Three step-by-step tutorials are available
|
|
152
|
-
[
|
|
140
|
+
Three step-by-step tutorials are available in the
|
|
141
|
+
[documentation](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/index.html):
|
|
153
142
|
|
|
154
143
|
| | Tutorial | Description |
|
|
155
144
|
|---|---|---|
|
|
156
|
-
| 1 | [Python API](
|
|
157
|
-
| 2 | [GUI](
|
|
158
|
-
| 3 | [SOFA](
|
|
145
|
+
| 1 | [Python API](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/tutorial_1_python.html) | Build a closed-loop PI control system in pure Python |
|
|
146
|
+
| 2 | [GUI](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/tutorial_2_gui.html) | Build the same system visually with the graphical editor |
|
|
147
|
+
| 3 | [SOFA](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/tutorial_3_sofa.html) | Replace the plant with a SOFA physics simulation |
|
|
159
148
|
|
|
160
149
|
|
|
161
150
|
#### Other Examples
|
|
@@ -1,44 +1,33 @@
|
|
|
1
1
|
# pySimBlocks
|
|
2
2
|
|
|
3
|
+
[](https://pypi.org/project/pySimBlocks/)
|
|
4
|
+
[](https://pypi.org/project/pySimBlocks/)
|
|
5
|
+
[](./LICENSE.md)
|
|
6
|
+
[](https://pysimblocks.readthedocs.io)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
3
10
|
A deterministic block-diagram simulation framework for discrete-time modeling,
|
|
4
11
|
co-simulation and research prototyping in Python.
|
|
5
12
|
|
|
6
|
-
pySimBlocks allows you to build, configure, and execute discrete-time systems
|
|
13
|
+
pySimBlocks allows you to build, configure, and execute discrete-time systems
|
|
7
14
|
using either:
|
|
8
15
|
|
|
9
16
|
- A pure Python API
|
|
10
17
|
- A graphical editor (PySide6)
|
|
11
|
-
- YAML project configuration
|
|
18
|
+
- YAML project configuration with exportable Python runner (`run.py`)
|
|
12
19
|
- Optional SOFA and hardware integration
|
|
13
20
|
|
|
14
|
-

|
|
19
|
-
- Deterministic discrete-time simulation engine
|
|
20
|
-
- PySide6 graphical editor
|
|
21
|
-
- YAML-based project serialization
|
|
22
|
-
- Exportable Python runner (`run.py`)
|
|
23
|
-
- Extensible block architecture
|
|
21
|
+

|
|
24
22
|
|
|
25
23
|
## Installation
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Install directly from GitHub using pip:
|
|
30
|
-
```
|
|
31
|
-
pip install git+https://github.com/AlessandriniAntoine/pySimBlocks
|
|
25
|
+
```bash
|
|
26
|
+
pip install pySimBlocks
|
|
32
27
|
```
|
|
33
28
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Clone the repository and install locally:
|
|
37
|
-
```
|
|
38
|
-
git clone https://github.com/AlessandriniAntoine/pySimBlocks.git
|
|
39
|
-
cd pySimBlocks
|
|
40
|
-
pip install .
|
|
41
|
-
```
|
|
29
|
+
Full documentation — user guide, tutorials, and API reference — is available on
|
|
30
|
+
[**Read the Docs**](https://pysimblocks.readthedocs.io).
|
|
42
31
|
|
|
43
32
|
## Getting Started
|
|
44
33
|
|
|
@@ -90,7 +79,7 @@ plot_from_config(logs, plot_cfg)
|
|
|
90
79
|
|
|
91
80
|
The resulting plot should look like this:
|
|
92
81
|
|
|
93
|
-

|
|
94
83
|
|
|
95
84
|
See [examples/quick_start/filter.py](./examples/quick_start/filter.py)
|
|
96
85
|
to run the example yourself.
|
|
@@ -113,14 +102,14 @@ The quick-start GUI project is stored in a single
|
|
|
113
102
|
|
|
114
103
|
#### Tutorials
|
|
115
104
|
|
|
116
|
-
Three step-by-step tutorials are available
|
|
117
|
-
[
|
|
105
|
+
Three step-by-step tutorials are available in the
|
|
106
|
+
[documentation](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/index.html):
|
|
118
107
|
|
|
119
108
|
| | Tutorial | Description |
|
|
120
109
|
|---|---|---|
|
|
121
|
-
| 1 | [Python API](
|
|
122
|
-
| 2 | [GUI](
|
|
123
|
-
| 3 | [SOFA](
|
|
110
|
+
| 1 | [Python API](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/tutorial_1_python.html) | Build a closed-loop PI control system in pure Python |
|
|
111
|
+
| 2 | [GUI](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/tutorial_2_gui.html) | Build the same system visually with the graphical editor |
|
|
112
|
+
| 3 | [SOFA](https://pysimblocks.readthedocs.io/en/latest/user_guide/tutorials/tutorial_3_sofa.html) | Replace the plant with a SOFA physics simulation |
|
|
124
113
|
|
|
125
114
|
|
|
126
115
|
#### Other Examples
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
ROOT = Path(__file__).resolve().parents[3]
|
|
7
|
+
SOURCE_DIR = ROOT / "docs" / "source"
|
|
8
|
+
API_DIR = SOURCE_DIR / "api"
|
|
9
|
+
PACKAGE_DIR = ROOT / "pySimBlocks"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
SECTIONS = {
|
|
13
|
+
"core": {
|
|
14
|
+
"title": "Core",
|
|
15
|
+
"intro": (
|
|
16
|
+
"The ``core`` package contains the simulation primitives and runtime "
|
|
17
|
+
"orchestration objects."
|
|
18
|
+
),
|
|
19
|
+
"type": "modules",
|
|
20
|
+
"path": PACKAGE_DIR / "core",
|
|
21
|
+
"generated": "generated/core",
|
|
22
|
+
},
|
|
23
|
+
"project": {
|
|
24
|
+
"title": "Project",
|
|
25
|
+
"intro": (
|
|
26
|
+
"The ``project`` package groups utilities used to load project files, "
|
|
27
|
+
"build simulators, and generate runnable artifacts from project data."
|
|
28
|
+
),
|
|
29
|
+
"type": "modules",
|
|
30
|
+
"path": PACKAGE_DIR / "project",
|
|
31
|
+
"generated": "generated/project",
|
|
32
|
+
},
|
|
33
|
+
"tools": {
|
|
34
|
+
"title": "Tools",
|
|
35
|
+
"intro": (
|
|
36
|
+
"The ``tools`` package contains support utilities used by the library "
|
|
37
|
+
"and project tooling."
|
|
38
|
+
),
|
|
39
|
+
"type": "modules",
|
|
40
|
+
"path": PACKAGE_DIR / "tools",
|
|
41
|
+
"generated": "generated/tools",
|
|
42
|
+
},
|
|
43
|
+
"real_time": {
|
|
44
|
+
"title": "Real Time",
|
|
45
|
+
"intro": "The ``real_time`` package provides utilities for live execution workflows.",
|
|
46
|
+
"type": "modules",
|
|
47
|
+
"path": PACKAGE_DIR / "real_time",
|
|
48
|
+
"generated": "generated/real_time",
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
BLOCK_TITLES = {
|
|
54
|
+
"controllers": "Controllers",
|
|
55
|
+
"interfaces": "Interfaces",
|
|
56
|
+
"observers": "Observers",
|
|
57
|
+
"operators": "Operators",
|
|
58
|
+
"optimizers": "Optimizers",
|
|
59
|
+
"sources": "Sources",
|
|
60
|
+
"systems": "Systems",
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
GUI_SECTIONS = {
|
|
65
|
+
"application": {
|
|
66
|
+
"title": "GUI Application",
|
|
67
|
+
"path": PACKAGE_DIR / "gui",
|
|
68
|
+
"modules": [
|
|
69
|
+
"pySimBlocks.gui.editor",
|
|
70
|
+
"pySimBlocks.gui.main_window",
|
|
71
|
+
"pySimBlocks.gui.project_controller",
|
|
72
|
+
],
|
|
73
|
+
"generated": "generated/gui/application",
|
|
74
|
+
},
|
|
75
|
+
"dialogs": {
|
|
76
|
+
"title": "GUI Dialogs",
|
|
77
|
+
"path": PACKAGE_DIR / "gui" / "dialogs",
|
|
78
|
+
"generated": "generated/gui/dialogs",
|
|
79
|
+
},
|
|
80
|
+
"graphics": {
|
|
81
|
+
"title": "GUI Graphics",
|
|
82
|
+
"path": PACKAGE_DIR / "gui" / "graphics",
|
|
83
|
+
"generated": "generated/gui/graphics",
|
|
84
|
+
},
|
|
85
|
+
"models": {
|
|
86
|
+
"title": "GUI Models",
|
|
87
|
+
"path": PACKAGE_DIR / "gui" / "models",
|
|
88
|
+
"generated": "generated/gui/models",
|
|
89
|
+
},
|
|
90
|
+
"services": {
|
|
91
|
+
"title": "GUI Services",
|
|
92
|
+
"path": PACKAGE_DIR / "gui" / "services",
|
|
93
|
+
"generated": "generated/gui/services",
|
|
94
|
+
},
|
|
95
|
+
"widgets": {
|
|
96
|
+
"title": "GUI Widgets",
|
|
97
|
+
"path": PACKAGE_DIR / "gui" / "widgets",
|
|
98
|
+
"generated": "generated/gui/widgets",
|
|
99
|
+
},
|
|
100
|
+
"addons": {
|
|
101
|
+
"title": "GUI Add-ons",
|
|
102
|
+
"path": PACKAGE_DIR / "gui" / "addons",
|
|
103
|
+
"generated": "generated/gui/addons",
|
|
104
|
+
},
|
|
105
|
+
"block_support": {
|
|
106
|
+
"title": "GUI Block Support",
|
|
107
|
+
"path": PACKAGE_DIR / "gui" / "blocks",
|
|
108
|
+
"modules": [
|
|
109
|
+
"pySimBlocks.gui.blocks.block_dialog_session",
|
|
110
|
+
"pySimBlocks.gui.blocks.block_meta",
|
|
111
|
+
"pySimBlocks.gui.blocks.parameter_meta",
|
|
112
|
+
"pySimBlocks.gui.blocks.port_meta",
|
|
113
|
+
],
|
|
114
|
+
"generated": "generated/gui/blocks/support",
|
|
115
|
+
},
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def _title(text: str, underline: str = "=") -> str:
|
|
120
|
+
return f"{text}\n{underline * len(text)}\n\n"
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def _discover_modules(path: Path, package: str) -> list[str]:
|
|
124
|
+
modules: list[str] = []
|
|
125
|
+
for py_file in sorted(path.rglob("*.py")):
|
|
126
|
+
if py_file.name == "__init__.py":
|
|
127
|
+
continue
|
|
128
|
+
relative = py_file.relative_to(PACKAGE_DIR).with_suffix("")
|
|
129
|
+
parts = relative.parts
|
|
130
|
+
modules.append("pySimBlocks." + ".".join(parts))
|
|
131
|
+
if package.endswith(".dialogs") or package.endswith(".addons"):
|
|
132
|
+
return modules
|
|
133
|
+
return [m for m in modules if ".__pycache__" not in m]
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def _write(path: Path, content: str) -> None:
|
|
137
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
138
|
+
path.write_text(content, encoding="utf-8")
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def _generated_doc_path(toctree: str, module: str) -> str:
|
|
142
|
+
return f"{toctree}/{module}.rst"
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def _module_page(module: str) -> str:
|
|
146
|
+
title = module
|
|
147
|
+
content = _title(title)
|
|
148
|
+
content += f".. automodule:: {module}\n"
|
|
149
|
+
content += " :members:\n"
|
|
150
|
+
content += " :show-inheritance:\n"
|
|
151
|
+
content += " :member-order: bysource\n"
|
|
152
|
+
content += "\n"
|
|
153
|
+
return content
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def _list_page(title: str, intro: str | None, modules: list[str], toctree: str) -> str:
|
|
157
|
+
content = _title(title)
|
|
158
|
+
if intro:
|
|
159
|
+
content += intro + "\n\n"
|
|
160
|
+
content += ".. toctree::\n"
|
|
161
|
+
content += " :maxdepth: 1\n\n"
|
|
162
|
+
for module in modules:
|
|
163
|
+
generated = f"{toctree}/{module}"
|
|
164
|
+
content += f" {module} <{generated}>\n"
|
|
165
|
+
content += "\n"
|
|
166
|
+
return content
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def _modules_in_dir(path: Path, package: str) -> list[str]:
|
|
170
|
+
return _discover_modules(path, package)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def generate_api(_: object | None = None) -> None:
|
|
174
|
+
_generate_api_index()
|
|
175
|
+
_generate_section_pages()
|
|
176
|
+
_generate_blocks_pages()
|
|
177
|
+
_generate_gui_pages()
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def _generate_api_index() -> None:
|
|
181
|
+
content = _title("API Reference")
|
|
182
|
+
content += (
|
|
183
|
+
"The API reference is organized by the package structure of ``pySimBlocks``. "
|
|
184
|
+
"Re-exported symbols from package ``__init__`` files are intentionally not "
|
|
185
|
+
"duplicated here; the canonical documentation lives in the subsection where "
|
|
186
|
+
"each object is implemented.\n\n"
|
|
187
|
+
)
|
|
188
|
+
content += ".. toctree::\n"
|
|
189
|
+
content += " :maxdepth: 2\n\n"
|
|
190
|
+
for entry in ["blocks/index", "core", "gui/index", "project", "tools", "real_time"]:
|
|
191
|
+
content += f" {entry}\n"
|
|
192
|
+
content += "\n"
|
|
193
|
+
_write(API_DIR / "index.rst", content)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def _generate_section_pages() -> None:
|
|
197
|
+
for slug, config in SECTIONS.items():
|
|
198
|
+
modules = _modules_in_dir(config["path"], f"pySimBlocks.{slug}")
|
|
199
|
+
content = _list_page(
|
|
200
|
+
config["title"],
|
|
201
|
+
config["intro"],
|
|
202
|
+
modules,
|
|
203
|
+
config["generated"],
|
|
204
|
+
)
|
|
205
|
+
_write(API_DIR / f"{slug}.rst", content)
|
|
206
|
+
for module in modules:
|
|
207
|
+
_write(API_DIR / _generated_doc_path(config["generated"], module), _module_page(module))
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def _generate_blocks_pages() -> None:
|
|
211
|
+
blocks_dir = API_DIR / "blocks"
|
|
212
|
+
content = _title("Blocks")
|
|
213
|
+
content += (
|
|
214
|
+
"The ``blocks`` package contains the reusable simulation blocks used to build "
|
|
215
|
+
"models. The reference is split by block family so the runtime implementations "
|
|
216
|
+
"remain easy to browse.\n\n"
|
|
217
|
+
)
|
|
218
|
+
content += ".. toctree::\n :maxdepth: 1\n\n"
|
|
219
|
+
for category in BLOCK_TITLES:
|
|
220
|
+
content += f" {category}\n"
|
|
221
|
+
content += "\n"
|
|
222
|
+
_write(blocks_dir / "index.rst", content)
|
|
223
|
+
|
|
224
|
+
for category, label in BLOCK_TITLES.items():
|
|
225
|
+
modules = _discover_modules(PACKAGE_DIR / "blocks" / category, f"pySimBlocks.blocks.{category}")
|
|
226
|
+
content = _list_page(
|
|
227
|
+
f"Block {label}",
|
|
228
|
+
None,
|
|
229
|
+
modules,
|
|
230
|
+
f"../generated/blocks/{category}",
|
|
231
|
+
)
|
|
232
|
+
_write(blocks_dir / f"{category}.rst", content)
|
|
233
|
+
for module in modules:
|
|
234
|
+
_write(API_DIR / _generated_doc_path(f"generated/blocks/{category}", module), _module_page(module))
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def _generate_gui_pages() -> None:
|
|
238
|
+
gui_dir = API_DIR / "gui"
|
|
239
|
+
content = _title("GUI")
|
|
240
|
+
content += (
|
|
241
|
+
"The ``gui`` package contains the editor application, its support services, "
|
|
242
|
+
"and the GUI-side descriptions used to expose blocks in the interface.\n\n"
|
|
243
|
+
)
|
|
244
|
+
content += ".. toctree::\n :maxdepth: 1\n\n"
|
|
245
|
+
for entry in ["application", "blocks/index", "dialogs", "graphics", "models", "services", "widgets", "addons"]:
|
|
246
|
+
content += f" {entry}\n"
|
|
247
|
+
content += "\n"
|
|
248
|
+
_write(gui_dir / "index.rst", content)
|
|
249
|
+
|
|
250
|
+
for slug, config in GUI_SECTIONS.items():
|
|
251
|
+
if slug == "block_support":
|
|
252
|
+
continue
|
|
253
|
+
modules = config.get("modules") or _discover_modules(
|
|
254
|
+
config["path"], f"pySimBlocks.gui.{config['path'].relative_to(PACKAGE_DIR / 'gui').as_posix().replace('/', '.')}"
|
|
255
|
+
)
|
|
256
|
+
content = _list_page(config["title"], None, modules, f"../{config['generated']}")
|
|
257
|
+
_write(gui_dir / f"{slug}.rst", content)
|
|
258
|
+
for module in modules:
|
|
259
|
+
_write(API_DIR / _generated_doc_path(config["generated"], module), _module_page(module))
|
|
260
|
+
|
|
261
|
+
blocks_dir = gui_dir / "blocks"
|
|
262
|
+
content = _title("GUI Blocks")
|
|
263
|
+
content += (
|
|
264
|
+
"The GUI block metadata is split with the same category structure as the runtime "
|
|
265
|
+
"``blocks`` package, so navigation stays consistent between implementation and "
|
|
266
|
+
"editor-facing code.\n\n"
|
|
267
|
+
)
|
|
268
|
+
content += ".. toctree::\n :maxdepth: 1\n\n"
|
|
269
|
+
for entry in [*BLOCK_TITLES.keys(), "support"]:
|
|
270
|
+
content += f" {entry}\n"
|
|
271
|
+
content += "\n"
|
|
272
|
+
_write(blocks_dir / "index.rst", content)
|
|
273
|
+
|
|
274
|
+
for category, label in BLOCK_TITLES.items():
|
|
275
|
+
modules = _discover_modules(PACKAGE_DIR / "gui" / "blocks" / category, f"pySimBlocks.gui.blocks.{category}")
|
|
276
|
+
content = _list_page(
|
|
277
|
+
f"GUI Block {label}",
|
|
278
|
+
None,
|
|
279
|
+
modules,
|
|
280
|
+
f"../../generated/gui/blocks/{category}",
|
|
281
|
+
)
|
|
282
|
+
_write(blocks_dir / f"{category}.rst", content)
|
|
283
|
+
for module in modules:
|
|
284
|
+
_write(API_DIR / _generated_doc_path(f"generated/gui/blocks/{category}", module), _module_page(module))
|
|
285
|
+
|
|
286
|
+
support_modules = GUI_SECTIONS["block_support"]["modules"]
|
|
287
|
+
content = _list_page(
|
|
288
|
+
"GUI Block Support",
|
|
289
|
+
None,
|
|
290
|
+
support_modules,
|
|
291
|
+
"../../generated/gui/blocks/support",
|
|
292
|
+
)
|
|
293
|
+
_write(blocks_dir / "support.rst", content)
|
|
294
|
+
for module in support_modules:
|
|
295
|
+
_write(API_DIR / _generated_doc_path("generated/gui/blocks/support", module), _module_page(module))
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import types
|
|
6
|
+
import zipfile
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from unittest.mock import MagicMock
|
|
9
|
+
|
|
10
|
+
sys.modules["qpsolvers"] = MagicMock()
|
|
11
|
+
|
|
12
|
+
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
|
|
13
|
+
sys.path.insert(0, ROOT)
|
|
14
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext")))
|
|
15
|
+
|
|
16
|
+
if "Sofa" not in sys.modules:
|
|
17
|
+
sofa = types.ModuleType("Sofa")
|
|
18
|
+
sofa_core = types.ModuleType("Sofa.Core")
|
|
19
|
+
sofa_simulation = types.ModuleType("Sofa.Simulation")
|
|
20
|
+
sofa_imgui = types.ModuleType("Sofa.ImGui")
|
|
21
|
+
|
|
22
|
+
class _SofaController:
|
|
23
|
+
def __init__(self, *args, **kwargs):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
class _SofaNode:
|
|
27
|
+
def __init__(self, *args, **kwargs):
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
def _noop(*args, **kwargs):
|
|
31
|
+
return None
|
|
32
|
+
|
|
33
|
+
sofa_core.Controller = _SofaController
|
|
34
|
+
sofa_core.Node = _SofaNode
|
|
35
|
+
sofa_simulation.initRoot = _noop
|
|
36
|
+
sofa_simulation.animate = _noop
|
|
37
|
+
|
|
38
|
+
sofa.Core = sofa_core
|
|
39
|
+
sofa.Simulation = sofa_simulation
|
|
40
|
+
sofa.ImGui = sofa_imgui
|
|
41
|
+
|
|
42
|
+
sys.modules["Sofa"] = sofa
|
|
43
|
+
sys.modules["Sofa.Core"] = sofa_core
|
|
44
|
+
sys.modules["Sofa.Simulation"] = sofa_simulation
|
|
45
|
+
sys.modules["Sofa.ImGui"] = sofa_imgui
|
|
46
|
+
|
|
47
|
+
project = "pySimBlocks"
|
|
48
|
+
author = "Antoine Alessandrini"
|
|
49
|
+
copyright = "2026, Universite de Lille & INRIA"
|
|
50
|
+
release = "0.1.1"
|
|
51
|
+
|
|
52
|
+
extensions = [
|
|
53
|
+
"myst_parser",
|
|
54
|
+
"sphinx.ext.autodoc",
|
|
55
|
+
"sphinx.ext.autosummary",
|
|
56
|
+
"sphinx.ext.napoleon",
|
|
57
|
+
"sphinx.ext.viewcode",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
templates_path = ["_templates"]
|
|
61
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
62
|
+
source_suffix = {
|
|
63
|
+
".rst": "restructuredtext",
|
|
64
|
+
".md": "markdown",
|
|
65
|
+
}
|
|
66
|
+
myst_enable_extensions = [
|
|
67
|
+
"dollarmath",
|
|
68
|
+
"colon_fence",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
autosummary_generate = True
|
|
72
|
+
autosummary_imported_members = False
|
|
73
|
+
autosummary_ignore_module_all = False
|
|
74
|
+
|
|
75
|
+
autodoc_default_options = {
|
|
76
|
+
"members": True,
|
|
77
|
+
"undoc-members": False,
|
|
78
|
+
"show-inheritance": True,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
autodoc_member_order = "bysource"
|
|
82
|
+
autodoc_mock_imports = ["qpsolvers"]
|
|
83
|
+
autodoc_type_aliases = {
|
|
84
|
+
"ArrayLike": "ArrayLike",
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
html_theme = "furo"
|
|
88
|
+
html_title = "pySimBlocks Documentation"
|
|
89
|
+
html_static_path = ["_static"]
|
|
90
|
+
html_css_files = ["custom.css"]
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def generate_tutorial_archives(app):
|
|
94
|
+
source_dir = Path(__file__).resolve().parent
|
|
95
|
+
tutorials_root = Path(ROOT) / "examples" / "tutorials"
|
|
96
|
+
archive_dir = source_dir / "_static" / "downloads"
|
|
97
|
+
archive_dir.mkdir(parents=True, exist_ok=True)
|
|
98
|
+
|
|
99
|
+
tutorial_dir = tutorials_root / "tutorial_3_sofa"
|
|
100
|
+
archive_path = archive_dir / "tutorial_3_sofa.zip"
|
|
101
|
+
|
|
102
|
+
with zipfile.ZipFile(archive_path, "w", compression=zipfile.ZIP_DEFLATED) as archive:
|
|
103
|
+
for file_path in sorted(tutorial_dir.rglob("*")):
|
|
104
|
+
if not file_path.is_file():
|
|
105
|
+
continue
|
|
106
|
+
if "__pycache__" in file_path.parts or file_path.suffix == ".pyc":
|
|
107
|
+
continue
|
|
108
|
+
archive_name = Path("tutorial_3_sofa") / file_path.relative_to(tutorial_dir)
|
|
109
|
+
archive.write(file_path, archive_name.as_posix())
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def setup(app):
|
|
113
|
+
from api_generator import generate_api
|
|
114
|
+
|
|
115
|
+
app.connect("builder-inited", generate_api)
|
|
116
|
+
app.connect("builder-inited", generate_tutorial_archives)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from pySimBlocks import Model, Simulator, SimulationConfig, PlotConfig
|
|
2
|
+
from pySimBlocks.blocks.operators import Gain, Sum, Delay
|
|
3
|
+
from pySimBlocks.blocks.sources import WhiteNoise
|
|
4
|
+
from pySimBlocks.project.plot_from_config import plot_from_config
|
|
5
|
+
|
|
6
|
+
# 1. Create the blocks
|
|
7
|
+
noise = WhiteNoise(name="noise", std=1.0)
|
|
8
|
+
delay = Delay(name="delay")
|
|
9
|
+
filtered = Sum("filtered", signs="++")
|
|
10
|
+
alpha_gain = Gain(name="alpha", gain=0.1)
|
|
11
|
+
complement = Gain(name="complement", gain=0.9)
|
|
12
|
+
|
|
13
|
+
# 2. Build the model
|
|
14
|
+
model = Model("Example")
|
|
15
|
+
for block in [noise, delay, filtered, alpha_gain, complement]:
|
|
16
|
+
model.add_block(block)
|
|
17
|
+
|
|
18
|
+
model.connect("noise", "out", "alpha", "in")
|
|
19
|
+
model.connect("delay", "out", "complement", "in")
|
|
20
|
+
model.connect("alpha", "out", "filtered", "in1")
|
|
21
|
+
model.connect("complement", "out", "filtered", "in2")
|
|
22
|
+
model.connect("filtered", "out", "delay", "in")
|
|
23
|
+
|
|
24
|
+
# 3. Simulate the model
|
|
25
|
+
sim_cfg = SimulationConfig(dt=0.05, T=30.)
|
|
26
|
+
sim = Simulator(model, sim_cfg)
|
|
27
|
+
logs = sim.run(logging=["noise.outputs.out", "filtered.outputs.out"])
|
|
28
|
+
|
|
29
|
+
# 4. Plot the results
|
|
30
|
+
plot_cfg = PlotConfig([
|
|
31
|
+
{"title": "Noisy signal vs Filtered",
|
|
32
|
+
"signals": ["noise.outputs.out", "filtered.outputs.out"],},
|
|
33
|
+
])
|
|
34
|
+
plot_from_config(logs, plot_cfg)
|
|
35
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from pySimBlocks.project import load_simulator_from_project
|
|
3
|
+
from pySimBlocks.project.plot_from_config import plot_from_config
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
BASE_DIR = Path(__file__).parent.resolve()
|
|
7
|
+
except Exception:
|
|
8
|
+
BASE_DIR = Path("")
|
|
9
|
+
|
|
10
|
+
sim, plot_cfg = load_simulator_from_project(BASE_DIR / 'project.yaml')
|
|
11
|
+
|
|
12
|
+
logs = sim.run()
|
|
13
|
+
if True and plot_cfg is not None:
|
|
14
|
+
plot_from_config(logs, plot_cfg)
|