pathsim 0.22.1__tar.gz → 0.23.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.
- {pathsim-0.22.1 → pathsim-0.23.0}/PKG-INFO +3 -3
- {pathsim-0.22.1 → pathsim-0.23.0}/pyproject.toml +4 -1
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/_version.py +3 -3
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/__init__.py +3 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/_block.py +27 -3
- pathsim-0.23.0/src/pathsim/blocks/bvp.py +281 -0
- pathsim-0.23.0/src/pathsim/blocks/constraint.py +165 -0
- pathsim-0.23.0/src/pathsim/blocks/dae.py +854 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/fmu.py +11 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/integrator.py +17 -1
- pathsim-0.23.0/src/pathsim/optim/__init__.py +3 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/optim/anderson.py +141 -3
- pathsim-0.23.0/src/pathsim/optim/newton.py +230 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/optim/numerical.py +14 -13
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/simulation.py +288 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim.egg-info/PKG-INFO +3 -3
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim.egg-info/SOURCES.txt +12 -0
- pathsim-0.23.0/src/pathsim.egg-info/scm_file_list.json +478 -0
- pathsim-0.23.0/src/pathsim.egg-info/scm_version.json +8 -0
- pathsim-0.23.0/tests/pathsim/blocks/test_bvp.py +173 -0
- pathsim-0.23.0/tests/pathsim/blocks/test_constraint.py +151 -0
- pathsim-0.23.0/tests/pathsim/blocks/test_dae.py +367 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/optim/test_anderson.py +88 -2
- pathsim-0.23.0/tests/pathsim/optim/test_newton.py +119 -0
- pathsim-0.23.0/tests/pathsim/test_auto_initial_step.py +107 -0
- pathsim-0.23.0/tests/pathsim/test_simulation_pss.py +106 -0
- pathsim-0.22.1/src/pathsim/optim/__init__.py +0 -1
- {pathsim-0.22.1 → pathsim-0.23.0}/.codecov.yml +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/.github/FUNDING.yml +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/.github/workflows/pypi_deployment.yml +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/.github/workflows/tests_codecov.yml +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/.github/workflows/urlchecker.yml +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/.gitignore +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/CITATION.cff +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/LICENSE.txt +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/README.md +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/conftest.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/.readthedocs.yaml +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/Makefile +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/requirements.txt +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/_ext/github_issues.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/_static/custom.css +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/_static/redirect.js +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/api.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/conf.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/contributing.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/abs_braking.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/algebraic_loop.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/billards.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/bouncing_ball.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/bouncing_pendulum.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/cascade_controller.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/checkpoints.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/chemical_reactor.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/coupled_oscillators.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/data/BouncingBall_ME.fmu +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/data/CoupledClutches_CS_linux64.fmu +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/data/CoupledClutches_CS_win64.fmu +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/data/Dahlquist.fmu +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/data/VanDerPol_ME.fmu +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/dcmotor_control.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/delta_sigma_adc.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/diode_circuit.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/elastic_pendulum.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/algebraicloop_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/billard_circle_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_both_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_result_events_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_result_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_result_timesteps_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_pendulum_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/cascade_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/coupled_oscillators_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/coupled_oscillators_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/delta_sigma_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/diode_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/elastic_pendulum_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/fmcw_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/fmcw_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/harmonic_oscillator_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/harmonic_oscillator_result_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/kalman_filter_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/linear_feedback_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/linear_feedback_result_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/linear_feedback_result_sensitivity_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/miller_frequency_divider_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/nonlinear_noisy_amplifier_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/ode_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/pendulum_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/pid_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/sar_adc_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_blockdiagram_slip_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_blockdiagram_stick_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/thermostat_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_result_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_lvl1_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_lvl2_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_lvl3_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/volterralotka_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/ode_blockdiagram_2.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/stick_slip_blockdiagram_slip.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/figures/stick_slip_blockdiagram_stick.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/fmcw_radar.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/fmu_cosimulation.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/fmu_model_exchange_bouncing_ball.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/fmu_model_exchange_vanderpol.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/harmonic_oscillator.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/kalman_filter.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/linear_feedback.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/lorenz_attractor.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/nested_subsystems.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/noisy_amplifier.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/pendulum.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/pid_controller.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/poincare_maps.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/rf_network_oneport.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/sar_adc.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/spectrum_analysis.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/stick_slip.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/switched_bouncing_ball.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/thermostat.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/transfer_function.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples/vanderpol.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/examples.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/figures/pathsim_object_hierarchy_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/figures/pathsim_solver_hierarchy_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/figures/sin_cos_blockdiagram_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/figures/system_g.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/index.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/logos/pathsim_icon.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/logos/pathsim_logo.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/logos/pathsim_simplistic_logo.png +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks._block.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.adder.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.amplifier.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.comparator.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.converters.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.counter.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.ctrl.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.delay.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.differentiator.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.discrete.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.dynsys.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.filters.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.fmu.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.function.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.integrator.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.kalman.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.lti.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.math.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.multiplier.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.noise.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.ode.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.relay.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.rf.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.rng.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.scope.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.sources.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.spectrum.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.switch.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.table.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.wrapper.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.connection.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.events._event.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.events.condition.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.events.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.events.schedule.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.events.zerocrossing.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.anderson.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.booster.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.numerical.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.operator.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.simulation.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers._rungekutta.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers._solver.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.bdf.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.dirk2.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.dirk3.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk32.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk4.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk43.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk54.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk85.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.euler.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.gear.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rk4.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkbs32.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkck54.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkdp54.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkdp87.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkf21.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkf45.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkf78.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkv65.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.ssprk22.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.ssprk33.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.ssprk34.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.steadystate.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.subsystem.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.adaptivebuffer.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.analysis.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.gilbert.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.logger.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.portreference.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.progresstracker.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.realtimeplotter.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.register.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/pathsim_docs.mplstyle +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/quickstart.ipynb +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/roadmap.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/docs/source/roadmap_generated.rst +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_abs_braking.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_adc.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_algebraicchain.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_algebraicloop.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_cascade.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_dcmotor.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_deltasigma.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_derivative.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_diode.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_dualslope.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_elastic_pendulum.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_feedback.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_filters.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_harmonic_oscillator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_kalman_filter.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_nested_subsystems.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_noise.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_pendulum.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_phasenoise.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_pid.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_pid_antiwindup.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_pid_vs_discretePID.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_radar.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_reactor.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_sar.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_solar.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_solver_hotswap.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_spectrum.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_spectrum_rf_oneport.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_steadystate.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_stickslip.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_transferfunction.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/example_vanderpol_subsystem.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_billards_sphere.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_bouncing_pendulum.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_bouncingball.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_bouncingball_friction.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_bouncingball_switched.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_integrator_reset.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_pulse.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_stickslip_event.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_thermostat.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_event/example_volterralotka_event.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_bonhoeffer_vanderpol.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_brusselator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_chemical.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_duffing.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_fairen_velarde.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_fitzhughnagumo.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_flame.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_glycolysis.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_lorenz.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_morse.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_robertson.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_roessler.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_thomas_cyclic.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_vanderpol.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/examples/examples_odes/example_volterralotka.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/git +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/setup.cfg +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/_constants.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/README.md +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/adder.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/amplifier.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/comparator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/converters.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/counter.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/ctrl.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/delay.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/differentiator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/discrete.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/divider.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/dynsys.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/filters.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/function.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/kalman.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/logic.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/lti.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/math.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/multiplier.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/noise.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/ode.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/relay.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/rf.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/rng.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/scope.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/sources.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/spectrum.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/switch.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/table.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/blocks/wrapper.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/connection.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/events/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/events/_event.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/events/condition.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/events/schedule.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/events/zerocrossing.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/exceptions.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/optim/booster.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/optim/operator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/README.md +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/_rungekutta.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/_solver.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/bdf.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/dirk2.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/dirk3.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/esdirk32.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/esdirk4.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/esdirk43.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/esdirk54.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/esdirk85.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/euler.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/gear.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rk4.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkbs32.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkck54.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkdp54.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkdp87.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkf21.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkf45.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkf78.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/rkv65.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/ssprk22.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/ssprk33.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/ssprk34.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/solvers/steadystate.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/subsystem.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/adaptivebuffer.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/analysis.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/deprecation.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/diagnostics.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/fmuwrapper.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/gilbert.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/graph.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/logger.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/mutable.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/portreference.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/progresstracker.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/realtimeplotter.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim/utils/register.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim.egg-info/dependency_links.txt +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim.egg-info/requires.txt +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/src/pathsim.egg-info/top_level.txt +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/README.md +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/CoupledClutches_CS.fmu +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/conftest.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_algebraic_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_bouncingball_friction_event_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_bouncingball_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_brusselator_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_cosim_fmu_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_counter_comparator_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_dynamical_system_ivp.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_fitzhughnagumo_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_harmonic_oscillator_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_linear_feedback_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_logic_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_lorenz_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_me_analytical.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_model_exchange_fmu_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_pid_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_relay_thermostat_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_rescale_delay_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_robertson_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_roessler_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_signal_processing_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_steadystate_transient_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_switch_lti_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_vanderpol_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/evals/test_volterralotka_system.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/_embedding.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/rf/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/rf/ring_slot.s2p +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/rf/ring_slot_meas.s1p +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/rf/test_rf.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_adder.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_amplifier.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_block.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_comparator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_converters.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_counter.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_ctrl.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_delay.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_differentiator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_discrete.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_divider.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_dynsys.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_filters.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_fmu.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_function.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_integrator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_kalman.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_logic.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_lti.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_math.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_multiplier.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_noise.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_ode.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_relay.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_rng.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_scope.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_sources.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_spectrum.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_switch.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_table.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/blocks/test_wrapper.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/events/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/events/test_condition.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/events/test_event.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/events/test_schedule.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/events/test_zerocrossing.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/optim/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/optim/test_numerical.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/optim/test_operator.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/_referenceproblems.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_bdf.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_dirk2.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_dirk3.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk32.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk4.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk43.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk54.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk85.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_euler.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_gear.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rfk21.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rk4.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkbs32.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkck54.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkdp54.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkdp87.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkf45.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkf78.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkv65.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_solver.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_ssprk22.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_ssprk33.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_ssprk34.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/solvers/test_steadystate.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/test_checkpoint.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/test_connection.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/test_diagnostics.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/test_simulation.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/test_subsystem.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/__init__.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_adaptivebuffer.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_analysis.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_fmuwrapper.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_gilbert.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_graph.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_logger.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_mutable.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_portreference.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_progresstracker.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_realtimeplotter.py +0 -0
- {pathsim-0.22.1 → pathsim-0.23.0}/tests/pathsim/utils/test_register.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pathsim
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.0
|
|
4
4
|
Summary: A differentiable block based hybrid system simulation framework.
|
|
5
5
|
Author-email: Milan Rother <milan.rother@gmx.de>
|
|
6
6
|
License: MIT
|
|
@@ -18,14 +18,14 @@ Requires-Dist: matplotlib>=3.1
|
|
|
18
18
|
Requires-Dist: scipy>=1.2
|
|
19
19
|
Provides-Extra: rf
|
|
20
20
|
Requires-Dist: scikit-rf; extra == "rf"
|
|
21
|
+
Provides-Extra: fmi
|
|
22
|
+
Requires-Dist: FMPy; extra == "fmi"
|
|
21
23
|
Provides-Extra: test
|
|
22
24
|
Requires-Dist: pytest; extra == "test"
|
|
23
25
|
Requires-Dist: pytest-cov; extra == "test"
|
|
24
26
|
Requires-Dist: pytest-xdist; extra == "test"
|
|
25
27
|
Requires-Dist: FMPy; extra == "test"
|
|
26
28
|
Requires-Dist: scikit-rf; extra == "test"
|
|
27
|
-
Provides-Extra: fmi
|
|
28
|
-
Requires-Dist: FMPy; extra == "fmi"
|
|
29
29
|
Dynamic: license-file
|
|
30
30
|
|
|
31
31
|
<p align="center">
|
|
@@ -19,9 +19,12 @@ requires-python = ">=3.8"
|
|
|
19
19
|
dependencies = ["numpy>=1.15", "matplotlib>=3.1", "scipy>=1.2"]
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
22
|
+
# Both `rf` and `fmi` are deprecated as of v0.22 — the corresponding blocks
|
|
23
|
+
# have moved to their own toolboxes (pathsim-rf, pathsim-fmi) and the extras
|
|
24
|
+
# will be removed in v1.0.0. Install the toolboxes directly instead.
|
|
22
25
|
rf = ["scikit-rf"]
|
|
23
|
-
test = ["pytest", "pytest-cov", "pytest-xdist", "FMPy", "scikit-rf"]
|
|
24
26
|
fmi = ["FMPy"]
|
|
27
|
+
test = ["pytest", "pytest-cov", "pytest-xdist", "FMPy", "scikit-rf"]
|
|
25
28
|
|
|
26
29
|
[project.urls]
|
|
27
30
|
Homepage = "https://github.com/pathsim/pathsim"
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.23.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 23, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g5fc53f553'
|
|
@@ -707,10 +707,34 @@ class Block:
|
|
|
707
707
|
return 0.0
|
|
708
708
|
|
|
709
709
|
|
|
710
|
+
def derivative(self, t):
|
|
711
|
+
"""Return the time derivative of the block state at time 't'.
|
|
712
|
+
|
|
713
|
+
This is the right hand side that the block feeds into its integration
|
|
714
|
+
engine. It is used to estimate a good initial timestep before a run.
|
|
715
|
+
The default implementation covers blocks whose dynamic path is defined
|
|
716
|
+
by an internal dynamic operator ('op_dyn'); blocks with a different
|
|
717
|
+
dynamic path reimplement this method, and stateless blocks return 'None'.
|
|
718
|
+
|
|
719
|
+
Parameters
|
|
720
|
+
----------
|
|
721
|
+
t : float
|
|
722
|
+
evaluation time
|
|
723
|
+
|
|
724
|
+
Returns
|
|
725
|
+
-------
|
|
726
|
+
dxdt : None | float | np.ndarray
|
|
727
|
+
time derivative of the block state, or 'None' if undefined
|
|
728
|
+
"""
|
|
729
|
+
if self.engine is None or self.op_dyn is None:
|
|
730
|
+
return None
|
|
731
|
+
return self.op_dyn(self.engine.state, self.inputs.to_array(), t)
|
|
732
|
+
|
|
733
|
+
|
|
710
734
|
def step(self, t, dt):
|
|
711
|
-
"""The 'step' method is used in transient simulations and performs an action
|
|
712
|
-
(numeric integration timestep, recording data, etc.) based on the current
|
|
713
|
-
inputs and the current internal state.
|
|
735
|
+
"""The 'step' method is used in transient simulations and performs an action
|
|
736
|
+
(numeric integration timestep, recording data, etc.) based on the current
|
|
737
|
+
inputs and the current internal state.
|
|
714
738
|
|
|
715
739
|
It performs one timestep for the internal states. For instant time blocks,
|
|
716
740
|
the 'step' method does not has to be implemented specifically.
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
#########################################################################################
|
|
2
|
+
##
|
|
3
|
+
## BOUNDARY VALUE PROBLEM BLOCK
|
|
4
|
+
## (pathsim/blocks/bvp.py)
|
|
5
|
+
##
|
|
6
|
+
#########################################################################################
|
|
7
|
+
|
|
8
|
+
# IMPORTS ===============================================================================
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
|
|
12
|
+
from scipy.integrate import solve_bvp
|
|
13
|
+
|
|
14
|
+
from ._block import Block
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# BLOCKS ================================================================================
|
|
18
|
+
|
|
19
|
+
class BVP1D(Block):
|
|
20
|
+
"""One-dimensional two-point boundary value problem (BVP) block.
|
|
21
|
+
|
|
22
|
+
Solves a first-order system of ordinary differential equations on a spatial
|
|
23
|
+
domain :math:`[a, b]` subject to two-point boundary conditions
|
|
24
|
+
|
|
25
|
+
.. math::
|
|
26
|
+
|
|
27
|
+
\\begin{align}
|
|
28
|
+
y'(x) &= \\mathrm{fun}(x, y, p, u) \\\\
|
|
29
|
+
0 &= \\mathrm{bc}(y(a), y(b), p, u)
|
|
30
|
+
\\end{align}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
with optional free parameters :math:`p` that are determined together with
|
|
34
|
+
the solution (e.g. eigenvalue problems). Here :math:`u` is the block input,
|
|
35
|
+
so the boundary data and right hand side can depend on external signals, and
|
|
36
|
+
the prime denotes the derivative with respect to the spatial coordinate
|
|
37
|
+
:math:`x`.
|
|
38
|
+
|
|
39
|
+
The problem is solved with :func:`scipy.integrate.solve_bvp` (a 4th-order
|
|
40
|
+
collocation method with residual based mesh refinement). At every evaluation
|
|
41
|
+
the solver is warm-started with the mesh, solution and parameters of the
|
|
42
|
+
previous solve, so slowly varying inputs are tracked cheaply. When the input
|
|
43
|
+
is unchanged since the last successful solve the re-solve is skipped
|
|
44
|
+
entirely, so repeated evaluations within a timestep (e.g. during the
|
|
45
|
+
algebraic loop) do not recompute the solution. The block output is the
|
|
46
|
+
solution sampled at the query points `x_eval` (row-major, equation by
|
|
47
|
+
equation) followed by the converged free parameters.
|
|
48
|
+
|
|
49
|
+
Note
|
|
50
|
+
----
|
|
51
|
+
Interior / multipoint conditions are not supported by
|
|
52
|
+
:func:`scipy.integrate.solve_bvp` and are therefore not available in this
|
|
53
|
+
block. If a solve does not converge, the previous output and warm-start are
|
|
54
|
+
retained and the `success` attribute is set to `False`.
|
|
55
|
+
|
|
56
|
+
Example
|
|
57
|
+
-------
|
|
58
|
+
Solve :math:`y'' = -y` with :math:`y(0) = 0`, :math:`y(\\pi/2) = 1`, whose
|
|
59
|
+
solution is :math:`y(x) = \\sin(x)`:
|
|
60
|
+
|
|
61
|
+
.. code-block:: python
|
|
62
|
+
|
|
63
|
+
import numpy as np
|
|
64
|
+
from pathsim.blocks import BVP1D
|
|
65
|
+
|
|
66
|
+
#first-order system y0' = y1, y1' = -y0
|
|
67
|
+
def fun(x, y, p, u):
|
|
68
|
+
return np.vstack([y[1], -y[0]])
|
|
69
|
+
|
|
70
|
+
def bc(ya, yb, p, u):
|
|
71
|
+
return np.array([ya[0], yb[0] - 1.0])
|
|
72
|
+
|
|
73
|
+
bvp = BVP1D(fun, bc, n=2, domain=(0.0, np.pi/2))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
An eigenvalue problem :math:`y'' + p^2 y = 0`, :math:`y(0) = y(1) = 0`,
|
|
77
|
+
:math:`y'(0) = 1`, with the free parameter `p` converging to :math:`\\pi`:
|
|
78
|
+
|
|
79
|
+
.. code-block:: python
|
|
80
|
+
|
|
81
|
+
import numpy as np
|
|
82
|
+
from pathsim.blocks import BVP1D
|
|
83
|
+
|
|
84
|
+
def fun(x, y, p, u):
|
|
85
|
+
return np.vstack([y[1], -p[0]**2 * y[0]])
|
|
86
|
+
|
|
87
|
+
def bc(ya, yb, p, u):
|
|
88
|
+
return np.array([ya[0], yb[0], ya[1] - 1.0])
|
|
89
|
+
|
|
90
|
+
bvp = BVP1D(fun, bc, n=2, domain=(0.0, 1.0), p0=[3.0],
|
|
91
|
+
y0=lambda x: np.vstack([np.sin(np.pi*x), np.pi*np.cos(np.pi*x)]))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
Parameters
|
|
95
|
+
----------
|
|
96
|
+
fun : callable
|
|
97
|
+
right hand side of the spatial ODE system with signature
|
|
98
|
+
`fun(x, y, p, u)` where `x` is the mesh `(m,)`, `y` is `(n, m)`, `p` are
|
|
99
|
+
the free parameters and `u` is the block input, returning `(n, m)`
|
|
100
|
+
bc : callable
|
|
101
|
+
boundary condition residuals with signature `bc(ya, yb, p, u)` returning
|
|
102
|
+
an array of dimension `n + n_p`
|
|
103
|
+
n : int
|
|
104
|
+
number of first-order equations
|
|
105
|
+
domain : tuple[float, float]
|
|
106
|
+
spatial domain `(a, b)`
|
|
107
|
+
n_nodes : int
|
|
108
|
+
number of nodes in the initial mesh
|
|
109
|
+
x_eval : array[float], None
|
|
110
|
+
query points for the output, defaults to `n_nodes` points spanning the
|
|
111
|
+
domain
|
|
112
|
+
y0 : array[float], callable, None
|
|
113
|
+
initial guess for the solution, either an `(n, n_nodes)` array, a
|
|
114
|
+
callable `y0(x)` returning `(n, m)`, or `None` for an all-zero guess
|
|
115
|
+
p0 : array[float], None
|
|
116
|
+
initial guess for the free parameters, `None` if there are none
|
|
117
|
+
tol : float
|
|
118
|
+
solver tolerance passed to :func:`scipy.integrate.solve_bvp`
|
|
119
|
+
|
|
120
|
+
Attributes
|
|
121
|
+
----------
|
|
122
|
+
success : bool
|
|
123
|
+
whether the most recent solve converged
|
|
124
|
+
x : array[float]
|
|
125
|
+
current (refined) spatial mesh
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
def __init__(
|
|
129
|
+
self,
|
|
130
|
+
fun=lambda x, y, p, u: np.zeros_like(y),
|
|
131
|
+
bc=lambda ya, yb, p, u: ya,
|
|
132
|
+
n=1,
|
|
133
|
+
domain=(0.0, 1.0),
|
|
134
|
+
n_nodes=11,
|
|
135
|
+
x_eval=None,
|
|
136
|
+
y0=None,
|
|
137
|
+
p0=None,
|
|
138
|
+
tol=1e-6
|
|
139
|
+
):
|
|
140
|
+
|
|
141
|
+
super().__init__()
|
|
142
|
+
|
|
143
|
+
#spatial ode and boundary condition residuals
|
|
144
|
+
self.fun = fun
|
|
145
|
+
self.bc = bc
|
|
146
|
+
|
|
147
|
+
#problem dimensions
|
|
148
|
+
self.n = int(n)
|
|
149
|
+
a, b = domain
|
|
150
|
+
self.domain = (float(a), float(b))
|
|
151
|
+
|
|
152
|
+
#free parameters
|
|
153
|
+
self._has_p = p0 is not None
|
|
154
|
+
self.p0 = None if p0 is None else np.atleast_1d(p0).astype(float)
|
|
155
|
+
|
|
156
|
+
#query points for the output
|
|
157
|
+
self.x_eval = (np.linspace(a, b, n_nodes) if x_eval is None
|
|
158
|
+
else np.asarray(x_eval, dtype=float))
|
|
159
|
+
|
|
160
|
+
#solver tolerance
|
|
161
|
+
self.tol = tol
|
|
162
|
+
|
|
163
|
+
#initial mesh and solution guess (used as warm-start)
|
|
164
|
+
self._x0 = np.linspace(a, b, n_nodes)
|
|
165
|
+
if y0 is None:
|
|
166
|
+
self._y0 = np.zeros((self.n, n_nodes))
|
|
167
|
+
elif callable(y0):
|
|
168
|
+
self._y0 = np.atleast_2d(y0(self._x0)).astype(float)
|
|
169
|
+
else:
|
|
170
|
+
self._y0 = np.broadcast_to(
|
|
171
|
+
np.atleast_2d(y0), (self.n, n_nodes)
|
|
172
|
+
).astype(float).copy()
|
|
173
|
+
|
|
174
|
+
#warm-start state
|
|
175
|
+
self._x = self._x0.copy()
|
|
176
|
+
self._y = self._y0.copy()
|
|
177
|
+
self._p = None if self.p0 is None else self.p0.copy()
|
|
178
|
+
|
|
179
|
+
#solve status and sampled solution of the most recent solve
|
|
180
|
+
self.success = False
|
|
181
|
+
self._y_eval = np.zeros((self.n, self.x_eval.size))
|
|
182
|
+
|
|
183
|
+
#input of the most recent successful solve, used to skip redundant
|
|
184
|
+
#re-solves when the boundary data has not changed between evaluations
|
|
185
|
+
self._u_last = None
|
|
186
|
+
|
|
187
|
+
#pre-size the output register
|
|
188
|
+
n_out = self.n * self.x_eval.size + (self._p.size if self._has_p else 0)
|
|
189
|
+
self.outputs.update_from_array(np.zeros(n_out))
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def __len__(self):
|
|
193
|
+
#boundary data flows in through the input, so the block has a passthrough
|
|
194
|
+
return 1 if self._active else 0
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def reset(self):
|
|
198
|
+
"""Reset inputs, outputs and the warm-start mesh, solution and
|
|
199
|
+
parameters to their initial values.
|
|
200
|
+
"""
|
|
201
|
+
super().reset()
|
|
202
|
+
self._x = self._x0.copy()
|
|
203
|
+
self._y = self._y0.copy()
|
|
204
|
+
self._p = None if self.p0 is None else self.p0.copy()
|
|
205
|
+
self.success = False
|
|
206
|
+
self._u_last = None
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def solution(self):
|
|
210
|
+
"""Return the most recent solution sampled at the query points.
|
|
211
|
+
|
|
212
|
+
Returns
|
|
213
|
+
-------
|
|
214
|
+
y : array[array[float]]
|
|
215
|
+
solution of shape `(n, len(x_eval))`
|
|
216
|
+
"""
|
|
217
|
+
return self._y_eval.copy()
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def parameters(self):
|
|
221
|
+
"""Return the most recent converged free parameters.
|
|
222
|
+
|
|
223
|
+
Returns
|
|
224
|
+
-------
|
|
225
|
+
p : array[float], None
|
|
226
|
+
converged free parameters, `None` if there are none
|
|
227
|
+
"""
|
|
228
|
+
return None if self._p is None else self._p.copy()
|
|
229
|
+
|
|
230
|
+
@property
|
|
231
|
+
def x(self):
|
|
232
|
+
return self._x
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def update(self, t):
|
|
236
|
+
"""Solve the boundary value problem for the current input and expose the
|
|
237
|
+
sampled solution and converged parameters at the output.
|
|
238
|
+
|
|
239
|
+
Parameters
|
|
240
|
+
----------
|
|
241
|
+
t : float
|
|
242
|
+
evaluation time
|
|
243
|
+
"""
|
|
244
|
+
|
|
245
|
+
#current block input
|
|
246
|
+
u = self.inputs.to_array()
|
|
247
|
+
|
|
248
|
+
#skip the solve if the boundary data is unchanged since the last
|
|
249
|
+
#successful solve; the warm-start and output are still valid
|
|
250
|
+
if self._u_last is not None and np.array_equal(u, self._u_last):
|
|
251
|
+
return
|
|
252
|
+
|
|
253
|
+
#scipy callbacks, with or without free parameters
|
|
254
|
+
if self._has_p:
|
|
255
|
+
_fun = lambda x, y, p: self.fun(x, y, p, u)
|
|
256
|
+
_bc = lambda ya, yb, p: self.bc(ya, yb, p, u)
|
|
257
|
+
sol = solve_bvp(_fun, _bc, self._x, self._y, p=self._p, tol=self.tol)
|
|
258
|
+
else:
|
|
259
|
+
_fun = lambda x, y: self.fun(x, y, None, u)
|
|
260
|
+
_bc = lambda ya, yb: self.bc(ya, yb, None, u)
|
|
261
|
+
sol = solve_bvp(_fun, _bc, self._x, self._y, tol=self.tol)
|
|
262
|
+
|
|
263
|
+
self.success = bool(sol.success)
|
|
264
|
+
|
|
265
|
+
#keep the previous output and warm-start if the solve failed
|
|
266
|
+
if not self.success:
|
|
267
|
+
return
|
|
268
|
+
|
|
269
|
+
#warm-start the next solve with the refined mesh and solution, and
|
|
270
|
+
#remember the input so an unchanged re-evaluation can be skipped
|
|
271
|
+
self._x, self._y = sol.x, sol.y
|
|
272
|
+
if self._has_p:
|
|
273
|
+
self._p = sol.p
|
|
274
|
+
self._u_last = u.copy()
|
|
275
|
+
|
|
276
|
+
#sample the solution at the query points and assemble the output
|
|
277
|
+
self._y_eval = sol.sol(self.x_eval)[:self.n]
|
|
278
|
+
y_flat = self._y_eval.ravel()
|
|
279
|
+
if self._has_p:
|
|
280
|
+
y_flat = np.concatenate([y_flat, self._p])
|
|
281
|
+
self.outputs.update_from_array(y_flat)
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#########################################################################################
|
|
2
|
+
##
|
|
3
|
+
## ALGEBRAIC CONSTRAINT BLOCK
|
|
4
|
+
## (pathsim/blocks/constraint.py)
|
|
5
|
+
##
|
|
6
|
+
#########################################################################################
|
|
7
|
+
|
|
8
|
+
# IMPORTS ===============================================================================
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
|
|
12
|
+
from ._block import Block
|
|
13
|
+
|
|
14
|
+
from ..optim.anderson import NewtonAnderson, solve_root
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# BLOCKS ================================================================================
|
|
18
|
+
|
|
19
|
+
class AlgebraicConstraint(Block):
|
|
20
|
+
"""Solve a nonlinear algebraic constraint for its internal unknown.
|
|
21
|
+
|
|
22
|
+
At every evaluation the block solves the square nonlinear system
|
|
23
|
+
|
|
24
|
+
.. math::
|
|
25
|
+
|
|
26
|
+
\\mathrm{func}(x, u) = 0
|
|
27
|
+
|
|
28
|
+
for the internal unknown :math:`x` given the current block input :math:`u`,
|
|
29
|
+
and exposes the converged :math:`x` at its output:
|
|
30
|
+
|
|
31
|
+
.. math::
|
|
32
|
+
|
|
33
|
+
y = x \\quad\\text{such that}\\quad \\mathrm{func}(x, u) = 0
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
The constraint is resolved with an internal Anderson-accelerated damped
|
|
37
|
+
Newton iteration (:class:`.NewtonAnderson`) that is warm-started with the
|
|
38
|
+
solution of the previous evaluation, so typically only a couple of
|
|
39
|
+
iterations are required.
|
|
40
|
+
If no analytical Jacobian :math:`\\partial \\mathrm{func} / \\partial x` is
|
|
41
|
+
supplied it is approximated by central finite differences.
|
|
42
|
+
|
|
43
|
+
This is the building block for steady-state operating points, implicit
|
|
44
|
+
constitutive laws, chemical / phase equilibria and quasi-steady-state
|
|
45
|
+
approximations, where an output is defined implicitly rather than
|
|
46
|
+
explicitly. The input :math:`u` is wired dynamically through the block
|
|
47
|
+
ports, so no input dimension has to be declared in advance.
|
|
48
|
+
|
|
49
|
+
Note
|
|
50
|
+
----
|
|
51
|
+
This block is purely algebraic. Its constraint solve is part of the
|
|
52
|
+
algebraic component of the global system DAE and is therefore evaluated
|
|
53
|
+
multiple times per timestep, each time `Simulation._update(t)` is called.
|
|
54
|
+
The residual `func` must be purely algebraic and must not introduce states,
|
|
55
|
+
delay or other dynamic behaviour.
|
|
56
|
+
|
|
57
|
+
Example
|
|
58
|
+
-------
|
|
59
|
+
Compute the square root of the input as the positive root of
|
|
60
|
+
:math:`x^2 - u = 0`:
|
|
61
|
+
|
|
62
|
+
.. code-block:: python
|
|
63
|
+
|
|
64
|
+
import numpy as np
|
|
65
|
+
from pathsim.blocks import AlgebraicConstraint
|
|
66
|
+
|
|
67
|
+
#residual of the constraint x**2 - u = 0
|
|
68
|
+
def func(x, u):
|
|
69
|
+
return x**2 - u
|
|
70
|
+
|
|
71
|
+
ac = AlgebraicConstraint(func, x0=1.0)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
A vector valued example, the equilibrium of a simple reversible reaction
|
|
75
|
+
:math:`A \\rightleftharpoons B` with conservation :math:`x_A + x_B = u`:
|
|
76
|
+
|
|
77
|
+
.. code-block:: python
|
|
78
|
+
|
|
79
|
+
import numpy as np
|
|
80
|
+
from pathsim.blocks import AlgebraicConstraint
|
|
81
|
+
|
|
82
|
+
k_f, k_r = 2.0, 1.0
|
|
83
|
+
|
|
84
|
+
def func(x, u):
|
|
85
|
+
return np.array([
|
|
86
|
+
k_f*x[0] - k_r*x[1], #reaction equilibrium
|
|
87
|
+
x[0] + x[1] - u[0] #mass conservation
|
|
88
|
+
])
|
|
89
|
+
|
|
90
|
+
ac = AlgebraicConstraint(func, x0=[0.5, 0.5])
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
Parameters
|
|
94
|
+
----------
|
|
95
|
+
func : callable
|
|
96
|
+
residual function of the constraint with signature `func(x, u)` that
|
|
97
|
+
returns an array of the same dimension as `x`, where `x` is the
|
|
98
|
+
internal unknown and `u` is the block input array
|
|
99
|
+
x0 : float, array[float]
|
|
100
|
+
initial value / initial guess for the internal unknown `x`
|
|
101
|
+
jac : callable, None
|
|
102
|
+
optional analytical jacobian of `func` with respect to `x` with
|
|
103
|
+
signature `jac(x, u)`, central finite differences are used if `None`
|
|
104
|
+
|
|
105
|
+
Attributes
|
|
106
|
+
----------
|
|
107
|
+
opt : NewtonAnderson
|
|
108
|
+
internal Newton-Anderson optimizer for the algebraic constraint
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
def __init__(self, func=lambda x, u: x, x0=0.0, jac=None):
|
|
112
|
+
super().__init__()
|
|
113
|
+
|
|
114
|
+
#some checks to ensure that function works correctly
|
|
115
|
+
if not callable(func):
|
|
116
|
+
raise ValueError(f"'{func}' is not callable")
|
|
117
|
+
|
|
118
|
+
#residual function and optional jacobian of the constraint
|
|
119
|
+
self.func = func
|
|
120
|
+
self.jac = jac
|
|
121
|
+
|
|
122
|
+
#initial guess and warm-start for the internal unknown
|
|
123
|
+
self.x0 = np.atleast_1d(x0).astype(float)
|
|
124
|
+
self._x = self.x0.copy()
|
|
125
|
+
|
|
126
|
+
#internal optimizer for the constraint (consistent with implicit solvers)
|
|
127
|
+
self.opt = NewtonAnderson()
|
|
128
|
+
|
|
129
|
+
#pre-size the output register to the unknown dimension
|
|
130
|
+
self.outputs.update_from_array(self._x)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def __len__(self):
|
|
134
|
+
return 1 if self._active else 0
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def reset(self):
|
|
138
|
+
"""Reset inputs, outputs and the warm-start of the internal unknown."""
|
|
139
|
+
super().reset()
|
|
140
|
+
self._x = self.x0.copy()
|
|
141
|
+
self.outputs.update_from_array(self._x)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def update(self, t):
|
|
145
|
+
"""Solve the algebraic constraint for the current input and set the
|
|
146
|
+
output to the converged internal unknown.
|
|
147
|
+
|
|
148
|
+
Parameters
|
|
149
|
+
----------
|
|
150
|
+
t : float
|
|
151
|
+
evaluation time
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
#current block input
|
|
155
|
+
u = self.inputs.to_array()
|
|
156
|
+
|
|
157
|
+
#residual and optional jacobian as functions of x at fixed u
|
|
158
|
+
_func = lambda x: self.func(x, u)
|
|
159
|
+
_jac = None if self.jac is None else (lambda x: self.jac(x, u))
|
|
160
|
+
|
|
161
|
+
#solve the constraint, warm-started with the previous solution
|
|
162
|
+
self._x, _, _ = solve_root(self.opt, _func, self._x, _jac)
|
|
163
|
+
|
|
164
|
+
#expose the converged unknown
|
|
165
|
+
self.outputs.update_from_array(self._x)
|