Skip to content

Commit 3dd0dd6

Browse files
Modify docstrings of uncertainty set parameter_bounds attributes
1 parent a292315 commit 3dd0dd6

File tree

1 file changed

+29
-36
lines changed

1 file changed

+29
-36
lines changed

pyomo/contrib/pyros/uncertainty_sets.py

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,11 @@ def parameter_bounds(self):
518518
519519
Returns
520520
-------
521-
list of tuple
522-
If the bounds can be calculated, then the list is of
523-
length `N`, and each entry is a pair of numeric
524-
(lower, upper) bounds for the corresponding
525-
(Cartesian) coordinate. Otherwise, the list is empty.
521+
list[tuple[float, float]]
522+
If the bounds can be calculated efficiently, then this list
523+
should be of length ``self.dim`` and contain the
524+
(lower, upper) bound pairs.
525+
Otherwise, the list should be empty.
526526
"""
527527
raise NotImplementedError
528528

@@ -1317,10 +1317,9 @@ def parameter_bounds(self):
13171317
13181318
Returns
13191319
-------
1320-
list of tuple
1321-
List, length `N`, of 2-tuples. Each tuple
1322-
specifies the bounds in its corresponding
1323-
dimension.
1320+
list[tuple[float, float]]
1321+
List, length `N`, of coordinate value
1322+
(lower, upper) bound pairs.
13241323
"""
13251324
return [tuple(bound) for bound in self.bounds]
13261325

@@ -1559,10 +1558,9 @@ def parameter_bounds(self):
15591558
15601559
Returns
15611560
-------
1562-
list of tuple
1563-
List, length `N`, of 2-tuples. Each tuple
1564-
specifies the bounds in its corresponding
1565-
dimension.
1561+
list[tuple[float, float]]
1562+
List, length `N`, of coordinate value
1563+
(lower, upper) bound pairs.
15661564
"""
15671565
nom_val = self.origin
15681566
deviation = self.positive_deviation
@@ -2191,10 +2189,9 @@ def parameter_bounds(self):
21912189
21922190
Returns
21932191
-------
2194-
list of tuple
2195-
List, length `N`, of 2-tuples. Each tuple
2196-
specifies the bounds in its corresponding
2197-
dimension.
2192+
list[tuple[float, float]]
2193+
List, length `N`, of coordinate value
2194+
(lower, upper) bound pairs.
21982195
"""
21992196
bounds = []
22002197
for orig_val, col in zip(self.origin, self.budget_membership_mat.T):
@@ -2528,10 +2525,9 @@ def parameter_bounds(self):
25282525
25292526
Returns
25302527
-------
2531-
list of tuple
2532-
List, length `N`, of 2-tuples. Each tuple
2533-
specifies the bounds in its corresponding
2534-
dimension.
2528+
list[tuple[float, float]]
2529+
List, length `N`, of coordinate value
2530+
(lower, upper) bound pairs.
25352531
"""
25362532
F = self.number_of_factors
25372533
psi_mat = self.psi_mat
@@ -2862,10 +2858,9 @@ def parameter_bounds(self):
28622858
28632859
Returns
28642860
-------
2865-
list of tuple
2866-
List, length `N`, of 2-tuples. Each tuple
2867-
specifies the bounds in its corresponding
2868-
dimension.
2861+
list[tuple[float, float]]
2862+
List, length `N`, of coordinate value
2863+
(lower, upper) bound pairs.
28692864
"""
28702865
nom_value = self.center
28712866
half_length = self.half_lengths
@@ -3267,10 +3262,9 @@ def parameter_bounds(self):
32673262
32683263
Returns
32693264
-------
3270-
list of tuple
3271-
List, length `N`, of 2-tuples. Each tuple
3272-
specifies the bounds in its corresponding
3273-
dimension.
3265+
list[tuple[float, float]]
3266+
List, length `N`, of coordinate value
3267+
(lower, upper) bound pairs.
32743268
"""
32753269
scale = self.scale
32763270
nom_value = self.center
@@ -3491,10 +3485,9 @@ def parameter_bounds(self):
34913485
34923486
Returns
34933487
-------
3494-
list of tuple
3495-
List, length `N`, of 2-tuples. Each tuple
3496-
specifies the bounds in its corresponding
3497-
dimension.
3488+
list[tuple[float, float]]
3489+
List, length `N`, of coordinate value
3490+
(lower, upper) bound pairs.
34983491
"""
34993492
parameter_bounds = [
35003493
(min(s[i] for s in self.scenarios), max(s[i] for s in self.scenarios))
@@ -3734,10 +3727,10 @@ def parameter_bounds(self):
37343727
37353728
Returns
37363729
-------
3737-
list of tuple
3730+
list[tuple[float, float]]
37383731
If one of the sets to be intersected is discrete,
3739-
then the bounds of the intersection set are returned
3740-
as a list, with length ``self.dim``, of 2-tuples.
3732+
then the list is of length ``self.dim`` and contains
3733+
the coordinate value (lower, upper) bound pairs.
37413734
Otherwise, an empty list is returned, as the bounds cannot,
37423735
in general, be computed without access to an optimization
37433736
solver.

0 commit comments

Comments
 (0)