rtc-tools 2.8.1__tar.gz → 2.8.2__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 (451) hide show
  1. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.github/workflows/ci.yml +40 -17
  2. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/PKG-INFO +1 -1
  3. rtc_tools-2.8.2/doc/examples/optimization/debugging.rst +51 -0
  4. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/pyproject.toml +2 -0
  5. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/_internal/casadi_to_lp.py +89 -79
  6. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/pi.py +1 -1
  7. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/collocated_integrated_optimization_problem.py +16 -11
  8. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/goal_programming_mixin.py +1 -1
  9. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/goal_programming_mixin_base.py +10 -2
  10. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/homotopy_mixin.py +31 -4
  11. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/single_pass_goal_programming_mixin.py +1 -1
  12. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/test_data.py +21 -0
  13. rtc_tools-2.8.2/tests/optimization/data/ModelHomotopyParameter.mo +11 -0
  14. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_export_lp.py +160 -34
  15. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_goal_programming.py +15 -0
  16. rtc_tools-2.8.2/tests/optimization/test_homotopy_mixin.py +92 -0
  17. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_integration.py +10 -0
  18. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_modelica_mixin.py +16 -0
  19. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_single_pass_goal_programming.py +54 -3
  20. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/uv.lock +67 -1
  21. rtc_tools-2.8.1/doc/examples/optimization/debugging.rst +0 -29
  22. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.codecov.yml +0 -0
  23. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.coveragerc +0 -0
  24. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.git-blame-ignore-revs +0 -0
  25. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.github/actions/setup-python/action.yml +0 -0
  26. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.gitignore +0 -0
  27. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.pre-commit-config.yaml +0 -0
  28. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/.readthedocs.yaml +0 -0
  29. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/AUTHORS +0 -0
  30. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/CHARTER.md +0 -0
  31. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/CONTRIBUTING.md +0 -0
  32. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/COPYING +0 -0
  33. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/COPYING.LESSER +0 -0
  34. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/GOVERNANCE.md +0 -0
  35. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/README.md +0 -0
  36. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/.gitignore +0 -0
  37. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/Makefile +0 -0
  38. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/_static/external_links.js +0 -0
  39. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/_static/theme_overrides.css +0 -0
  40. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/conf.py +0 -0
  41. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/basic.rst +0 -0
  42. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/cascading_channels.rst +0 -0
  43. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/channel_pulse.rst +0 -0
  44. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/channel_wave_damping.rst +0 -0
  45. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/ensemble.rst +0 -0
  46. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/fallback_options.rst +0 -0
  47. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/goal_programming.rst +0 -0
  48. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/integrator_delay.rst +0 -0
  49. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/lookup_table.rst +0 -0
  50. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/mixed_integer.rst +0 -0
  51. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/pumped_hydropower_system.rst +0 -0
  52. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization/step_response.rst +0 -0
  53. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/optimization.rst +0 -0
  54. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/basic_results.py +0 -0
  55. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/cascading_channels_results.py +0 -0
  56. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/channel_pulse_results.py +0 -0
  57. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/channel_wave_damping.py +0 -0
  58. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/ensemble_results.py +0 -0
  59. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/goal_programming_results.py +0 -0
  60. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/integrator_delay.py +0 -0
  61. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/lookup_table_results.py +0 -0
  62. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/mixed_integer_results.py +0 -0
  63. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/pumped_hydropower_system_results.py +0 -0
  64. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/pyplots/simulation_results.py +0 -0
  65. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/simulation/custom_equation.rst +0 -0
  66. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/simulation/setpoint.rst +0 -0
  67. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples/simulation.rst +0 -0
  68. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/examples.rst +0 -0
  69. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/getting-started.rst +0 -0
  70. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/Aggregation_01.png +0 -0
  71. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/Lake-Hartwell-24012016.jpg +0 -0
  72. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/PumpedStoragePlant_openmodelica.png +0 -0
  73. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/Woudagemaal.jpg +0 -0
  74. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/basic_example_console.png +0 -0
  75. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/cascading_channels_omedit.png +0 -0
  76. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/channel_impulse_xs.png +0 -0
  77. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/channel_wave_damping_omedit.png +0 -0
  78. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/graig-coch-2117306_640.jpg +0 -0
  79. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/integrator_delay_modelica.png +0 -0
  80. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/lavant-2976738_1280.jpg +0 -0
  81. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/orifice_vs_pump_openmodelica.png +0 -0
  82. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/pont-du-gard-1742029_1280.jpg +0 -0
  83. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/rtc-tools-horizontal-color.svg +0 -0
  84. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/rtc-tools-horizontal-white.svg +0 -0
  85. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/simple_storage_openmodelica.png +0 -0
  86. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/single_channel.png +0 -0
  87. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/single_channel_hec-ras.png +0 -0
  88. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/validation/Downstream_150.png +0 -0
  89. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/images/validation/Upstream_150.png +0 -0
  90. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/index.rst +0 -0
  91. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/literature.bib +0 -0
  92. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/make.bat +0 -0
  93. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/basics.rst +0 -0
  94. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/csv_io.rst +0 -0
  95. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/fews_io.rst +0 -0
  96. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/forecast_uncertainty.rst +0 -0
  97. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/converting_goals_to_constraints.rst +0 -0
  98. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/goals.rst +0 -0
  99. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/linearized_order.rst +0 -0
  100. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/main_idea.rst +0 -0
  101. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/minimize_absolute_value.rst +0 -0
  102. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/homotopy.rst +0 -0
  103. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/initial_state_estimation.rst +0 -0
  104. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/linearization.rst +0 -0
  105. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/lookup_tables.rst +0 -0
  106. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/modelica_models.rst +0 -0
  107. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/multi_objective.rst +0 -0
  108. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/solver_configuration.rst +0 -0
  109. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization/time_discretization.rst +0 -0
  110. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/optimization.rst +0 -0
  111. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/related-projects.rst +0 -0
  112. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/simulation/basics.rst +0 -0
  113. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/simulation/csv_io.rst +0 -0
  114. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/simulation/fews_io.rst +0 -0
  115. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/simulation.rst +0 -0
  116. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/doc/time-series.rst +0 -0
  117. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/basic/input/initial_state.csv +0 -0
  118. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/basic/input/timeseries_import.csv +0 -0
  119. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/basic/model/Example.mo +0 -0
  120. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/basic/output/.gitignore +0 -0
  121. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/basic/reference_output/timeseries_export.csv +0 -0
  122. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/basic/src/example.py +0 -0
  123. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/cascading_channels/input/initial_state.csv +0 -0
  124. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/cascading_channels/input/timeseries_import.csv +0 -0
  125. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/cascading_channels/model/.gitignore +0 -0
  126. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/cascading_channels/model/Example.mo +0 -0
  127. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/cascading_channels/output/.gitignore +0 -0
  128. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/cascading_channels/reference_output/timeseries_export.csv +0 -0
  129. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/cascading_channels/src/example.py +0 -0
  130. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/HEC-RAS.zip +0 -0
  131. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/input/timeseries_import.csv +0 -0
  132. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/model/Example.mo +0 -0
  133. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/output/.gitignore +0 -0
  134. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/HEC-RAS_export.csv +0 -0
  135. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export.csv +0 -0
  136. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_inertial_wave.csv +0 -0
  137. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_inertial_wave_semi_implicit.csv +0 -0
  138. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_saint_venant.csv +0 -0
  139. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_saint_venant_upwind.csv +0 -0
  140. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_pulse/src/example.py +0 -0
  141. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/input/timeseries_import.csv +0 -0
  142. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/Example.mo +0 -0
  143. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/ExampleLocalControl.mo +0 -0
  144. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/ExampleOptimization.mo +0 -0
  145. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/PIDController.mo +0 -0
  146. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/output/.gitignore +0 -0
  147. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/reference_output/timeseries_export.csv +0 -0
  148. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/reference_output/timeseries_export_local_control.csv +0 -0
  149. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/example_local_control.py +0 -0
  150. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/example_optimization.py +0 -0
  151. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/steady_state_initialization_mixin.py +0 -0
  152. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/step_size_parameter_mixin.py +0 -0
  153. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/.gitignore +0 -0
  154. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/ensemble.csv +0 -0
  155. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast1/.gitignore +0 -0
  156. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast1/initial_state.csv +0 -0
  157. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast1/timeseries_import.csv +0 -0
  158. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast2/.gitignore +0 -0
  159. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast2/initial_state.csv +0 -0
  160. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast2/timeseries_import.csv +0 -0
  161. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/lookup_tables/.gitignore +0 -0
  162. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/lookup_tables/curvefit_options.ini +0 -0
  163. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/input/lookup_tables/storage_V.csv +0 -0
  164. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/model/Example.mo +0 -0
  165. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/output/forecast1/.gitignore +0 -0
  166. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/output/forecast2/.gitignore +0 -0
  167. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/reference_output/forecast1/timeseries_export.csv +0 -0
  168. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/reference_output/forecast2/timeseries_export.csv +0 -0
  169. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/ensemble/src/example.py +0 -0
  170. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/fallback_option/output/.gitignore +0 -0
  171. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/fallback_option/src/example.py +0 -0
  172. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/fallback_option/src/example_with_gp.py +0 -0
  173. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/goal_programming/input/initial_state.csv +0 -0
  174. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/goal_programming/input/timeseries_import.csv +0 -0
  175. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/goal_programming/model/Example.mo +0 -0
  176. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/goal_programming/output/.gitignore +0 -0
  177. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/goal_programming/reference_output/timeseries_export.csv +0 -0
  178. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/goal_programming/src/example.py +0 -0
  179. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/integrator_delay/input/initial_state.csv +0 -0
  180. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/integrator_delay/input/timeseries_import.csv +0 -0
  181. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/integrator_delay/input/timeseries_import_simulation.csv +0 -0
  182. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/integrator_delay/model/Example.mo +0 -0
  183. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/integrator_delay/src/example.py +0 -0
  184. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/input/.gitignore +0 -0
  185. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/input/initial_state.csv +0 -0
  186. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/input/lookup_tables/.gitignore +0 -0
  187. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/input/lookup_tables/curvefit_options.ini +0 -0
  188. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/input/lookup_tables/storage_V.csv +0 -0
  189. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/input/timeseries_import.csv +0 -0
  190. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/model/Example.mo +0 -0
  191. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/output/.gitignore +0 -0
  192. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/reference_output/timeseries_export.csv +0 -0
  193. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/lookup_table/src/example.py +0 -0
  194. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/mixed_integer/input/initial_state.csv +0 -0
  195. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/mixed_integer/input/timeseries_import.csv +0 -0
  196. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/mixed_integer/model/Example.mo +0 -0
  197. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/mixed_integer/output/.gitignore +0 -0
  198. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/mixed_integer/reference_output/timeseries_export.csv +0 -0
  199. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/mixed_integer/src/example.py +0 -0
  200. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/input/initial_state.csv +0 -0
  201. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/input/timeseries_import.csv +0 -0
  202. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/model/PumpedStoragePlant.mo +0 -0
  203. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/output/.gitignore +0 -0
  204. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/reference_output/timeseries_export.csv +0 -0
  205. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/src/example.py +0 -0
  206. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation/input/parameters.csv +0 -0
  207. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation/input/timeseries_import.csv +0 -0
  208. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation/model/Example.mo +0 -0
  209. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation/output/.gitignore +0 -0
  210. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation/reference_output/timeseries_export.csv +0 -0
  211. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation/src/example.py +0 -0
  212. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/input/initial_state.csv +0 -0
  213. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/input/timeseries_import.csv +0 -0
  214. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/model/SimpleModel.mo +0 -0
  215. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/output/.gitignore +0 -0
  216. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/reference_output/timeseries_export.csv +0 -0
  217. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/src/simple_model.py +0 -0
  218. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/single_reservoir/input/initial_state.csv +0 -0
  219. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/single_reservoir/input/timeseries_import.csv +0 -0
  220. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/single_reservoir/model/single_reservoir.mo +0 -0
  221. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/single_reservoir/output/.gitignore +0 -0
  222. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/single_reservoir/reference_output/timeseries_export.csv +0 -0
  223. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/single_reservoir/src/single_reservoir.py +0 -0
  224. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/step_response/input/initial_state.csv +0 -0
  225. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/step_response/input/timeseries_import.csv +0 -0
  226. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/step_response/model/Example.mo +0 -0
  227. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/step_response/output/.gitignore +0 -0
  228. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/step_response/reference_output/timeseries_export_saint_venant.csv +0 -0
  229. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/examples/step_response/src/example.py +0 -0
  230. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/sonar-project.properties +0 -0
  231. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/__init__.py +0 -0
  232. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/_internal/__init__.py +0 -0
  233. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/_internal/alias_tools.py +0 -0
  234. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/_internal/caching.py +0 -0
  235. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/_internal/casadi_helpers.py +0 -0
  236. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/_internal/debug_check_helpers.py +0 -0
  237. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/_internal/ensemble_bounds_decorator.py +0 -0
  238. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/__init__.py +0 -0
  239. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/csv.py +0 -0
  240. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/__init__.py +0 -0
  241. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/bspline.py +0 -0
  242. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/bspline1d.py +0 -0
  243. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/bspline2d.py +0 -0
  244. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/netcdf.py +0 -0
  245. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/rtc.py +0 -0
  246. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/data/storage.py +0 -0
  247. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/__init__.py +0 -0
  248. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/control_tree_mixin.py +0 -0
  249. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/csv_lookup_table_mixin.py +0 -0
  250. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/csv_mixin.py +0 -0
  251. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/initial_state_estimation_mixin.py +0 -0
  252. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/io_mixin.py +0 -0
  253. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/linearization_mixin.py +0 -0
  254. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/linearized_order_goal_programming_mixin.py +0 -0
  255. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/min_abs_goal_programming_mixin.py +0 -0
  256. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/modelica_mixin.py +0 -0
  257. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/netcdf_mixin.py +0 -0
  258. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/optimization_problem.py +0 -0
  259. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/pi_mixin.py +0 -0
  260. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/planning_mixin.py +0 -0
  261. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/optimization/timeseries.py +0 -0
  262. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/rtctoolsapp.py +0 -0
  263. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/simulation/__init__.py +0 -0
  264. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/simulation/csv_mixin.py +0 -0
  265. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/simulation/io_mixin.py +0 -0
  266. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/simulation/pi_mixin.py +0 -0
  267. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/simulation/simulation_problem.py +0 -0
  268. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/util.py +0 -0
  269. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/src/rtctools/version.py +0 -0
  270. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/__init__.py +0 -0
  271. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/__init__.py +0 -0
  272. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/.gitignore +0 -0
  273. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/curve.dat +0 -0
  274. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/diag.xml +0 -0
  275. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/initial_state_0.csv +0 -0
  276. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/initial_state_1.csv +0 -0
  277. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/look_up_table_0.csv +0 -0
  278. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/look_up_table_1.csv +0 -0
  279. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/look_up_table_2.csv +0 -0
  280. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/pi_run.xml +0 -0
  281. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/rtcDataConfig.xml +0 -0
  282. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/rtcParameterConfig.xml +0 -0
  283. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/surface.dat +0 -0
  284. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_export.xml +0 -0
  285. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import.bin +0 -0
  286. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import.xml +0 -0
  287. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_0.csv +0 -0
  288. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_1.csv +0 -0
  289. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_2.csv +0 -0
  290. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemble.nc +0 -0
  291. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemble.xml +0 -0
  292. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemblesize1_noRealization.nc +0 -0
  293. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemblesize1_withRealization.nc +0 -0
  294. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_neq.xml +0 -0
  295. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/data_path.py +0 -0
  296. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/test_csv.py +0 -0
  297. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/test_diag.py +0 -0
  298. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/test_interpolate.py +0 -0
  299. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/test_netcdf.py +0 -0
  300. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data/test_storage.py +0 -0
  301. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/data_path.py +0 -0
  302. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/examples/__init__.py +0 -0
  303. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/examples/test_examples.py +0 -0
  304. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/internal/__init__.py +0 -0
  305. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/internal/test_alias_tools.py +0 -0
  306. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/__init__.py +0 -0
  307. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/.gitignore +0 -0
  308. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/EmptyModel.mo +0 -0
  309. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/Model.mo +0 -0
  310. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelAlgebraic.mo +0 -0
  311. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelDebugChecks.mo +0 -0
  312. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelDelay.mo +0 -0
  313. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelDelayLoop.mo +0 -0
  314. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelMixedInteger.mo +0 -0
  315. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelNestedDelay.mo +0 -0
  316. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelSIUnits.mo +0 -0
  317. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelSymbolicParameters.mo +0 -0
  318. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelWithInitial.mo +0 -0
  319. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelWithInitialLinear.mo +0 -0
  320. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ModelWithLookupTable.mo +0 -0
  321. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/SingleShootingModel.mo +0 -0
  322. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/ensemble.csv +0 -0
  323. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/initial_state.csv +0 -0
  324. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/lookup_tables/.gitignore +0 -0
  325. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/lookup_tables/curvefit_options.ini +0 -0
  326. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/lookup_tables/x_prime.csv +0 -0
  327. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member0/.gitignore +0 -0
  328. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member0/initial_state.csv +0 -0
  329. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member0/parameters.csv +0 -0
  330. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member0/timeseries_import.csv +0 -0
  331. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member1/.gitignore +0 -0
  332. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member1/initial_state.csv +0 -0
  333. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member1/parameters.csv +0 -0
  334. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/member1/timeseries_import.csv +0 -0
  335. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/.gitignore +0 -0
  336. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/Model.mo +0 -0
  337. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/ensemble.csv +0 -0
  338. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member0/timeseries_import.csv +0 -0
  339. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member1/timeseries_import.csv +0 -0
  340. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member2/timeseries_import.csv +0 -0
  341. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member3/timeseries_import.csv +0 -0
  342. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/rtcDataConfig.xml +0 -0
  343. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/rtcParameterConfig.xml +0 -0
  344. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/timeseries_import.nc +0 -0
  345. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/timeseries_import.xml +0 -0
  346. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/ensemble.csv +0 -0
  347. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/member0/timeseries_import.csv +0 -0
  348. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/member1/timeseries_import.csv +0 -0
  349. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/rtcDataConfig.xml +0 -0
  350. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/rtcParameterConfig.xml +0 -0
  351. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/timeseries_import.nc +0 -0
  352. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/timeseries_import.xml +0 -0
  353. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/ensemble.csv +0 -0
  354. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/member0/timeseries_import.csv +0 -0
  355. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/member1/timeseries_import.csv +0 -0
  356. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/rtcDataConfig.xml +0 -0
  357. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/rtcParameterConfig.xml +0 -0
  358. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/timeseries_import.nc +0 -0
  359. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/timeseries_import.xml +0 -0
  360. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/ensemble.csv +0 -0
  361. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member0/parameters.csv +0 -0
  362. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member0/timeseries_import.csv +0 -0
  363. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member1/parameters.csv +0 -0
  364. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member1/timeseries_import.csv +0 -0
  365. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/rtcDataConfig.xml +0 -0
  366. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/rtcParameterConfig.xml +0 -0
  367. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/timeseries_import.nc +0 -0
  368. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/timeseries_import.xml +0 -0
  369. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/Model.mo +0 -0
  370. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/rtcDataConfig.xml +0 -0
  371. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/rtcParameterConfig.xml +0 -0
  372. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/rtcParameterConfig_extra.xml +0 -0
  373. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/timeseries_import.xml +0 -0
  374. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/ensemble.csv +0 -0
  375. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/.gitignore +0 -0
  376. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/initial_state.csv +0 -0
  377. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/parameters.csv +0 -0
  378. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/timeseries_import.csv +0 -0
  379. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/parameters.csv +0 -0
  380. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/reference_linear_model.lp +0 -0
  381. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/rtcDataConfig.xml +0 -0
  382. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/rtcParameterConfig.xml +0 -0
  383. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/rtcParameterConfig_extra.xml +0 -0
  384. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/Model.mo +0 -0
  385. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/rtcDataConfig.xml +0 -0
  386. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/rtcParameterConfig.xml +0 -0
  387. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/rtcParameterConfig_extra.xml +0 -0
  388. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/timeseries_import.xml +0 -0
  389. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/timeseries_import.csv +0 -0
  390. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/timeseries_import.nc +0 -0
  391. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data/timeseries_import.xml +0 -0
  392. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/data_path.py +0 -0
  393. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/regenerate_lp_reference.py +0 -0
  394. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_control_tree_mixin.py +0 -0
  395. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_csv_lookuptable_mixin.py +0 -0
  396. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_csv_mixin.py +0 -0
  397. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_debug_checks.py +0 -0
  398. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_delay_expressions.py +0 -0
  399. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_extra_casadipath.py +0 -0
  400. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_interpolation.py +0 -0
  401. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_io_mixin.py +0 -0
  402. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_linearized_order_goal_programming_mixin.py +0 -0
  403. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_min_abs_goal_programming.py +0 -0
  404. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_multiple_io_mixins.py +0 -0
  405. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_netcdf_mixin.py +0 -0
  406. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_optimization_problem.py +0 -0
  407. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_path_extra_variables.py +0 -0
  408. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_path_variable_assembly.py +0 -0
  409. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_pi_mixin.py +0 -0
  410. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_planning_and_control_tree_mixin.py +0 -0
  411. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_planning_mixin.py +0 -0
  412. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_problem_class_check.py +0 -0
  413. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_solvers.py +0 -0
  414. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_timeseries.py +0 -0
  415. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_vector_constraints_variables.py +0 -0
  416. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/optimization/test_vector_goals.py +0 -0
  417. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/__init__.py +0 -0
  418. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/.gitignore +0 -0
  419. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/Model.mo +0 -0
  420. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/ModelCustomEquation.mo +0 -0
  421. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/Model_base.mo +0 -0
  422. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/Model_delay.mo +0 -0
  423. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/Model_nominal.mo +0 -0
  424. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/initial_state.csv +0 -0
  425. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_infeasible.mo +0 -0
  426. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_out_of_bounds.mo +0 -0
  427. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_out_of_sym_bounds.mo +0 -0
  428. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_bounds.mo +0 -0
  429. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_input_series.mo +0 -0
  430. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_sym_ystart.mo +0 -0
  431. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_xstart.mo +0 -0
  432. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_zero_xstart.mo +0 -0
  433. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/timeseries_import.csv +0 -0
  434. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/timeseries_import_with_x.csv +0 -0
  435. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/initial_state.csv +0 -0
  436. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/parameters.csv +0 -0
  437. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/rtcDataConfig.xml +0 -0
  438. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/rtcParameterConfig.xml +0 -0
  439. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/timeseries_import.csv +0 -0
  440. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data/timeseries_import.xml +0 -0
  441. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/data_path.py +0 -0
  442. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/test_csv_mixin.py +0 -0
  443. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/test_io_mixin.py +0 -0
  444. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/test_pi_mixin.py +0 -0
  445. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/test_problem_class_check.py +0 -0
  446. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/simulation/test_simulation.py +0 -0
  447. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/test_case.py +0 -0
  448. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tests/test_rtctoolsapp.py +0 -0
  449. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/tox.ini +0 -0
  450. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/xsd/rtcDataConfig.xsd +0 -0
  451. {rtc_tools-2.8.1 → rtc_tools-2.8.2}/xsd/rtcSharedTypes.xsd +0 -0
@@ -20,7 +20,7 @@ jobs:
20
20
  runs-on: ubuntu-latest
21
21
  timeout-minutes: 30
22
22
  steps:
23
- - uses: actions/checkout@v4
23
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24
24
  - uses: ./.github/actions/setup-python
25
25
  with:
26
26
  dependency-groups: "style"
@@ -33,12 +33,12 @@ jobs:
33
33
  image: python:3.10
34
34
  timeout-minutes: 30
35
35
  steps:
36
- - uses: actions/checkout@v4.1.0
36
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
37
37
  with:
38
38
  fetch-depth: 0
39
39
  - uses: ./.github/actions/setup-python
40
40
  - run: uv build
41
- - uses: actions/upload-artifact@v4
41
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
42
42
  if: success()
43
43
  with:
44
44
  name: "${{ github.job }}"
@@ -70,7 +70,7 @@ jobs:
70
70
  resolution_mode: 'highest'
71
71
  label: ' (Newest Dependencies)'
72
72
  steps:
73
- - uses: actions/checkout@v4
73
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
74
74
  - uses: ./.github/actions/setup-python
75
75
  with:
76
76
  dependency-groups: "tests"
@@ -86,7 +86,7 @@ jobs:
86
86
  env:
87
87
  TOXENV: coverage
88
88
  steps:
89
- - uses: actions/checkout@v4.1.0
89
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
90
90
  with:
91
91
  # Full history required for accurate Sonar SCM blame data
92
92
  fetch-depth: 0
@@ -95,7 +95,7 @@ jobs:
95
95
  dependency-groups: "tests"
96
96
  - run: uv run tox -vv
97
97
  - name: Upload coverage report
98
- uses: actions/upload-artifact@v4
98
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
99
99
  if: success()
100
100
  with:
101
101
  name: coverage-report
@@ -126,28 +126,51 @@ jobs:
126
126
  - '3.13'
127
127
  - '3.14'
128
128
  steps:
129
- - uses: actions/checkout@v4.1.0
129
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
130
130
  - uses: ./.github/actions/setup-python
131
131
  with:
132
132
  dependency-groups: "tests"
133
133
  - run: uv run tox -vv
134
134
 
135
135
  deploy:
136
- needs: [test-linux, coverage, examples-linux]
136
+ needs: [build, test-linux, coverage, examples-linux]
137
137
  runs-on: ubuntu-latest
138
- if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/2.') }}
138
+ if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/2.') }}
139
139
  permissions:
140
140
  id-token: write # Required for OIDC PyPI publishing
141
141
  contents: read
142
142
  steps:
143
- - name: Check out code
144
- uses: actions/checkout@v4
145
-
146
- - name: Set up Python and uv
147
- uses: ./.github/actions/setup-python
148
-
149
- - name: Build package
150
- run: uv build
143
+ - name: Download build distributions
144
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
145
+ with:
146
+ name: build
147
+ path: dist/
151
148
 
152
149
  - name: Publish package distributions to PyPI
153
150
  uses: pypa/gh-action-pypi-publish@release/v1
151
+
152
+ deploy-nexus:
153
+ needs: [build, test-linux, coverage, examples-linux]
154
+ runs-on: ubuntu-latest
155
+ if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/2.') }}
156
+ permissions:
157
+ contents: read
158
+ steps:
159
+ - name: Set up uv
160
+ uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
161
+ with:
162
+ version: "0.7.9"
163
+ enable-cache: false
164
+
165
+ - name: Download build distributions
166
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
167
+ with:
168
+ name: build
169
+ path: dist/
170
+
171
+ - name: Publish package distributions to Deltares Nexus
172
+ env:
173
+ UV_PUBLISH_URL: "https://artifacts.deltares.nl/repository/rtctools-python-release/"
174
+ UV_PUBLISH_USERNAME: ${{ secrets.NEXUS_PYPI_USERNAME }}
175
+ UV_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PYPI_PASSWORD }}
176
+ run: uv publish --check-url "https://artifacts.deltares.nl/repository/rtctools-python-release/simple/"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: rtc-tools
3
- Version: 2.8.1
3
+ Version: 2.8.2
4
4
  Summary: Toolbox for control and optimization of water systems.
5
5
  Project-URL: Homepage, https://oss.deltares.nl/web/rtc-tools/home
6
6
  Project-URL: Download, https://github.com/rtc-tools/rtc-tools/
@@ -0,0 +1,51 @@
1
+ Debugging an Optimization Problem
2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
+
4
+ Overview
5
+ --------
6
+
7
+ This example will illustrate a few tools that can help debugging an optimization problem.
8
+ For example, it will demonstrate how to test an optimization problem by only solving
9
+ for a fixed number of time steps.
10
+
11
+ A Basic Optimization Problem
12
+ ----------------------------
13
+
14
+ For this example, the model is kept very basic.
15
+ We consider a single reservoir with a few target and optimization goals.
16
+ The optimization problem is given below.
17
+
18
+ .. literalinclude:: ../../../examples/single_reservoir/src/single_reservoir.py
19
+ :language: python
20
+ :pyobject: SingleReservoir
21
+
22
+ Optimizing for a given number of time steps
23
+ -------------------------------------------
24
+
25
+ By overwriting the method ``times``, we can control the times for which the problem is optimized.
26
+ In this case, we optimize for all times
27
+ unless the class attribute ``only_check_initial_values`` is set to ``True``.
28
+ Optimizing for only the initial time can be useful
29
+ to check for infeasibilities due to incompatible initial conditions.
30
+
31
+ Exporting the problem as an LP file
32
+ -----------------------------------
33
+
34
+ A linear or mixed-integer linear problem can be written to an LP file, to inspect it or to
35
+ solve it with another solver (e.g. HiGHS or CPLEX)::
36
+
37
+ def export_options(self):
38
+ options = super().export_options()
39
+ options["export_lp"] = True
40
+ return options
41
+
42
+ The file is written to the output folder, e.g. ``SingleReservoir_20250101_120000.lp``. When goal
43
+ programming solves more than one priority, each priority gets its own file with a
44
+ ``_priority_N`` suffix. Export requires an affine objective, affine constraints, and bounds and
45
+ constant terms an LP file can hold (no NaN, no lower bound of +inf, no upper bound of -inf, no
46
+ infinite constant). It raises a :exc:`ValueError` otherwise.
47
+
48
+ Rows with two infinite bounds are left out of the file. A row that reduces to a constant
49
+ outside its bounds (by more than 1e-9, or with a lower bound above its upper bound) is kept,
50
+ written against a variable ``__zero`` fixed to 0, so that an LP solver also finds the exported
51
+ problem infeasible.
@@ -66,6 +66,8 @@ style = [
66
66
  "pre-commit>=3.3.0",
67
67
  ]
68
68
  tests = [
69
+ # highspy >= 1.15 clashes with the libhighs bundled in CasADi's Linux wheels on import
70
+ "highspy >= 1.13.1, < 1.15",
69
71
  "pytest >= 8.2.0",
70
72
  "pytest-cov >= 6.0.0",
71
73
  "tox >= 4.18.0",
@@ -16,6 +16,9 @@ LP_COEFF_EPSILON = 1e-10
16
16
  # floating-point noise in a scalar value-vs-bound comparison, a distinct concern.
17
17
  LP_FEASIBILITY_EPSILON = 1e-9
18
18
 
19
+ # Variable fixed to 0 that stands in for the missing variable term of an infeasible constant row
20
+ LP_ZERO_VAR = "__zero"
21
+
19
22
  logger = logging.getLogger("rtctools")
20
23
 
21
24
  # Note: the LP file is currently used for diagnostics/export only. Using it as a
@@ -51,6 +54,24 @@ def _format_lp_bound(val: float) -> str:
51
54
  return f"{val:.15g}"
52
55
 
53
56
 
57
+ def _describe(indices, names: list[str] | None) -> str:
58
+ """List up to ten indices, by name if names are given."""
59
+ indices = list(indices)[:10]
60
+ return ", ".join(names[i] for i in indices) if names is not None else str(indices)
61
+
62
+
63
+ def _check_writable_bounds(
64
+ lb: np.ndarray, ub: np.ndarray, kind: str, names: list[str] | None
65
+ ) -> None:
66
+ """Raise if a bound has no LP form: NaN, a lower bound of +inf or an upper bound of -inf."""
67
+ bad = np.flatnonzero(np.isnan(lb) | np.isnan(ub) | np.isposinf(lb) | np.isneginf(ub))
68
+ if len(bad):
69
+ raise ValueError(
70
+ f"Cannot export LP file: {len(bad)} {kind}(s) have a NaN bound, a lower bound of "
71
+ f"+inf or an upper bound of -inf: {_describe(bad, names)}."
72
+ )
73
+
74
+
54
75
  def _build_objective(f: ca.SX, x: ca.SX, var_names: list[str]) -> str:
55
76
  """
56
77
  Build the LP objective string from the symbolic objective and variable names.
@@ -120,6 +141,10 @@ def _build_constraints(
120
141
  lines depending on its bounds. Range constraints (finite lb and ub, lb != ub)
121
142
  are split into two separate inequalities; the LP ``Ranges`` section is not used.
122
143
 
144
+ Rows with both bounds infinite are left out. A row without variable terms is left out if
145
+ its constant satisfies its bounds, and otherwise written against ``LP_ZERO_VAR`` (fixed to 0
146
+ by an extra row) so the file stays infeasible.
147
+
123
148
  Note: constraint lines are not wrapped and may exceed the LP format 255-character
124
149
  line limit for problems with many variables. Use shorter variable names if needed.
125
150
 
@@ -135,8 +160,8 @@ def _build_constraints(
135
160
  in an LP file.
136
161
 
137
162
  Raises:
138
- ValueError: If a constraint row has no variable terms and its constant value
139
- violates its bounds, i.e. the problem is infeasible.
163
+ ValueError: If a bound cannot be written (see :func:`_check_writable_bounds`) or a
164
+ row has a non-finite constant term.
140
165
  """
141
166
  A, b = ca.linear_coeff(g, x)
142
167
  A = ca.sparsify(ca.DM(A))
@@ -144,9 +169,16 @@ def _build_constraints(
144
169
 
145
170
  lbg = np.array(ca.veccat(*lbg))[:, 0]
146
171
  ubg = np.array(ca.veccat(*ubg))[:, 0]
172
+ _check_writable_bounds(lbg, ubg, "constraint", None)
147
173
  A_csc = A.tocsc()
148
174
  A_coo = A_csc.tocoo()
149
175
  b = np.array(b)[:, 0]
176
+ nonfinite_rows = np.flatnonzero(~np.isfinite(b))
177
+ if len(nonfinite_rows):
178
+ raise ValueError(
179
+ "Cannot export LP file: constraint rows have a non-finite constant term: "
180
+ f"{_describe(nonfinite_rows, None)}."
181
+ )
150
182
 
151
183
  constraints = [[] for _ in range(A.shape[0])]
152
184
  for i, j, c in zip(A_coo.row, A_coo.col, A_coo.data, strict=True):
@@ -154,8 +186,13 @@ def _build_constraints(
154
186
  constraints[i].extend(["+" if c > 0 else "-", f"{abs(c):.15g}", var_names[j]])
155
187
 
156
188
  constraints_str_list = []
189
+ vacuous_rows = []
190
+ infeasible_constant_rows = []
157
191
  for i, cur_constr in enumerate(constraints):
158
192
  lb, ub, b_i = lbg[i], ubg[i], b[i]
193
+ if np.isneginf(lb) and np.isposinf(ub):
194
+ vacuous_rows.append(i)
195
+ continue
159
196
  if cur_constr:
160
197
  if cur_constr[0] == "-":
161
198
  cur_constr[1] = "-" + cur_constr[1]
@@ -163,25 +200,12 @@ def _build_constraints(
163
200
  c_str = " ".join(cur_constr)
164
201
 
165
202
  if not c_str:
166
- # Row has no variable terms: it reduces to the constant b_i. The LP format
167
- # requires a variable term per row (a literal "0 = 0" is rejected by e.g.
168
- # CPLEX). Current behavior: a feasible constant row (within bounds) is dropped;
169
- # an infeasible one is the source of the model's infeasibility and must not be
170
- # dropped (that would make the exported file feasible while the model is not),
171
- # so we raise.
172
- # TODO(RTCTOOLS-1512): instead of raising on an infeasible constant row,
173
- # preserve it via a dummy variable fixed to 1 so an external solver reproduces
174
- # the infeasibility during presolve.
175
203
  lb_ok = (not np.isfinite(lb)) or b_i >= lb - LP_FEASIBILITY_EPSILON
176
204
  ub_ok = (not np.isfinite(ub)) or b_i <= ub + LP_FEASIBILITY_EPSILON
177
- if lb_ok and ub_ok:
205
+ if lb_ok and ub_ok and lb <= ub:
178
206
  continue
179
- side = "lower bound" if not lb_ok else "upper bound"
180
- raise ValueError(
181
- f"Violated constraint {i}: it reduces to the constant {b_i:.15g}, which "
182
- f"violates its {side} (bounds [{_format_lp_bound(lb)}, {_format_lp_bound(ub)}]). "
183
- f"The problem is infeasible."
184
- )
207
+ infeasible_constant_rows.append(i)
208
+ c_str = LP_ZERO_VAR
185
209
 
186
210
  if np.isfinite(lb) and np.isfinite(ub) and lb == ub:
187
211
  constraint_line = f"{c_str} = {lb - b_i:.15g}"
@@ -192,21 +216,24 @@ def _build_constraints(
192
216
  constraint_line = f"{c_str} <= {ub - b_i:.15g}"
193
217
  elif np.isfinite(lb):
194
218
  constraint_line = f"{c_str} >= {lb - b_i:.15g}"
195
- elif np.isfinite(ub):
196
- constraint_line = f"{c_str} <= {ub - b_i:.15g}"
197
219
  else:
198
- logger.warning(
199
- "Constraint %d has no finite bound (lbg=%s, ubg=%s, b_i=%s). "
200
- "Writing as '<= +Inf' for debugging; this constraint is vacuous.",
201
- i,
202
- lb,
203
- ub,
204
- b_i,
205
- )
206
- constraint_line = f"{c_str} <= {_format_lp_bound(ub)}"
220
+ constraint_line = f"{c_str} <= {ub - b_i:.15g}"
207
221
  constraints_str_list.append(constraint_line)
222
+ if infeasible_constant_rows:
223
+ constraints_str_list.append(f"{LP_ZERO_VAR} = 0")
224
+ logger.warning(
225
+ "LP export: %d constraint row(s) reduce to a constant that violates their bounds, "
226
+ "so the problem is infeasible: %s.",
227
+ len(infeasible_constant_rows),
228
+ _describe(infeasible_constant_rows, None),
229
+ )
230
+ if vacuous_rows:
231
+ logger.info(
232
+ "LP export: left out %d constraint row(s) with both bounds infinite: %s.",
233
+ len(vacuous_rows),
234
+ _describe(vacuous_rows, None),
235
+ )
208
236
  if not constraints_str_list:
209
- # Every row was a skipped feasible constant: there are no constraints to write.
210
237
  return ""
211
238
  return " " + "\n ".join(constraints_str_list)
212
239
 
@@ -223,7 +250,7 @@ def _build_bounds(
223
250
  Canonical bound forms emitted:
224
251
  - Both infinite: ``name Free``
225
252
  - Lower bound only: ``lb <= name``
226
- - Upper bound only: ``name <= ub``
253
+ - Upper bound only: ``-Inf <= name <= ub`` (without ``-Inf`` the default lower bound is 0)
227
254
  - Both finite: ``lb <= name <= ub``
228
255
 
229
256
  Args:
@@ -237,7 +264,13 @@ def _build_bounds(
237
264
  is the indented bounds section (empty string when nothing to emit),
238
265
  ``binary_vars`` is the list of binary (0/1) variable names, and
239
266
  ``general_vars`` is the list of general integer variable names.
267
+
268
+ Raises:
269
+ ValueError: If a bound cannot be written (see :func:`_check_writable_bounds`).
240
270
  """
271
+ _check_writable_bounds(
272
+ np.asarray(lbx, dtype=float), np.asarray(ubx, dtype=float), "variable", var_names
273
+ )
241
274
  bounds_list = []
242
275
  binary_vars = []
243
276
  general_vars = []
@@ -251,7 +284,7 @@ def _build_bounds(
251
284
  if not np.isfinite(lb) and not np.isfinite(ub):
252
285
  bounds_list.append(f"{v} Free")
253
286
  elif not np.isfinite(lb):
254
- bounds_list.append(f"{v} <= {_format_lp_bound(ub)}")
287
+ bounds_list.append(f"-Inf <= {v} <= {_format_lp_bound(ub)}")
255
288
  elif not np.isfinite(ub):
256
289
  bounds_list.append(f"{_format_lp_bound(lb)} <= {v}")
257
290
  else:
@@ -266,9 +299,9 @@ def _sanitize_var_names(
266
299
  """
267
300
  Build LP-compatible variable names for every slot in the combined decision vector.
268
301
 
269
- A variable is *shared* when every ensemble member maps it to the exact same
270
- slot indices. Shared variables receive no member suffix; per-member variables
271
- get a ``__m{i}`` suffix (e.g. ``x__t3__m0``).
302
+ A slot is *shared* when every ensemble member maps it to the same variable and local
303
+ index. Shared slots receive no member suffix; other slots get the ``__m{i}`` suffix of
304
+ the lowest member using them (e.g. ``x__t3__m0``).
272
305
 
273
306
  Naming scheme:
274
307
  - Shared, multi-slot variable: ``"{name}__t{local_index}"``
@@ -294,53 +327,30 @@ def _sanitize_var_names(
294
327
  List of length ``num_total`` mapping each slot index to its LP variable name.
295
328
  Every slot is guaranteed to be filled.
296
329
  """
297
- # Single pass over variables: for each variable, determine whether its slots are shared
298
- # (identical slot list across all members) or per-member, then write names directly.
299
- # Sharing is checked at the slot level using numpy array equality, which correctly
300
- # handles the ControlTreeMixin partial-sharing case (same variable name, different
301
- # slot lists per member after branching).
330
+ claims = {} # slot -> {name without member suffix: members using it}
331
+ for m, indices in enumerate(indices_per_member):
332
+ for name, slots in indices.items():
333
+ slots = np.atleast_1d(slots)
334
+ for local_i, idx in enumerate(slots):
335
+ base = f"{name}__t{local_i}" if len(slots) > 1 else name
336
+ claims.setdefault(int(idx), {}).setdefault(base, []).append(m)
337
+
302
338
  var_names = [None] * num_total
303
- all_names = sorted(set().union(*(d.keys() for d in indices_per_member)))
304
- for name in all_names:
305
- member_slots = {
306
- m: np.array(indices_per_member[m][name], dtype=np.int32)
307
- for m in range(len(indices_per_member))
308
- if name in indices_per_member[m]
309
- }
310
-
311
- # Check if all members that have this variable share the exact same slots.
312
- slots_list = list(member_slots.values())
313
- shared = len(member_slots) == len(indices_per_member) and all(
314
- np.array_equal(slots_list[0], s) for s in slots_list[1:]
339
+ conflicting_slots = []
340
+ for idx, by_base in claims.items():
341
+ base, members = next(iter(by_base.items()))
342
+ shared = len(members) == len(indices_per_member)
343
+ var_names[idx] = base if shared else f"{base}__m{members[0]}"
344
+ if len(by_base) > 1:
345
+ conflicting_slots.append(idx)
346
+ if conflicting_slots:
347
+ logger.warning(
348
+ "Decision vector slots %s map to different variable names across ensemble "
349
+ "members; this indicates a bug in discretize_controls() or discretize_states() "
350
+ "(possibly a mixin override). The exported LP file may be incorrect.",
351
+ conflicting_slots[:10],
315
352
  )
316
353
 
317
- if shared:
318
- slots = slots_list[0]
319
- n_slots = len(slots)
320
- for local_i, idx in enumerate(slots):
321
- var_names[int(idx)] = f"{name}__t{local_i}" if n_slots > 1 else name
322
- else:
323
- # Per-member or partially shared: warn if different names map to the same slot
324
- # (indicates a bug in discretize_controls/discretize_states or a mixin override).
325
- for m, slots in member_slots.items():
326
- n_slots = len(slots)
327
- for local_i, idx in enumerate(slots):
328
- idx = int(idx)
329
- existing = var_names[idx]
330
- if existing is not None and not existing.endswith(f"__m{m}"):
331
- logger.warning(
332
- "Index slot %d maps to different variable names across ensemble "
333
- "members; this indicates a bug in discretize_controls() or "
334
- "discretize_states() (possibly a mixin override). "
335
- "Proceeding with member %d's name (%r); "
336
- "the exported LP file may be incorrect.",
337
- idx,
338
- m,
339
- name,
340
- )
341
- t_part = f"__t{local_i}" if n_slots > 1 else ""
342
- var_names[idx] = f"{name}{t_part}__m{m}"
343
-
344
354
  for i in range(num_total):
345
355
  if var_names[i] is None:
346
356
  var_names[i] = f"__unassigned_{i}"
@@ -699,7 +699,7 @@ class Timeseries:
699
699
  self.__xml_root.set(
700
700
  "xsi:schemaLocation",
701
701
  "http://www.wldelft.nl/fews/PI "
702
- "http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_timeseries.xsd",
702
+ "https://fewsdocs.deltares.nl/schemas/version1.0/pi-schemas/pi_timeseries.xsd",
703
703
  )
704
704
 
705
705
  def __parse_date_time(self, el):
@@ -2129,9 +2129,10 @@ class CollocatedIntegratedOptimizationProblem(OptimizationProblem, metaclass=ABC
2129
2129
  Validates that the problem is compatible with LP/MILP export (affine objective
2130
2130
  and constraints), builds the LP file representation, and writes it to the output
2131
2131
  folder. Problems with discrete variables are exported as MILP (with a General
2132
- section listing integer variables). For ensemble problems, shared variables
2133
- (controls) are exported without a member suffix; per-member variables (states)
2134
- receive a ``__m{i}`` suffix (e.g. ``x__t3__m0``).
2132
+ section listing integer variables). For ensemble problems, a decision-vector entry
2133
+ used by every member (e.g. a control before its branching time) is exported without
2134
+ a member suffix; other entries get the ``__m{i}`` suffix of the lowest member using
2135
+ them (e.g. ``x__t3__m0``).
2135
2136
 
2136
2137
  Args:
2137
2138
  f: Symbolic objective expression (already expanded to SX).
@@ -2142,8 +2143,10 @@ class CollocatedIntegratedOptimizationProblem(OptimizationProblem, metaclass=ABC
2142
2143
  discrete: Boolean array indicating discrete variables.
2143
2144
 
2144
2145
  Raises:
2145
- ValueError: If the problem has a non-affine objective or constraints, or
2146
- uses non-linear collocation (``linear_collocation=False``).
2146
+ ValueError: If the problem has a non-affine objective or constraints, uses
2147
+ non-linear collocation (``linear_collocation=False``), or has a bound or
2148
+ constant term that an LP file cannot hold (NaN, a lower bound of +inf, an
2149
+ upper bound of -inf, a non-finite constant).
2147
2150
  """
2148
2151
  if getattr(self, "_dae_linear_collocation", self.linear_collocation) is False:
2149
2152
  raise ValueError(
@@ -2299,12 +2302,14 @@ class CollocatedIntegratedOptimizationProblem(OptimizationProblem, metaclass=ABC
2299
2302
 
2300
2303
  # Check that the lower bounds are not higher than the upper
2301
2304
  # bounds. To avoid spam, we just log the first offending one per
2302
- # variable, not _all_ time steps.
2303
- if np.any(lbx[inds] > ubx[inds]):
2304
- error_inds = np.where(lbx[inds] > ubx[inds])[0].tolist()
2305
+ # variable, not _all_ time steps. Scalar variables have an int index.
2306
+ lb_v, ub_v = np.atleast_1d(lbx[inds]), np.atleast_1d(ubx[inds])
2307
+ if np.any(lb_v > ub_v):
2308
+ first = np.flatnonzero(lb_v > ub_v)[0]
2309
+ nominal_v = np.broadcast_to(nominal, lb_v.shape)
2305
2310
  logger.error(
2306
- f"Lower bound {lbx[inds][error_inds[0]] * nominal} is higher than "
2307
- f"upper bound {ubx[inds][error_inds[0]] * nominal} for variable {variable}"
2311
+ f"Lower bound {lb_v[first] * nominal_v[first]} is higher than "
2312
+ f"upper bound {ub_v[first] * nominal_v[first]} for variable {variable}"
2308
2313
  )
2309
2314
 
2310
2315
  return lbx, ubx
@@ -2742,7 +2747,7 @@ class CollocatedIntegratedOptimizationProblem(OptimizationProblem, metaclass=ABC
2742
2747
 
2743
2748
  def __states_times_in(self, variable, t0=None, tf=None, ensemble_member=0):
2744
2749
  # Time stamps for this variable
2745
- times = self.times(variable)
2750
+ times = np.asarray(self.times(variable))
2746
2751
 
2747
2752
  # Set default values
2748
2753
  if t0 is None:
@@ -152,7 +152,7 @@ class GoalProgrammingMixin(_GoalProgrammingMixinBase):
152
152
  for epsilon in self.__subproblem_path_epsilons:
153
153
  eps_size = epsilon.size1()
154
154
  if eps_size > 1:
155
- seed[epsilon.name()] = Timeseries(times, np.ones((eps_size, len(times))))
155
+ seed[epsilon.name()] = Timeseries(times, np.ones((len(times), eps_size)))
156
156
  else:
157
157
  seed[epsilon.name()] = Timeseries(times, np.ones(len(times)))
158
158
 
@@ -376,6 +376,9 @@ class StateGoal(Goal):
376
376
  direct base class, by implementing the ``function`` method and providing the
377
377
  ``function_range`` and ``function_nominal`` class variables manually.
378
378
 
379
+ An explicitly set ``function_range`` is used as is; otherwise it is derived from the bounds of
380
+ the state.
381
+
379
382
  """
380
383
 
381
384
  #: The state on which the goal acts.
@@ -394,11 +397,14 @@ class StateGoal(Goal):
394
397
 
395
398
  # Extract state range from model
396
399
  if self.has_target_bounds:
400
+ derive_function_range = np.array_equal(
401
+ self.function_range, (np.nan, np.nan), equal_nan=True
402
+ )
397
403
  try:
398
404
  if optimization_problem.ensemble_specific_bounds:
399
405
  bounds = optimization_problem.bounds(0)
400
406
  bounds_state_ref = bounds[self.state]
401
- if np.array_equal(self.function_range, (np.nan, np.nan), equal_nan=True):
407
+ if derive_function_range:
402
408
  # If the user has not set the function range themselves, we
403
409
  # try and set it automatically. This is only possible if the
404
410
  # bounds are the same for all ensemble members.
@@ -419,9 +425,11 @@ class StateGoal(Goal):
419
425
  )
420
426
  else:
421
427
  bounds = optimization_problem.bounds()
422
- self.function_range = bounds[self.state]
428
+ state_bounds = bounds[self.state]
423
429
  except KeyError:
424
430
  raise Exception(f"State {self.state} has no bounds or does not exist in the model.")
431
+ if derive_function_range:
432
+ self.function_range = state_bounds
425
433
 
426
434
  if self.function_range[0] is None:
427
435
  raise Exception(f"Please provide a lower bound for state {self.state}.")
@@ -1,4 +1,5 @@
1
1
  import logging
2
+ import math
2
3
 
3
4
  from .optimization_problem import OptimizationProblem
4
5
  from .timeseries import Timeseries
@@ -81,7 +82,12 @@ class HomotopyMixin(OptimizationProblem):
81
82
  is initialized with the value of the option ``delta_theta_0``. If this step size is too
82
83
  large, i.e., if the problem with the increased homotopy parameter fails to converge, the
83
84
  step size is halved. The process of halving terminates when the step size falls below the
84
- minimum value specified by the option ``delta_theta_min``.
85
+ minimum value specified by the option ``delta_theta_min``. The last step is shortened if
86
+ needed, so that the problem is always solved at :math:`\\theta = 1.0`.
87
+
88
+ ``theta_start`` must not exceed 1, both step sizes must be positive, and
89
+ ``homotopy_parameter`` must name a parameter or a fixed input of the model. Otherwise,
90
+ :py:meth:`optimize` raises a ``ValueError``.
85
91
 
86
92
  :returns: A dictionary of homotopy options.
87
93
  """
@@ -104,12 +110,26 @@ class HomotopyMixin(OptimizationProblem):
104
110
 
105
111
  return dynamic_parameters
106
112
 
113
+ def __check_options(self, options):
114
+ if not options["theta_start"] <= 1.0:
115
+ raise ValueError("theta_start must not exceed 1.")
116
+ if not (options["delta_theta_0"] > 0.0 and options["delta_theta_min"] > 0.0):
117
+ raise ValueError("delta_theta_0 and delta_theta_min must be positive.")
118
+ name = options["homotopy_parameter"]
119
+ canonical_name, _ = self.alias_relation.canonical_signed(name)
120
+ variables = self.dae_variables["parameters"] + self.dae_variables["constant_inputs"]
121
+ if canonical_name not in {v.name() for v in variables}:
122
+ raise ValueError(
123
+ f"Homotopy parameter '{name}' is not a parameter or fixed input of the model."
124
+ )
125
+
107
126
  def optimize(self, preprocessing=True, postprocessing=True, log_solver_failure_as_error=True):
108
127
  # Pre-processing
109
128
  if preprocessing:
110
129
  self.pre()
111
130
 
112
131
  options = self.homotopy_options()
132
+ self.__check_options(options)
113
133
  delta_theta = options["delta_theta_0"]
114
134
 
115
135
  # Homotopy loop
@@ -134,14 +154,18 @@ class HomotopyMixin(OptimizationProblem):
134
154
  # Recompute the sparsity structure for the nonlinear model family.
135
155
  self.clear_transcription_cache()
136
156
 
157
+ if self.__theta == 1.0:
158
+ break
159
+ theta_converged = self.__theta
160
+
137
161
  else:
138
162
  if self.__theta == options["theta_start"]:
139
163
  break
140
164
 
141
- self.__theta -= delta_theta
142
- delta_theta /= 2
165
+ delta_theta = (self.__theta - theta_converged) / 2
143
166
 
144
167
  if delta_theta < options["delta_theta_min"]:
168
+ self.__theta = theta_converged
145
169
  failure_message = (
146
170
  "Solver failed with homotopy parameter theta = {}. Theta cannot "
147
171
  "be decreased further, as that would violate the minimum delta "
@@ -155,7 +179,10 @@ class HomotopyMixin(OptimizationProblem):
155
179
  logger.info(failure_message)
156
180
  break
157
181
 
158
- self.__theta += delta_theta
182
+ self.__theta = min(theta_converged + delta_theta, 1.0)
183
+ # Rounding can leave the sum of the steps just below 1.0.
184
+ if success and math.isclose(self.__theta, 1.0):
185
+ self.__theta = 1.0
159
186
 
160
187
  # Post-processing
161
188
  if postprocessing:
@@ -163,7 +163,7 @@ class SinglePassGoalProgrammingMixin(_GoalProgrammingMixinBase):
163
163
  for epsilon in self.__problem_path_epsilons:
164
164
  eps_size = epsilon.size1()
165
165
  if eps_size > 1:
166
- seed[epsilon.name()] = Timeseries(times, np.ones((eps_size, len(times))))
166
+ seed[epsilon.name()] = Timeseries(times, np.ones((len(times), eps_size)))
167
167
  else:
168
168
  seed[epsilon.name()] = Timeseries(times, np.ones(len(times)))
169
169