rtc-tools 2.8.1a1__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.
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.github/workflows/ci.yml +40 -17
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/PKG-INFO +1 -1
- rtc_tools-2.8.2/doc/examples/optimization/debugging.rst +51 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/pyproject.toml +2 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/_internal/casadi_to_lp.py +89 -79
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/bspline1d.py +7 -7
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/pi.py +1 -1
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/collocated_integrated_optimization_problem.py +16 -11
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/goal_programming_mixin.py +1 -1
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/goal_programming_mixin_base.py +10 -2
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/homotopy_mixin.py +31 -4
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/single_pass_goal_programming_mixin.py +1 -1
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/test_data.py +21 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/test_interpolate.py +12 -4
- rtc_tools-2.8.2/tests/optimization/data/ModelHomotopyParameter.mo +11 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_export_lp.py +160 -34
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_goal_programming.py +15 -0
- rtc_tools-2.8.2/tests/optimization/test_homotopy_mixin.py +92 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_integration.py +10 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_modelica_mixin.py +16 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_single_pass_goal_programming.py +54 -3
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/uv.lock +67 -1
- rtc_tools-2.8.1a1/doc/examples/optimization/debugging.rst +0 -29
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.codecov.yml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.coveragerc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.git-blame-ignore-revs +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.github/actions/setup-python/action.yml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.pre-commit-config.yaml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/.readthedocs.yaml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/AUTHORS +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/CHARTER.md +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/CONTRIBUTING.md +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/COPYING +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/COPYING.LESSER +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/GOVERNANCE.md +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/README.md +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/Makefile +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/_static/external_links.js +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/_static/theme_overrides.css +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/conf.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/basic.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/cascading_channels.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/channel_pulse.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/channel_wave_damping.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/ensemble.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/fallback_options.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/goal_programming.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/integrator_delay.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/lookup_table.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/mixed_integer.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/pumped_hydropower_system.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization/step_response.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/optimization.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/basic_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/cascading_channels_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/channel_pulse_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/channel_wave_damping.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/ensemble_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/goal_programming_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/integrator_delay.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/lookup_table_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/mixed_integer_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/pumped_hydropower_system_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/pyplots/simulation_results.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/simulation/custom_equation.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/simulation/setpoint.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples/simulation.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/examples.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/getting-started.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/Aggregation_01.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/Lake-Hartwell-24012016.jpg +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/PumpedStoragePlant_openmodelica.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/Woudagemaal.jpg +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/basic_example_console.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/cascading_channels_omedit.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/channel_impulse_xs.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/channel_wave_damping_omedit.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/graig-coch-2117306_640.jpg +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/integrator_delay_modelica.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/lavant-2976738_1280.jpg +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/orifice_vs_pump_openmodelica.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/pont-du-gard-1742029_1280.jpg +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/rtc-tools-horizontal-color.svg +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/rtc-tools-horizontal-white.svg +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/simple_storage_openmodelica.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/single_channel.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/single_channel_hec-ras.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/validation/Downstream_150.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/images/validation/Upstream_150.png +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/index.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/literature.bib +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/make.bat +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/basics.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/csv_io.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/fews_io.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/forecast_uncertainty.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/converting_goals_to_constraints.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/goals.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/linearized_order.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/main_idea.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/goal_programming/minimize_absolute_value.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/homotopy.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/initial_state_estimation.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/linearization.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/lookup_tables.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/modelica_models.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/multi_objective.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/solver_configuration.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization/time_discretization.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/optimization.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/related-projects.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/simulation/basics.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/simulation/csv_io.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/simulation/fews_io.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/simulation.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/doc/time-series.rst +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/basic/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/basic/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/basic/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/basic/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/basic/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/basic/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/cascading_channels/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/cascading_channels/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/cascading_channels/model/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/cascading_channels/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/cascading_channels/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/cascading_channels/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/cascading_channels/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/HEC-RAS.zip +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/HEC-RAS_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_inertial_wave.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_inertial_wave_semi_implicit.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_saint_venant.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/reference_output/timeseries_export_saint_venant_upwind.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_pulse/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/ExampleLocalControl.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/ExampleOptimization.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/model/PIDController.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/reference_output/timeseries_export_local_control.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/example_local_control.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/example_optimization.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/steady_state_initialization_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/channel_wave_damping/src/step_size_parameter_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/ensemble.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast1/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast1/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast1/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast2/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast2/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/forecast2/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/lookup_tables/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/lookup_tables/curvefit_options.ini +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/input/lookup_tables/storage_V.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/output/forecast1/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/output/forecast2/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/reference_output/forecast1/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/reference_output/forecast2/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/ensemble/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/fallback_option/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/fallback_option/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/fallback_option/src/example_with_gp.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/goal_programming/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/goal_programming/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/goal_programming/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/goal_programming/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/goal_programming/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/goal_programming/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/integrator_delay/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/integrator_delay/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/integrator_delay/input/timeseries_import_simulation.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/integrator_delay/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/integrator_delay/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/input/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/input/lookup_tables/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/input/lookup_tables/curvefit_options.ini +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/input/lookup_tables/storage_V.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/lookup_table/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/mixed_integer/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/mixed_integer/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/mixed_integer/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/mixed_integer/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/mixed_integer/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/mixed_integer/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/model/PumpedStoragePlant.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/pumped_hydropower_system/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation/input/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/model/SimpleModel.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/simulation_with_custom_equations/src/simple_model.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/single_reservoir/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/single_reservoir/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/single_reservoir/model/single_reservoir.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/single_reservoir/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/single_reservoir/reference_output/timeseries_export.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/single_reservoir/src/single_reservoir.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/step_response/input/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/step_response/input/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/step_response/model/Example.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/step_response/output/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/step_response/reference_output/timeseries_export_saint_venant.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/examples/step_response/src/example.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/sonar-project.properties +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/_internal/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/_internal/alias_tools.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/_internal/caching.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/_internal/casadi_helpers.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/_internal/debug_check_helpers.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/_internal/ensemble_bounds_decorator.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/csv.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/bspline.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/interpolation/bspline2d.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/netcdf.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/rtc.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/data/storage.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/control_tree_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/csv_lookup_table_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/csv_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/initial_state_estimation_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/io_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/linearization_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/linearized_order_goal_programming_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/min_abs_goal_programming_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/modelica_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/netcdf_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/optimization_problem.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/pi_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/planning_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/timeseries.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/rtctoolsapp.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/simulation/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/simulation/csv_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/simulation/io_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/simulation/pi_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/simulation/simulation_problem.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/util.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/version.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/curve.dat +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/diag.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/initial_state_0.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/initial_state_1.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/look_up_table_0.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/look_up_table_1.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/look_up_table_2.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/pi_run.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/surface.dat +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_export.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import.bin +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_0.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_1.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_2.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemble.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemble.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemblesize1_noRealization.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_ensemblesize1_withRealization.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data/timeseries_import_neq.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/data_path.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/test_csv.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/test_diag.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/test_netcdf.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data/test_storage.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/data_path.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/examples/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/examples/test_examples.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/internal/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/internal/test_alias_tools.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/EmptyModel.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/Model.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelAlgebraic.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelDebugChecks.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelDelay.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelDelayLoop.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelMixedInteger.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelNestedDelay.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelSIUnits.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelSymbolicParameters.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelWithInitial.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelWithInitialLinear.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ModelWithLookupTable.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/SingleShootingModel.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/ensemble.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/lookup_tables/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/lookup_tables/curvefit_options.ini +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/lookup_tables/x_prime.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member0/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member0/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member0/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member0/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member1/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member1/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member1/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/member1/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/Model.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/ensemble.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member0/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member1/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member2/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/member3/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/timeseries_import.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_ensemble_sizes/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/ensemble.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/member0/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/member1/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/timeseries_import.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_initial_date/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/ensemble.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/member0/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/member1/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/timeseries_import.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_timestep/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/ensemble.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member0/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member0/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member1/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/member1/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/timeseries_import.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/multiple_io_mixins/different_values/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/Model.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/rtcParameterConfig_extra.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/non_zero_indexed_ensembles/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/ensemble.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/one-member-ensemble/member0/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/reference_linear_model.lp +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/rtcParameterConfig_extra.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/Model.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/rtcParameterConfig_extra.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/single_non_zero_ensemble_index/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/timeseries_import.nc +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/data_path.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/regenerate_lp_reference.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_control_tree_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_csv_lookuptable_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_csv_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_debug_checks.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_delay_expressions.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_extra_casadipath.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_interpolation.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_io_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_linearized_order_goal_programming_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_min_abs_goal_programming.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_multiple_io_mixins.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_netcdf_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_optimization_problem.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_path_extra_variables.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_path_variable_assembly.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_pi_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_planning_and_control_tree_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_planning_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_problem_class_check.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_solvers.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_timeseries.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_vector_constraints_variables.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/optimization/test_vector_goals.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/__init__.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/.gitignore +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/Model.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/ModelCustomEquation.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/Model_base.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/Model_delay.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/Model_nominal.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_infeasible.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_out_of_bounds.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_out_of_sym_bounds.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_bounds.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_input_series.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_sym_ystart.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_xstart.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/model_with_zero_xstart.mo +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/infeasible_initial_value/timeseries_import_with_x.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/initial_state.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/parameters.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/rtcDataConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/rtcParameterConfig.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/timeseries_import.csv +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data/timeseries_import.xml +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/data_path.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/test_csv_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/test_io_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/test_pi_mixin.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/test_problem_class_check.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/simulation/test_simulation.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/test_case.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tests/test_rtctoolsapp.py +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/tox.ini +0 -0
- {rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/xsd/rtcDataConfig.xsd +0 -0
- {rtc_tools-2.8.1a1 → 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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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:
|
|
144
|
-
uses: actions/
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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.
|
|
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.
|
|
@@ -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
|
|
139
|
-
|
|
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
|
-
|
|
180
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
|
270
|
-
|
|
271
|
-
|
|
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
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
-
|
|
304
|
-
for
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
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}"
|
|
@@ -106,10 +106,10 @@ class BSpline1D(BSpline):
|
|
|
106
106
|
t = np.concatenate(
|
|
107
107
|
(np.full(k + 1, x[0] - delta), interior_pts, np.full(k + 1, x[-1] + delta))
|
|
108
108
|
)
|
|
109
|
-
|
|
109
|
+
num_coeffs = len(t) - k - 1
|
|
110
110
|
|
|
111
111
|
# Casadi Variable Symbols
|
|
112
|
-
c = SX.sym("c",
|
|
112
|
+
c = SX.sym("c", num_coeffs)
|
|
113
113
|
x_sym = SX.sym("x")
|
|
114
114
|
|
|
115
115
|
# Casadi Representation of Spline Function & Derivatives
|
|
@@ -129,21 +129,21 @@ class BSpline1D(BSpline):
|
|
|
129
129
|
f = sum2(sq_diff(c, SX(x), SX(y)))
|
|
130
130
|
|
|
131
131
|
# Setup Curvature Constraints
|
|
132
|
-
delta_c_max = np.full(
|
|
133
|
-
delta_c_min = np.full(
|
|
132
|
+
delta_c_max = np.full(num_coeffs - 1, inf)
|
|
133
|
+
delta_c_min = np.full(num_coeffs - 1, -inf)
|
|
134
134
|
max_slope_slope = np.full(num_test_points, inf)
|
|
135
135
|
min_slope_slope = np.full(num_test_points, -inf)
|
|
136
136
|
if monotonicity != 0:
|
|
137
137
|
if monotonicity < 0:
|
|
138
|
-
delta_c_max = np.full(
|
|
138
|
+
delta_c_max = np.full(num_coeffs - 1, -epsilon)
|
|
139
139
|
else:
|
|
140
|
-
delta_c_min = np.full(
|
|
140
|
+
delta_c_min = np.full(num_coeffs - 1, epsilon)
|
|
141
141
|
if curvature != 0:
|
|
142
142
|
if curvature < 0:
|
|
143
143
|
max_slope_slope = np.full(num_test_points, -epsilon)
|
|
144
144
|
else:
|
|
145
145
|
min_slope_slope = np.full(num_test_points, epsilon)
|
|
146
|
-
monotonicity_constraints = vertcat(*[c[i + 1] - c[i] for i in range(
|
|
146
|
+
monotonicity_constraints = vertcat(*[c[i + 1] - c[i] for i in range(num_coeffs - 1)])
|
|
147
147
|
x_linspace = np.linspace(x[0], x[-1], num_test_points)
|
|
148
148
|
curvature_constraints = vertcat(*[bspline_prime_prime(c, SX(x)) for x in x_linspace])
|
|
149
149
|
g = vertcat(monotonicity_constraints, curvature_constraints)
|
|
@@ -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
|
-
"
|
|
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,
|
|
2133
|
-
|
|
2134
|
-
|
|
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,
|
|
2146
|
-
|
|
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
|
-
|
|
2304
|
-
|
|
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 {
|
|
2307
|
-
f"upper bound {
|
|
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((
|
|
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
|
|
{rtc_tools-2.8.1a1 → rtc_tools-2.8.2}/src/rtctools/optimization/goal_programming_mixin_base.py
RENAMED
|
@@ -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
|
|
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
|
-
|
|
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}.")
|