rtc-tools 2.7.1__tar.gz → 2.7.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 (59) hide show
  1. {rtc_tools-2.7.1/src/rtc_tools.egg-info → rtc_tools-2.7.2}/PKG-INFO +2 -2
  2. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/README.md +6 -6
  3. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/setup.py +1 -1
  4. {rtc_tools-2.7.1 → rtc_tools-2.7.2/src/rtc_tools.egg-info}/PKG-INFO +2 -2
  5. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtc_tools.egg-info/requires.txt +1 -1
  6. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/_version.py +3 -3
  7. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/pi.py +37 -24
  8. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/rtctoolsapp.py +1 -1
  9. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/COPYING.LESSER +0 -0
  10. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/MANIFEST.in +0 -0
  11. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/pyproject.toml +0 -0
  12. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/setup.cfg +0 -0
  13. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtc_tools.egg-info/SOURCES.txt +0 -0
  14. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtc_tools.egg-info/dependency_links.txt +0 -0
  15. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtc_tools.egg-info/entry_points.txt +0 -0
  16. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtc_tools.egg-info/top_level.txt +0 -0
  17. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/__init__.py +0 -0
  18. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/_internal/__init__.py +0 -0
  19. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/_internal/alias_tools.py +0 -0
  20. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/_internal/caching.py +0 -0
  21. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/_internal/casadi_helpers.py +0 -0
  22. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/_internal/debug_check_helpers.py +0 -0
  23. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/__init__.py +0 -0
  24. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/csv.py +0 -0
  25. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/interpolation/__init__.py +0 -0
  26. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/interpolation/bspline.py +0 -0
  27. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/interpolation/bspline1d.py +0 -0
  28. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/interpolation/bspline2d.py +0 -0
  29. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/netcdf.py +0 -0
  30. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/rtc.py +0 -0
  31. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/data/storage.py +0 -0
  32. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/__init__.py +0 -0
  33. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/collocated_integrated_optimization_problem.py +0 -0
  34. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/control_tree_mixin.py +0 -0
  35. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/csv_lookup_table_mixin.py +0 -0
  36. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/csv_mixin.py +0 -0
  37. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/goal_programming_mixin.py +0 -0
  38. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/goal_programming_mixin_base.py +0 -0
  39. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/homotopy_mixin.py +0 -0
  40. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/initial_state_estimation_mixin.py +0 -0
  41. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/io_mixin.py +0 -0
  42. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/linearization_mixin.py +0 -0
  43. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/linearized_order_goal_programming_mixin.py +0 -0
  44. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/min_abs_goal_programming_mixin.py +0 -0
  45. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/modelica_mixin.py +0 -0
  46. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/netcdf_mixin.py +0 -0
  47. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/optimization_problem.py +0 -0
  48. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/pi_mixin.py +0 -0
  49. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/planning_mixin.py +0 -0
  50. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/single_pass_goal_programming_mixin.py +0 -0
  51. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/optimization/timeseries.py +0 -0
  52. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/simulation/__init__.py +0 -0
  53. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/simulation/csv_mixin.py +0 -0
  54. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/simulation/io_mixin.py +0 -0
  55. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/simulation/pi_mixin.py +0 -0
  56. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/simulation/simulation_problem.py +0 -0
  57. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/src/rtctools/util.py +0 -0
  58. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/tests/test_case.py +0 -0
  59. {rtc_tools-2.7.1 → rtc_tools-2.7.2}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rtc-tools
3
- Version: 2.7.1
3
+ Version: 2.7.2
4
4
  Summary: Toolbox for control and optimization of water systems.
5
5
  Home-page: https://oss.deltares.nl/web/rtc-tools/home
6
6
  Download-URL: http://github.com/deltares/rtc-tools/
@@ -25,7 +25,7 @@ Classifier: Operating System :: Unix
25
25
  Classifier: Operating System :: MacOS
26
26
  Requires-Python: >=3.9
27
27
  License-File: COPYING.LESSER
28
- Requires-Dist: casadi!=3.6.6,<=3.7,>=3.6.3
28
+ Requires-Dist: casadi!=3.6.6,<3.8,>=3.6.3
29
29
  Requires-Dist: numpy>=1.16.0
30
30
  Requires-Dist: scipy>=1.0.0
31
31
  Requires-Dist: pymoca==0.9.*,>=0.9.1
@@ -1,7 +1,7 @@
1
1
  # Deltares RTC-Tools
2
2
 
3
- [![Pipeline](https://github.com/deltares/rtc-tools/actions/workflows/rtc-tools.yml/badge.svg)](
4
- https://github.com/deltares/rtc-tools/actions/workflows/rtc-tools.yml
3
+ [![Pipeline](https://github.com/rtc-tools/rtc-tools/actions/workflows/ci.yml/badge.svg)](
4
+ https://github.com/rtc-tools/rtc-tools/actions/workflows/ci.yml
5
5
  )
6
6
  [![Coverage](
7
7
  https://sonarcloud.io/api/project_badges/measure?project=Deltares_rtc-tools&metric=coverage
@@ -53,15 +53,15 @@ Documentation and examples can be found on [readthedocs](https://rtc-tools.readt
53
53
 
54
54
  ## Migration from GitLab
55
55
 
56
- The rtc-tools repository has been migrated from gitlab (https://gitlab.com/deltares/rtc-tools)
56
+ The rtc-tools repository has been migrated from gitlab (https://gitlab.com/rtc-tools/rtc-tools)
57
57
  to here.
58
58
  To change the git remote url, run
59
59
 
60
- `git remote set-url origin https://github.com/Deltares/rtc-tools.git`
60
+ `git remote set-url origin https://github.com/rtc-tools/rtc-tools.git`
61
61
 
62
62
  and
63
63
 
64
- `git remote set-url --push origin https://github.com/Deltares/rtc-tools.git`.
64
+ `git remote set-url --push origin https://github.com/rtc-tools/rtc-tools.git`.
65
65
 
66
66
 
67
67
  ## License
@@ -73,4 +73,4 @@ and can be used free of charge. Deltares offers support packages for users who r
73
73
  If you use RTC-Tools in your work, please acknowledge it in any resulting publications.
74
74
  You can do this by citing RTC-Tools and providing a link to our
75
75
  [website](https://oss.deltares.nl/web/rtc-tools/home) or
76
- [GitHub repository](https://github.com/deltares/rtc-tools).
76
+ [GitHub repository](https://github.com/rtc-tools/rtc-tools).
@@ -45,7 +45,7 @@ setup(
45
45
  packages=find_packages("src"),
46
46
  package_dir={"": "src"},
47
47
  install_requires=[
48
- "casadi >= 3.6.3, <= 3.7, !=3.6.6",
48
+ "casadi >= 3.6.3, < 3.8, !=3.6.6",
49
49
  "numpy >= 1.16.0",
50
50
  "scipy >= 1.0.0",
51
51
  "pymoca >= 0.9.1, == 0.9.*",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rtc-tools
3
- Version: 2.7.1
3
+ Version: 2.7.2
4
4
  Summary: Toolbox for control and optimization of water systems.
5
5
  Home-page: https://oss.deltares.nl/web/rtc-tools/home
6
6
  Download-URL: http://github.com/deltares/rtc-tools/
@@ -25,7 +25,7 @@ Classifier: Operating System :: Unix
25
25
  Classifier: Operating System :: MacOS
26
26
  Requires-Python: >=3.9
27
27
  License-File: COPYING.LESSER
28
- Requires-Dist: casadi!=3.6.6,<=3.7,>=3.6.3
28
+ Requires-Dist: casadi!=3.6.6,<3.8,>=3.6.3
29
29
  Requires-Dist: numpy>=1.16.0
30
30
  Requires-Dist: scipy>=1.0.0
31
31
  Requires-Dist: pymoca==0.9.*,>=0.9.1
@@ -1,4 +1,4 @@
1
- casadi!=3.6.6,<=3.7,>=3.6.3
1
+ casadi!=3.6.6,<3.8,>=3.6.3
2
2
  numpy>=1.16.0
3
3
  scipy>=1.0.0
4
4
  pymoca==0.9.*,>=0.9.1
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-07-23T09:21:39+0200",
11
+ "date": "2025-11-25T14:13:12+0100",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "a3a2e2f821b5239481f43285b7dbf495a27de52e",
15
- "version": "2.7.1"
14
+ "full-revisionid": "280b3e8717728329dcbec06fd57fd2e61d5dadbf",
15
+ "version": "2.7.2"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -411,6 +411,7 @@ class Timeseries:
411
411
  self.__forecast_index = None
412
412
  self.__contains_ensemble = False
413
413
  self.__ensemble_size = 1
414
+ ensemble_indexes = set()
414
415
  for series in self.__xml_root.findall("pi:series", ns):
415
416
  header = series.find("pi:header", ns)
416
417
 
@@ -471,14 +472,23 @@ class Timeseries:
471
472
 
472
473
  el = header.find("pi:ensembleMemberIndex", ns)
473
474
  if el is not None:
474
- contains_ensemble = True
475
- if int(el.text) > self.__ensemble_size - 1: # Assume zero-based
476
- self.__ensemble_size = int(el.text) + 1
477
- else:
478
- contains_ensemble = False
479
- if self.__contains_ensemble is False:
480
- # Only overwrite when _contains_ensemble was False before
481
- self.__contains_ensemble = contains_ensemble
475
+ ensemble_indexes.add(int(el.text))
476
+
477
+ # We assume the ensemble ids are zero-based and increasing by 1
478
+ if len(ensemble_indexes) > 1:
479
+ # check if ids are zero-based and increasing by 1
480
+ sorted_ensemble_indexes = sorted(ensemble_indexes)
481
+ if sorted_ensemble_indexes != list(range(len(sorted_ensemble_indexes))):
482
+ raise ValueError(
483
+ "PI: Ensemble ids must be zero-based and increasing by 1 when more than one"
484
+ " ensemble member is present."
485
+ )
486
+ self.__contains_ensemble = True
487
+ self.__ensemble_size = len(ensemble_indexes)
488
+ else:
489
+ # There are no ensemble members, or a single ensemble member of arbitrary id
490
+ self.__contains_ensemble = False
491
+ self.__ensemble_size = 1
482
492
 
483
493
  # Define the times, and floor the global forecast_datetime to the
484
494
  # global time step to get its index
@@ -538,24 +548,27 @@ class Timeseries:
538
548
  end_datetime = self.__parse_date_time(header.find("pi:endDate", ns))
539
549
 
540
550
  make_virtual_ensemble = False
541
- el = header.find("pi:ensembleMemberIndex", ns)
542
- if el is not None:
543
- ensemble_member = int(el.text)
544
- while ensemble_member >= len(self.__values):
545
- self.__values.append({})
546
- while ensemble_member >= len(self.__units):
547
- self.__units.append({})
551
+ if self.__contains_ensemble:
552
+ el = header.find("pi:ensembleMemberIndex", ns)
553
+ if el is not None:
554
+ ensemble_member = int(el.text)
555
+ while ensemble_member >= len(self.__values):
556
+ self.__values.append({})
557
+ while ensemble_member >= len(self.__units):
558
+ self.__units.append({})
559
+ else:
560
+ ensemble_member = 0
561
+ if el is None:
562
+ # Expand values dict to accommodate referencing of (virtual)
563
+ # ensemble series to the input values. This is e.g. needed
564
+ # for initial states that have a single historical values.
565
+ while self.ensemble_size > len(self.__values):
566
+ self.__values.append({})
567
+ while self.ensemble_size > len(self.__units):
568
+ self.__units.append({})
569
+ make_virtual_ensemble = True
548
570
  else:
549
571
  ensemble_member = 0
550
- if el is None and self.contains_ensemble is True:
551
- # Expand values dict to accommodate referencing of (virtual)
552
- # ensemble series to the input values. This is e.g. needed
553
- # for initial states that have a single historical values.
554
- while self.ensemble_size > len(self.__values):
555
- self.__values.append({})
556
- while self.ensemble_size > len(self.__units):
557
- self.__units.append({})
558
- make_virtual_ensemble = True
559
572
 
560
573
  if self.__dt:
561
574
  n_values = int(
@@ -105,7 +105,7 @@ def download_examples(*args):
105
105
 
106
106
  version = rtctools.__version__
107
107
  try:
108
- url = "https://github.com/deltares/rtc-tools/zipball/{}".format(version)
108
+ url = "https://github.com/rtc-tools/rtc-tools/zipball/{}".format(version)
109
109
 
110
110
  opener = urllib.request.build_opener()
111
111
  urllib.request.install_opener(opener)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes