pathsim 0.22.2__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.
Files changed (485) hide show
  1. {pathsim-0.22.2 → pathsim-0.23.0}/PKG-INFO +1 -1
  2. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/_version.py +3 -3
  3. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/__init__.py +3 -0
  4. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/_block.py +27 -3
  5. pathsim-0.23.0/src/pathsim/blocks/bvp.py +281 -0
  6. pathsim-0.23.0/src/pathsim/blocks/constraint.py +165 -0
  7. pathsim-0.23.0/src/pathsim/blocks/dae.py +854 -0
  8. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/integrator.py +17 -1
  9. pathsim-0.23.0/src/pathsim/optim/__init__.py +3 -0
  10. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/optim/anderson.py +141 -3
  11. pathsim-0.23.0/src/pathsim/optim/newton.py +230 -0
  12. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/optim/numerical.py +14 -13
  13. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/simulation.py +288 -0
  14. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim.egg-info/PKG-INFO +1 -1
  15. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim.egg-info/SOURCES.txt +12 -0
  16. pathsim-0.23.0/src/pathsim.egg-info/scm_file_list.json +478 -0
  17. pathsim-0.23.0/src/pathsim.egg-info/scm_version.json +8 -0
  18. pathsim-0.23.0/tests/pathsim/blocks/test_bvp.py +173 -0
  19. pathsim-0.23.0/tests/pathsim/blocks/test_constraint.py +151 -0
  20. pathsim-0.23.0/tests/pathsim/blocks/test_dae.py +367 -0
  21. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/optim/test_anderson.py +88 -2
  22. pathsim-0.23.0/tests/pathsim/optim/test_newton.py +119 -0
  23. pathsim-0.23.0/tests/pathsim/test_auto_initial_step.py +107 -0
  24. pathsim-0.23.0/tests/pathsim/test_simulation_pss.py +106 -0
  25. pathsim-0.22.2/src/pathsim/optim/__init__.py +0 -1
  26. {pathsim-0.22.2 → pathsim-0.23.0}/.codecov.yml +0 -0
  27. {pathsim-0.22.2 → pathsim-0.23.0}/.github/FUNDING.yml +0 -0
  28. {pathsim-0.22.2 → pathsim-0.23.0}/.github/workflows/pypi_deployment.yml +0 -0
  29. {pathsim-0.22.2 → pathsim-0.23.0}/.github/workflows/tests_codecov.yml +0 -0
  30. {pathsim-0.22.2 → pathsim-0.23.0}/.github/workflows/urlchecker.yml +0 -0
  31. {pathsim-0.22.2 → pathsim-0.23.0}/.gitignore +0 -0
  32. {pathsim-0.22.2 → pathsim-0.23.0}/CITATION.cff +0 -0
  33. {pathsim-0.22.2 → pathsim-0.23.0}/LICENSE.txt +0 -0
  34. {pathsim-0.22.2 → pathsim-0.23.0}/README.md +0 -0
  35. {pathsim-0.22.2 → pathsim-0.23.0}/conftest.py +0 -0
  36. {pathsim-0.22.2 → pathsim-0.23.0}/docs/.readthedocs.yaml +0 -0
  37. {pathsim-0.22.2 → pathsim-0.23.0}/docs/Makefile +0 -0
  38. {pathsim-0.22.2 → pathsim-0.23.0}/docs/requirements.txt +0 -0
  39. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/_ext/github_issues.py +0 -0
  40. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/_static/custom.css +0 -0
  41. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/_static/redirect.js +0 -0
  42. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/api.rst +0 -0
  43. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/conf.py +0 -0
  44. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/contributing.rst +0 -0
  45. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/abs_braking.ipynb +0 -0
  46. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/algebraic_loop.ipynb +0 -0
  47. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/billards.ipynb +0 -0
  48. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/bouncing_ball.ipynb +0 -0
  49. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/bouncing_pendulum.ipynb +0 -0
  50. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/cascade_controller.ipynb +0 -0
  51. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/checkpoints.ipynb +0 -0
  52. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/chemical_reactor.ipynb +0 -0
  53. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/coupled_oscillators.ipynb +0 -0
  54. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/data/BouncingBall_ME.fmu +0 -0
  55. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/data/CoupledClutches_CS_linux64.fmu +0 -0
  56. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/data/CoupledClutches_CS_win64.fmu +0 -0
  57. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/data/Dahlquist.fmu +0 -0
  58. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/data/VanDerPol_ME.fmu +0 -0
  59. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/dcmotor_control.ipynb +0 -0
  60. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/delta_sigma_adc.ipynb +0 -0
  61. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/diode_circuit.ipynb +0 -0
  62. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/elastic_pendulum.ipynb +0 -0
  63. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/algebraicloop_blockdiagram_g.png +0 -0
  64. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/billard_circle_g.png +0 -0
  65. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_blockdiagram_g.png +0 -0
  66. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_both_g.png +0 -0
  67. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_g.png +0 -0
  68. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_result_events_g.png +0 -0
  69. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_result_g.png +0 -0
  70. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_ball_result_timesteps_g.png +0 -0
  71. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/bouncing_pendulum_blockdiagram_g.png +0 -0
  72. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/cascade_blockdiagram_g.png +0 -0
  73. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/coupled_oscillators_blockdiagram_g.png +0 -0
  74. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/coupled_oscillators_g.png +0 -0
  75. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/delta_sigma_blockdiagram_g.png +0 -0
  76. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/diode_blockdiagram_g.png +0 -0
  77. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/elastic_pendulum_g.png +0 -0
  78. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/fmcw_blockdiagram_g.png +0 -0
  79. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/fmcw_g.png +0 -0
  80. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/harmonic_oscillator_g.png +0 -0
  81. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/harmonic_oscillator_result_g.png +0 -0
  82. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/kalman_filter_blockdiagram_g.png +0 -0
  83. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/linear_feedback_blockdiagram_g.png +0 -0
  84. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/linear_feedback_result_g.png +0 -0
  85. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/linear_feedback_result_sensitivity_g.png +0 -0
  86. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/miller_frequency_divider_blockdiagram_g.png +0 -0
  87. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/nonlinear_noisy_amplifier_blockdiagram_g.png +0 -0
  88. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/ode_blockdiagram_g.png +0 -0
  89. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/pendulum_blockdiagram_g.png +0 -0
  90. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/pid_blockdiagram_g.png +0 -0
  91. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/sar_adc_blockdiagram_g.png +0 -0
  92. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_blockdiagram_g.png +0 -0
  93. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_blockdiagram_slip_g.png +0 -0
  94. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_blockdiagram_stick_g.png +0 -0
  95. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/stick_slip_g.png +0 -0
  96. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/thermostat_blockdiagram_g.png +0 -0
  97. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_blockdiagram_g.png +0 -0
  98. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_result_g.png +0 -0
  99. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_blockdiagram_g.png +0 -0
  100. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_lvl1_g.png +0 -0
  101. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_lvl2_g.png +0 -0
  102. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/vanderpol_subsystem_lvl3_g.png +0 -0
  103. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/figures_g/volterralotka_blockdiagram_g.png +0 -0
  104. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/ode_blockdiagram_2.png +0 -0
  105. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/stick_slip_blockdiagram_slip.png +0 -0
  106. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/figures/stick_slip_blockdiagram_stick.png +0 -0
  107. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/fmcw_radar.ipynb +0 -0
  108. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/fmu_cosimulation.ipynb +0 -0
  109. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/fmu_model_exchange_bouncing_ball.ipynb +0 -0
  110. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/fmu_model_exchange_vanderpol.ipynb +0 -0
  111. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/harmonic_oscillator.ipynb +0 -0
  112. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/kalman_filter.ipynb +0 -0
  113. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/linear_feedback.ipynb +0 -0
  114. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/lorenz_attractor.ipynb +0 -0
  115. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/nested_subsystems.ipynb +0 -0
  116. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/noisy_amplifier.ipynb +0 -0
  117. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/pendulum.ipynb +0 -0
  118. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/pid_controller.ipynb +0 -0
  119. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/poincare_maps.ipynb +0 -0
  120. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/rf_network_oneport.ipynb +0 -0
  121. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/sar_adc.ipynb +0 -0
  122. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/spectrum_analysis.ipynb +0 -0
  123. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/stick_slip.ipynb +0 -0
  124. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/switched_bouncing_ball.ipynb +0 -0
  125. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/thermostat.ipynb +0 -0
  126. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/transfer_function.ipynb +0 -0
  127. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples/vanderpol.ipynb +0 -0
  128. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/examples.rst +0 -0
  129. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/figures/pathsim_object_hierarchy_g.png +0 -0
  130. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/figures/pathsim_solver_hierarchy_g.png +0 -0
  131. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/figures/sin_cos_blockdiagram_g.png +0 -0
  132. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/figures/system_g.png +0 -0
  133. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/index.rst +0 -0
  134. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/logos/pathsim_icon.png +0 -0
  135. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/logos/pathsim_logo.png +0 -0
  136. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/logos/pathsim_simplistic_logo.png +0 -0
  137. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks._block.rst +0 -0
  138. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.adder.rst +0 -0
  139. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.amplifier.rst +0 -0
  140. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.comparator.rst +0 -0
  141. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.converters.rst +0 -0
  142. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.counter.rst +0 -0
  143. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.ctrl.rst +0 -0
  144. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.delay.rst +0 -0
  145. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.differentiator.rst +0 -0
  146. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.discrete.rst +0 -0
  147. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.dynsys.rst +0 -0
  148. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.filters.rst +0 -0
  149. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.fmu.rst +0 -0
  150. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.function.rst +0 -0
  151. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.integrator.rst +0 -0
  152. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.kalman.rst +0 -0
  153. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.lti.rst +0 -0
  154. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.math.rst +0 -0
  155. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.multiplier.rst +0 -0
  156. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.noise.rst +0 -0
  157. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.ode.rst +0 -0
  158. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.relay.rst +0 -0
  159. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.rf.rst +0 -0
  160. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.rng.rst +0 -0
  161. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.rst +0 -0
  162. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.scope.rst +0 -0
  163. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.sources.rst +0 -0
  164. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.spectrum.rst +0 -0
  165. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.switch.rst +0 -0
  166. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.table.rst +0 -0
  167. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.blocks.wrapper.rst +0 -0
  168. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.connection.rst +0 -0
  169. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.events._event.rst +0 -0
  170. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.events.condition.rst +0 -0
  171. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.events.rst +0 -0
  172. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.events.schedule.rst +0 -0
  173. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.events.zerocrossing.rst +0 -0
  174. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.anderson.rst +0 -0
  175. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.booster.rst +0 -0
  176. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.numerical.rst +0 -0
  177. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.operator.rst +0 -0
  178. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.optim.rst +0 -0
  179. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.simulation.rst +0 -0
  180. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers._rungekutta.rst +0 -0
  181. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers._solver.rst +0 -0
  182. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.bdf.rst +0 -0
  183. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.dirk2.rst +0 -0
  184. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.dirk3.rst +0 -0
  185. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk32.rst +0 -0
  186. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk4.rst +0 -0
  187. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk43.rst +0 -0
  188. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk54.rst +0 -0
  189. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.esdirk85.rst +0 -0
  190. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.euler.rst +0 -0
  191. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.gear.rst +0 -0
  192. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rk4.rst +0 -0
  193. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkbs32.rst +0 -0
  194. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkck54.rst +0 -0
  195. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkdp54.rst +0 -0
  196. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkdp87.rst +0 -0
  197. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkf21.rst +0 -0
  198. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkf45.rst +0 -0
  199. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkf78.rst +0 -0
  200. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rkv65.rst +0 -0
  201. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.rst +0 -0
  202. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.ssprk22.rst +0 -0
  203. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.ssprk33.rst +0 -0
  204. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.ssprk34.rst +0 -0
  205. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.solvers.steadystate.rst +0 -0
  206. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.subsystem.rst +0 -0
  207. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.adaptivebuffer.rst +0 -0
  208. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.analysis.rst +0 -0
  209. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.gilbert.rst +0 -0
  210. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.logger.rst +0 -0
  211. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.portreference.rst +0 -0
  212. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.progresstracker.rst +0 -0
  213. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.realtimeplotter.rst +0 -0
  214. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.register.rst +0 -0
  215. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/modules/pathsim.utils.rst +0 -0
  216. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/pathsim_docs.mplstyle +0 -0
  217. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/quickstart.ipynb +0 -0
  218. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/roadmap.rst +0 -0
  219. {pathsim-0.22.2 → pathsim-0.23.0}/docs/source/roadmap_generated.rst +0 -0
  220. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_abs_braking.py +0 -0
  221. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_adc.py +0 -0
  222. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_algebraicchain.py +0 -0
  223. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_algebraicloop.py +0 -0
  224. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_cascade.py +0 -0
  225. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_dcmotor.py +0 -0
  226. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_deltasigma.py +0 -0
  227. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_derivative.py +0 -0
  228. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_diode.py +0 -0
  229. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_dualslope.py +0 -0
  230. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_elastic_pendulum.py +0 -0
  231. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_feedback.py +0 -0
  232. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_filters.py +0 -0
  233. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_harmonic_oscillator.py +0 -0
  234. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_kalman_filter.py +0 -0
  235. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_nested_subsystems.py +0 -0
  236. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_noise.py +0 -0
  237. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_pendulum.py +0 -0
  238. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_phasenoise.py +0 -0
  239. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_pid.py +0 -0
  240. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_pid_antiwindup.py +0 -0
  241. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_pid_vs_discretePID.py +0 -0
  242. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_radar.py +0 -0
  243. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_reactor.py +0 -0
  244. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_sar.py +0 -0
  245. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_solar.py +0 -0
  246. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_solver_hotswap.py +0 -0
  247. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_spectrum.py +0 -0
  248. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_spectrum_rf_oneport.py +0 -0
  249. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_steadystate.py +0 -0
  250. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_stickslip.py +0 -0
  251. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_transferfunction.py +0 -0
  252. {pathsim-0.22.2 → pathsim-0.23.0}/examples/example_vanderpol_subsystem.py +0 -0
  253. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_billards_sphere.py +0 -0
  254. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_bouncing_pendulum.py +0 -0
  255. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_bouncingball.py +0 -0
  256. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_bouncingball_friction.py +0 -0
  257. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_bouncingball_switched.py +0 -0
  258. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_integrator_reset.py +0 -0
  259. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_pulse.py +0 -0
  260. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_stickslip_event.py +0 -0
  261. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_thermostat.py +0 -0
  262. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_event/example_volterralotka_event.py +0 -0
  263. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_bonhoeffer_vanderpol.py +0 -0
  264. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_brusselator.py +0 -0
  265. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_chemical.py +0 -0
  266. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_duffing.py +0 -0
  267. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_fairen_velarde.py +0 -0
  268. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_fitzhughnagumo.py +0 -0
  269. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_flame.py +0 -0
  270. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_glycolysis.py +0 -0
  271. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_lorenz.py +0 -0
  272. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_morse.py +0 -0
  273. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_robertson.py +0 -0
  274. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_roessler.py +0 -0
  275. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_thomas_cyclic.py +0 -0
  276. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_vanderpol.py +0 -0
  277. {pathsim-0.22.2 → pathsim-0.23.0}/examples/examples_odes/example_volterralotka.py +0 -0
  278. {pathsim-0.22.2 → pathsim-0.23.0}/git +0 -0
  279. {pathsim-0.22.2 → pathsim-0.23.0}/pyproject.toml +0 -0
  280. {pathsim-0.22.2 → pathsim-0.23.0}/setup.cfg +0 -0
  281. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/__init__.py +0 -0
  282. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/_constants.py +0 -0
  283. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/README.md +0 -0
  284. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/adder.py +0 -0
  285. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/amplifier.py +0 -0
  286. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/comparator.py +0 -0
  287. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/converters.py +0 -0
  288. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/counter.py +0 -0
  289. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/ctrl.py +0 -0
  290. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/delay.py +0 -0
  291. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/differentiator.py +0 -0
  292. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/discrete.py +0 -0
  293. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/divider.py +0 -0
  294. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/dynsys.py +0 -0
  295. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/filters.py +0 -0
  296. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/fmu.py +0 -0
  297. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/function.py +0 -0
  298. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/kalman.py +0 -0
  299. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/logic.py +0 -0
  300. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/lti.py +0 -0
  301. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/math.py +0 -0
  302. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/multiplier.py +0 -0
  303. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/noise.py +0 -0
  304. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/ode.py +0 -0
  305. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/relay.py +0 -0
  306. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/rf.py +0 -0
  307. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/rng.py +0 -0
  308. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/scope.py +0 -0
  309. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/sources.py +0 -0
  310. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/spectrum.py +0 -0
  311. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/switch.py +0 -0
  312. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/table.py +0 -0
  313. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/blocks/wrapper.py +0 -0
  314. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/connection.py +0 -0
  315. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/events/__init__.py +0 -0
  316. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/events/_event.py +0 -0
  317. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/events/condition.py +0 -0
  318. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/events/schedule.py +0 -0
  319. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/events/zerocrossing.py +0 -0
  320. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/exceptions.py +0 -0
  321. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/optim/booster.py +0 -0
  322. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/optim/operator.py +0 -0
  323. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/README.md +0 -0
  324. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/__init__.py +0 -0
  325. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/_rungekutta.py +0 -0
  326. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/_solver.py +0 -0
  327. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/bdf.py +0 -0
  328. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/dirk2.py +0 -0
  329. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/dirk3.py +0 -0
  330. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/esdirk32.py +0 -0
  331. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/esdirk4.py +0 -0
  332. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/esdirk43.py +0 -0
  333. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/esdirk54.py +0 -0
  334. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/esdirk85.py +0 -0
  335. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/euler.py +0 -0
  336. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/gear.py +0 -0
  337. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rk4.py +0 -0
  338. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkbs32.py +0 -0
  339. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkck54.py +0 -0
  340. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkdp54.py +0 -0
  341. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkdp87.py +0 -0
  342. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkf21.py +0 -0
  343. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkf45.py +0 -0
  344. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkf78.py +0 -0
  345. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/rkv65.py +0 -0
  346. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/ssprk22.py +0 -0
  347. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/ssprk33.py +0 -0
  348. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/ssprk34.py +0 -0
  349. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/solvers/steadystate.py +0 -0
  350. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/subsystem.py +0 -0
  351. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/__init__.py +0 -0
  352. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/adaptivebuffer.py +0 -0
  353. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/analysis.py +0 -0
  354. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/deprecation.py +0 -0
  355. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/diagnostics.py +0 -0
  356. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/fmuwrapper.py +0 -0
  357. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/gilbert.py +0 -0
  358. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/graph.py +0 -0
  359. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/logger.py +0 -0
  360. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/mutable.py +0 -0
  361. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/portreference.py +0 -0
  362. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/progresstracker.py +0 -0
  363. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/realtimeplotter.py +0 -0
  364. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim/utils/register.py +0 -0
  365. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim.egg-info/dependency_links.txt +0 -0
  366. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim.egg-info/requires.txt +0 -0
  367. {pathsim-0.22.2 → pathsim-0.23.0}/src/pathsim.egg-info/top_level.txt +0 -0
  368. {pathsim-0.22.2 → pathsim-0.23.0}/tests/README.md +0 -0
  369. {pathsim-0.22.2 → pathsim-0.23.0}/tests/__init__.py +0 -0
  370. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/CoupledClutches_CS.fmu +0 -0
  371. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/__init__.py +0 -0
  372. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/conftest.py +0 -0
  373. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_algebraic_system.py +0 -0
  374. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_bouncingball_friction_event_system.py +0 -0
  375. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_bouncingball_system.py +0 -0
  376. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_brusselator_system.py +0 -0
  377. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_cosim_fmu_system.py +0 -0
  378. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_counter_comparator_system.py +0 -0
  379. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_dynamical_system_ivp.py +0 -0
  380. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_fitzhughnagumo_system.py +0 -0
  381. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_harmonic_oscillator_system.py +0 -0
  382. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_linear_feedback_system.py +0 -0
  383. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_logic_system.py +0 -0
  384. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_lorenz_system.py +0 -0
  385. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_me_analytical.py +0 -0
  386. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_model_exchange_fmu_system.py +0 -0
  387. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_pid_system.py +0 -0
  388. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_relay_thermostat_system.py +0 -0
  389. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_rescale_delay_system.py +0 -0
  390. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_robertson_system.py +0 -0
  391. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_roessler_system.py +0 -0
  392. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_signal_processing_system.py +0 -0
  393. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_steadystate_transient_system.py +0 -0
  394. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_switch_lti_system.py +0 -0
  395. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_vanderpol_system.py +0 -0
  396. {pathsim-0.22.2 → pathsim-0.23.0}/tests/evals/test_volterralotka_system.py +0 -0
  397. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/__init__.py +0 -0
  398. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/__init__.py +0 -0
  399. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/_embedding.py +0 -0
  400. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/rf/__init__.py +0 -0
  401. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/rf/ring_slot.s2p +0 -0
  402. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/rf/ring_slot_meas.s1p +0 -0
  403. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/rf/test_rf.py +0 -0
  404. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_adder.py +0 -0
  405. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_amplifier.py +0 -0
  406. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_block.py +0 -0
  407. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_comparator.py +0 -0
  408. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_converters.py +0 -0
  409. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_counter.py +0 -0
  410. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_ctrl.py +0 -0
  411. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_delay.py +0 -0
  412. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_differentiator.py +0 -0
  413. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_discrete.py +0 -0
  414. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_divider.py +0 -0
  415. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_dynsys.py +0 -0
  416. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_filters.py +0 -0
  417. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_fmu.py +0 -0
  418. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_function.py +0 -0
  419. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_integrator.py +0 -0
  420. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_kalman.py +0 -0
  421. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_logic.py +0 -0
  422. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_lti.py +0 -0
  423. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_math.py +0 -0
  424. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_multiplier.py +0 -0
  425. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_noise.py +0 -0
  426. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_ode.py +0 -0
  427. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_relay.py +0 -0
  428. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_rng.py +0 -0
  429. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_scope.py +0 -0
  430. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_sources.py +0 -0
  431. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_spectrum.py +0 -0
  432. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_switch.py +0 -0
  433. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_table.py +0 -0
  434. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/blocks/test_wrapper.py +0 -0
  435. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/events/__init__.py +0 -0
  436. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/events/test_condition.py +0 -0
  437. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/events/test_event.py +0 -0
  438. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/events/test_schedule.py +0 -0
  439. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/events/test_zerocrossing.py +0 -0
  440. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/optim/__init__.py +0 -0
  441. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/optim/test_numerical.py +0 -0
  442. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/optim/test_operator.py +0 -0
  443. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/__init__.py +0 -0
  444. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/_referenceproblems.py +0 -0
  445. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_bdf.py +0 -0
  446. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_dirk2.py +0 -0
  447. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_dirk3.py +0 -0
  448. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk32.py +0 -0
  449. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk4.py +0 -0
  450. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk43.py +0 -0
  451. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk54.py +0 -0
  452. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_esdirk85.py +0 -0
  453. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_euler.py +0 -0
  454. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_gear.py +0 -0
  455. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rfk21.py +0 -0
  456. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rk4.py +0 -0
  457. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkbs32.py +0 -0
  458. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkck54.py +0 -0
  459. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkdp54.py +0 -0
  460. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkdp87.py +0 -0
  461. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkf45.py +0 -0
  462. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkf78.py +0 -0
  463. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_rkv65.py +0 -0
  464. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_solver.py +0 -0
  465. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_ssprk22.py +0 -0
  466. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_ssprk33.py +0 -0
  467. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_ssprk34.py +0 -0
  468. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/solvers/test_steadystate.py +0 -0
  469. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/test_checkpoint.py +0 -0
  470. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/test_connection.py +0 -0
  471. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/test_diagnostics.py +0 -0
  472. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/test_simulation.py +0 -0
  473. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/test_subsystem.py +0 -0
  474. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/__init__.py +0 -0
  475. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_adaptivebuffer.py +0 -0
  476. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_analysis.py +0 -0
  477. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_fmuwrapper.py +0 -0
  478. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_gilbert.py +0 -0
  479. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_graph.py +0 -0
  480. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_logger.py +0 -0
  481. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_mutable.py +0 -0
  482. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_portreference.py +0 -0
  483. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_progresstracker.py +0 -0
  484. {pathsim-0.22.2 → pathsim-0.23.0}/tests/pathsim/utils/test_realtimeplotter.py +0 -0
  485. {pathsim-0.22.2 → 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.22.2
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,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.2'
22
- __version_tuple__ = version_tuple = (0, 22, 2)
21
+ __version__ = version = '0.23.0'
22
+ __version_tuple__ = version_tuple = (0, 23, 0)
23
23
 
24
- __commit_id__ = commit_id = 'gcb3b9ab4b'
24
+ __commit_id__ = commit_id = 'g5fc53f553'
@@ -1,4 +1,7 @@
1
1
  from .differentiator import *
2
+ from .constraint import *
3
+ from .bvp import *
4
+ from .dae import *
2
5
  from .integrator import *
3
6
  from .multiplier import *
4
7
  from .divider import *
@@ -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)