gamspy 1.18.4__py3-none-any.whl → 1.19.0__py3-none-any.whl

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 (89) hide show
  1. gamspy/__init__.py +86 -86
  2. gamspy/__main__.py +6 -6
  3. gamspy/_algebra/__init__.py +13 -13
  4. gamspy/_algebra/condition.py +290 -253
  5. gamspy/_algebra/domain.py +103 -103
  6. gamspy/_algebra/expression.py +820 -820
  7. gamspy/_algebra/number.py +79 -79
  8. gamspy/_algebra/operable.py +185 -185
  9. gamspy/_algebra/operation.py +948 -845
  10. gamspy/_backend/backend.py +313 -311
  11. gamspy/_backend/engine.py +960 -960
  12. gamspy/_backend/local.py +124 -124
  13. gamspy/_backend/neos.py +567 -567
  14. gamspy/_cli/__init__.py +1 -1
  15. gamspy/_cli/cli.py +64 -64
  16. gamspy/_cli/gdx.py +377 -377
  17. gamspy/_cli/install.py +375 -377
  18. gamspy/_cli/list.py +94 -94
  19. gamspy/_cli/mps2gms.py +128 -128
  20. gamspy/_cli/probe.py +52 -52
  21. gamspy/_cli/retrieve.py +79 -79
  22. gamspy/_cli/run.py +158 -158
  23. gamspy/_cli/show.py +246 -246
  24. gamspy/_cli/uninstall.py +165 -165
  25. gamspy/_cli/util.py +94 -94
  26. gamspy/_communication.py +215 -215
  27. gamspy/_config.py +132 -132
  28. gamspy/_container.py +1694 -1636
  29. gamspy/_convert.py +720 -720
  30. gamspy/_database.py +271 -271
  31. gamspy/_extrinsic.py +181 -181
  32. gamspy/_miro.py +356 -352
  33. gamspy/_model.py +1803 -1682
  34. gamspy/_model_instance.py +701 -701
  35. gamspy/_options.py +780 -778
  36. gamspy/_serialization.py +156 -156
  37. gamspy/_symbols/__init__.py +17 -17
  38. gamspy/_symbols/alias.py +305 -305
  39. gamspy/_symbols/equation.py +1407 -1407
  40. gamspy/_symbols/implicits/__init__.py +11 -11
  41. gamspy/_symbols/implicits/implicit_equation.py +186 -186
  42. gamspy/_symbols/implicits/implicit_parameter.py +272 -272
  43. gamspy/_symbols/implicits/implicit_set.py +124 -124
  44. gamspy/_symbols/implicits/implicit_symbol.py +315 -315
  45. gamspy/_symbols/implicits/implicit_variable.py +255 -255
  46. gamspy/_symbols/parameter.py +648 -648
  47. gamspy/_symbols/set.py +985 -985
  48. gamspy/_symbols/symbol.py +395 -386
  49. gamspy/_symbols/universe_alias.py +182 -182
  50. gamspy/_symbols/variable.py +1101 -1101
  51. gamspy/_types.py +7 -7
  52. gamspy/_validation.py +735 -735
  53. gamspy/_workspace.py +72 -72
  54. gamspy/exceptions.py +128 -128
  55. gamspy/formulations/__init__.py +46 -46
  56. gamspy/formulations/ml/__init__.py +11 -11
  57. gamspy/formulations/ml/decision_tree_struct.py +80 -80
  58. gamspy/formulations/ml/gradient_boosting.py +203 -203
  59. gamspy/formulations/ml/random_forest.py +187 -187
  60. gamspy/formulations/ml/regression_tree.py +533 -533
  61. gamspy/formulations/nn/__init__.py +19 -19
  62. gamspy/formulations/nn/avgpool2d.py +232 -232
  63. gamspy/formulations/nn/conv1d.py +533 -533
  64. gamspy/formulations/nn/conv2d.py +529 -529
  65. gamspy/formulations/nn/linear.py +341 -341
  66. gamspy/formulations/nn/maxpool2d.py +88 -88
  67. gamspy/formulations/nn/minpool2d.py +88 -88
  68. gamspy/formulations/nn/mpool2d.py +245 -245
  69. gamspy/formulations/nn/torch_sequential.py +278 -278
  70. gamspy/formulations/piecewise.py +682 -682
  71. gamspy/formulations/result.py +119 -119
  72. gamspy/formulations/shape.py +188 -188
  73. gamspy/formulations/utils.py +173 -173
  74. gamspy/math/__init__.py +215 -215
  75. gamspy/math/activation.py +783 -767
  76. gamspy/math/log_power.py +435 -435
  77. gamspy/math/matrix.py +534 -534
  78. gamspy/math/misc.py +1709 -1625
  79. gamspy/math/probability.py +170 -170
  80. gamspy/math/trigonometric.py +232 -232
  81. gamspy/utils.py +810 -810
  82. gamspy/version.py +5 -5
  83. {gamspy-1.18.4.dist-info → gamspy-1.19.0.dist-info}/METADATA +90 -121
  84. gamspy-1.19.0.dist-info/RECORD +90 -0
  85. {gamspy-1.18.4.dist-info → gamspy-1.19.0.dist-info}/WHEEL +1 -1
  86. {gamspy-1.18.4.dist-info → gamspy-1.19.0.dist-info}/licenses/LICENSE +22 -22
  87. gamspy-1.18.4.dist-info/RECORD +0 -90
  88. {gamspy-1.18.4.dist-info → gamspy-1.19.0.dist-info}/entry_points.txt +0 -0
  89. {gamspy-1.18.4.dist-info → gamspy-1.19.0.dist-info}/top_level.txt +0 -0
@@ -1,253 +1,290 @@
1
- from __future__ import annotations
2
-
3
- from typing import TYPE_CHECKING
4
-
5
- import gamspy._algebra.domain as domain
6
- import gamspy._algebra.expression as expression
7
- import gamspy._algebra.operable as operable
8
- import gamspy._symbols as syms
9
- import gamspy._symbols.implicits as implicits
10
- import gamspy.utils as utils
11
- from gamspy._symbols.implicits.implicit_symbol import ImplicitSymbol
12
- from gamspy._symbols.symbol import Symbol
13
-
14
- if TYPE_CHECKING:
15
- import pandas as pd
16
-
17
- from gamspy import Alias, Parameter, Set, Variable
18
- from gamspy._algebra.domain import Domain
19
- from gamspy._algebra.expression import Expression
20
- from gamspy._algebra.number import Number
21
- from gamspy._algebra.operation import Card, Operation, Ord
22
- from gamspy._symbols.implicits import (
23
- ImplicitParameter,
24
- ImplicitSet,
25
- )
26
- from gamspy.math import MathOp
27
-
28
-
29
- class Condition(operable.Operable):
30
- """
31
- Condition class allows conditioning on GAMSPy constructs such as Symbols and Expressions.
32
-
33
- Parameters
34
- ----------
35
- symbol: ImplicitSymbol | Expression
36
- Reference to the symbol to be conditioned.
37
-
38
- Examples
39
- --------
40
- >>> import gamspy as gp
41
- >>> m = gp.Container()
42
- >>> i = gp.Set(m, "i", records=["i1", "i2", "i3"])
43
- >>> a = gp.Parameter(m, "a", domain=i, records=[("i1", 10), ("i2", 20), ("i3", 30)])
44
- >>> # Conditional assignment: Set values to 1 where they exceed 15
45
- >>> a[i].where[a[i] > 15] = 1
46
- >>> a.records.values.tolist()
47
- [['i1', 10.0], ['i2', 1.0], ['i3', 1.0]]
48
-
49
- """
50
-
51
- def __init__(
52
- self,
53
- conditioning_on: ImplicitSymbol
54
- | Set
55
- | Alias
56
- | Parameter
57
- | Variable
58
- | Expression
59
- | Operation
60
- | Domain
61
- | Number
62
- | Card
63
- | Ord
64
- | MathOp,
65
- condition: Operation
66
- | Expression
67
- | ImplicitParameter
68
- | ImplicitSet
69
- | int
70
- | None = None,
71
- ):
72
- self.conditioning_on = conditioning_on
73
- self.condition = condition
74
- self._where = None
75
- self.container = None
76
- if hasattr(conditioning_on, "container"):
77
- self.container = conditioning_on.container
78
-
79
- self.domain = None
80
- if hasattr(conditioning_on, "domain"):
81
- self.domain = conditioning_on.domain
82
-
83
- @property
84
- def where(self):
85
- return Condition(self)
86
-
87
- def __getitem__(
88
- self,
89
- condition: Operation | Expression | ImplicitParameter | ImplicitSet,
90
- ) -> Condition:
91
- if isinstance(condition, expression.Expression):
92
- condition._fix_equalities()
93
-
94
- return Condition(self.conditioning_on, condition)
95
-
96
- def __setitem__(self, condition, rhs):
97
- # conditioning_on.where[condition] = rhs
98
- eq_types = (syms.Equation, implicits.ImplicitEquation)
99
- if isinstance(rhs, bool):
100
- rhs = "yes" if rhs is True else "no"
101
-
102
- op_type = ".." if isinstance(self.conditioning_on, eq_types) else "="
103
-
104
- if isinstance(condition, expression.Expression):
105
- condition._fix_equalities()
106
-
107
- lhs = Condition(self.conditioning_on, condition)
108
- statement = expression.Expression(lhs, op_type, rhs)
109
-
110
- if isinstance(self.conditioning_on, ImplicitSymbol):
111
- statement._validate_definition(utils._unpack(self.conditioning_on.domain))
112
-
113
- self.conditioning_on.container._add_statement(statement)
114
-
115
- if isinstance(self.conditioning_on, ImplicitSymbol):
116
- self.conditioning_on.parent._assignment = statement
117
- self.conditioning_on.parent._winner = "gams"
118
- elif isinstance(self.conditioning_on, Symbol):
119
- self.conditioning_on._assignment = statement
120
- self.conditioning_on._winner = "gams"
121
-
122
- if isinstance(self.conditioning_on, implicits.ImplicitEquation):
123
- self.conditioning_on.parent._definition = statement
124
-
125
- self.conditioning_on.container._synch_with_gams(gams_to_gamspy=True)
126
-
127
- def __repr__(self) -> str:
128
- return f"Condition(conditioning_on={self.conditioning_on}, condition={self.condition})"
129
-
130
- @property
131
- def dimension(self) -> int:
132
- if self.domain is None:
133
- return 0
134
-
135
- return len(self.domain)
136
-
137
- @property
138
- def records(self) -> pd.DataFrame | None:
139
- """
140
- The records of the condition.
141
-
142
- Returns
143
- -------
144
- pd.DataFrame | None
145
-
146
- Examples
147
- --------
148
- >>> import gamspy as gp
149
- >>> m = gp.Container()
150
- >>> i = gp.Set(m, "i", records=["i1", "i2", "i3"])
151
- >>> a = gp.Parameter(m, "a", domain=i, records=[("i1", 10), ("i2", 20), ("i3", 5)])
152
- >>> condition = a[i].where[a[i] > 9]
153
- >>> condition.records.values.tolist()
154
- [['i1', 10.0], ['i2', 20.0]]
155
-
156
- """
157
- assert self.container is not None
158
- assert self.domain is not None
159
- if isinstance(
160
- self.conditioning_on,
161
- (syms.Set, syms.Alias, implicits.ImplicitSet),
162
- ):
163
- temp_name = "c" + utils._get_unique_name()
164
- temp_sym = syms.Set._constructor_bypass(
165
- self.container,
166
- temp_name,
167
- self.domain, # type: ignore
168
- )
169
- temp_sym[...] = self
170
- del self.container.data[temp_name]
171
- elif isinstance(self.conditioning_on, domain.Domain):
172
- temp_name = "c" + utils._get_unique_name()
173
- temp_sym = syms.Set._constructor_bypass(
174
- self.container,
175
- temp_name,
176
- self.domain, # type: ignore
177
- )
178
- temp_sym[...].where[self.condition] = True
179
- del self.container.data[temp_name]
180
- else:
181
- temp_name = "c" + utils._get_unique_name()
182
- temp_sym = syms.Parameter._constructor_bypass(
183
- self.container,
184
- temp_name,
185
- self.domain, # type: ignore
186
- )
187
- temp_sym[...] = self
188
- del self.container.data[temp_name]
189
-
190
- return temp_sym.records
191
-
192
- def gamsRepr(self) -> str:
193
- """
194
- Representation of this condition in GAMS.
195
-
196
- Returns
197
- -------
198
- str
199
-
200
- Examples
201
- --------
202
- >>> import gamspy as gp
203
- >>> m = gp.Container()
204
- >>> i = gp.Set(m, "i", records=["i1", "i2"])
205
- >>> a = gp.Parameter(m, "a", domain=i)
206
- >>> condition = a[i].where[a[i] > 5]
207
- >>> condition.gamsRepr()
208
- 'a(i) $ (a(i) > 5)'
209
-
210
- """
211
- condition_str = (
212
- self.condition.gamsRepr() # type: ignore
213
- if hasattr(self.condition, "gamsRepr")
214
- else str(self.condition)
215
- )
216
- conditioning_on_str = self.conditioning_on.gamsRepr()
217
-
218
- if isinstance(self.condition, bool):
219
- condition_str = str(int(self.condition))
220
-
221
- if isinstance(self.conditioning_on, expression.Expression):
222
- conditioning_on_str = f"({conditioning_on_str})"
223
-
224
- return f"{conditioning_on_str} $ ({condition_str})" # type: ignore
225
-
226
- def getDeclaration(self) -> str:
227
- return self.gamsRepr()
228
-
229
- def latexRepr(self) -> str:
230
- """
231
- Representation of this condition in Latex.
232
-
233
- Returns
234
- -------
235
- str
236
-
237
- Examples
238
- --------
239
- >>> import gamspy as gp
240
- >>> m = gp.Container()
241
- >>> i = gp.Set(m, "i", records=["i1", "i2"])
242
- >>> a = gp.Parameter(m, "a", domain=i)
243
- >>> condition = a[i].where[a[i] > 2]
244
- >>> condition.latexRepr()
245
- 'a_{i} ~ | ~ a_{i} > 2'
246
-
247
- """
248
- condition_str = (
249
- self.condition.latexRepr() # type: ignore
250
- if hasattr(self.condition, "latexRepr")
251
- else str(self.condition)
252
- )
253
- return f"{self.conditioning_on.latexRepr()} ~ | ~ {condition_str}" # type: ignore
1
+ from __future__ import annotations
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ import gamspy._algebra.domain as domain
6
+ import gamspy._algebra.expression as expression
7
+ import gamspy._algebra.operable as operable
8
+ import gamspy._symbols as syms
9
+ import gamspy._symbols.implicits as implicits
10
+ import gamspy.utils as utils
11
+ from gamspy._symbols.implicits.implicit_symbol import ImplicitSymbol
12
+ from gamspy._symbols.symbol import Symbol
13
+
14
+ if TYPE_CHECKING:
15
+ import pandas as pd
16
+
17
+ from gamspy import Alias, Parameter, Set, Variable
18
+ from gamspy._algebra.domain import Domain
19
+ from gamspy._algebra.expression import Expression
20
+ from gamspy._algebra.number import Number
21
+ from gamspy._algebra.operation import Card, Operation, Ord
22
+ from gamspy._symbols.implicits import (
23
+ ImplicitParameter,
24
+ ImplicitSet,
25
+ )
26
+ from gamspy.math import MathOp
27
+
28
+
29
+ class Condition(operable.Operable):
30
+ """
31
+ Condition class allows conditioning on GAMSPy constructs such as Symbols and Expressions.
32
+
33
+ Parameters
34
+ ----------
35
+ symbol: ImplicitSymbol | Expression
36
+ Reference to the symbol to be conditioned.
37
+
38
+ Examples
39
+ --------
40
+ >>> import gamspy as gp
41
+ >>> m = gp.Container()
42
+ >>> i = gp.Set(m, "i", records=["i1", "i2", "i3"])
43
+ >>> a = gp.Parameter(m, "a", domain=i, records=[("i1", 10), ("i2", 20), ("i3", 30)])
44
+ >>> # Conditional assignment: Set values to 1 where they exceed 15
45
+ >>> a[i].where[a[i] > 15] = 1
46
+ >>> a.records.values.tolist()
47
+ [['i1', 10.0], ['i2', 1.0], ['i3', 1.0]]
48
+
49
+ """
50
+
51
+ def __init__(
52
+ self,
53
+ conditioning_on: ImplicitSymbol
54
+ | Set
55
+ | Alias
56
+ | Parameter
57
+ | Variable
58
+ | Expression
59
+ | Operation
60
+ | Domain
61
+ | Number
62
+ | Card
63
+ | Ord
64
+ | MathOp,
65
+ condition: Operation
66
+ | Expression
67
+ | ImplicitParameter
68
+ | ImplicitSet
69
+ | int
70
+ | None = None,
71
+ ):
72
+ self.conditioning_on = conditioning_on
73
+ self.condition = condition
74
+ self._where = None
75
+ self.container = None
76
+ if hasattr(conditioning_on, "container"):
77
+ self.container = conditioning_on.container
78
+
79
+ self.domain = None
80
+ if hasattr(conditioning_on, "domain"):
81
+ self.domain = conditioning_on.domain
82
+
83
+ @property
84
+ def where(self):
85
+ return Condition(self)
86
+
87
+ def __getitem__(
88
+ self,
89
+ condition: Operation | Expression | ImplicitParameter | ImplicitSet,
90
+ ) -> Condition:
91
+ if isinstance(condition, expression.Expression):
92
+ condition._fix_equalities()
93
+
94
+ return Condition(self.conditioning_on, condition)
95
+
96
+ def __setitem__(self, condition, rhs):
97
+ # conditioning_on.where[condition] = rhs
98
+ eq_types = (syms.Equation, implicits.ImplicitEquation)
99
+ if isinstance(rhs, bool):
100
+ rhs = "yes" if rhs is True else "no"
101
+
102
+ op_type = ".." if isinstance(self.conditioning_on, eq_types) else "="
103
+
104
+ if isinstance(condition, expression.Expression):
105
+ condition._fix_equalities()
106
+
107
+ lhs = Condition(self.conditioning_on, condition)
108
+ statement = expression.Expression(lhs, op_type, rhs)
109
+
110
+ if isinstance(self.conditioning_on, ImplicitSymbol):
111
+ statement._validate_definition(utils._unpack(self.conditioning_on.domain))
112
+
113
+ self.conditioning_on.container._add_statement(statement)
114
+
115
+ if isinstance(self.conditioning_on, ImplicitSymbol):
116
+ self.conditioning_on.parent._assignment = statement
117
+ self.conditioning_on.parent._winner = "gams"
118
+ elif isinstance(self.conditioning_on, Symbol):
119
+ self.conditioning_on._assignment = statement
120
+ self.conditioning_on._winner = "gams"
121
+
122
+ if isinstance(self.conditioning_on, implicits.ImplicitEquation):
123
+ self.conditioning_on.parent._definition = statement
124
+
125
+ self.conditioning_on.container._synch_with_gams(gams_to_gamspy=True)
126
+
127
+ def __repr__(self) -> str:
128
+ return f"Condition(conditioning_on={self.conditioning_on}, condition={self.condition})"
129
+
130
+ @property
131
+ def dimension(self) -> int:
132
+ """
133
+ The dimension of the records of the condition.
134
+
135
+ Returns
136
+ -------
137
+ int
138
+ Dimensionality
139
+
140
+ Examples
141
+ --------
142
+ >>> import gamspy as gp
143
+ >>> m = gp.Container()
144
+ >>> i = gp.Set(m, "i", records=["i1", "i2", "i3"])
145
+ >>> a = gp.Parameter(m, "a", domain=i, records=[("i1", 10), ("i2", 20), ("i3", 5)])
146
+ >>> condition = a[i].where[a[i] > 9]
147
+ >>> condition.dimension
148
+ 1
149
+
150
+ """
151
+ if self.domain is None:
152
+ return 0
153
+
154
+ return len(self.domain)
155
+
156
+ @property
157
+ def records(self) -> pd.DataFrame | None:
158
+ """
159
+ The records of the condition.
160
+
161
+ Returns
162
+ -------
163
+ pd.DataFrame | None
164
+
165
+ Examples
166
+ --------
167
+ >>> import gamspy as gp
168
+ >>> m = gp.Container()
169
+ >>> i = gp.Set(m, "i", records=["i1", "i2", "i3"])
170
+ >>> a = gp.Parameter(m, "a", domain=i, records=[("i1", 10), ("i2", 20), ("i3", 5)])
171
+ >>> condition = a[i].where[a[i] > 9]
172
+ >>> condition.records.values.tolist()
173
+ [['i1', 10.0], ['i2', 20.0]]
174
+
175
+ """
176
+ assert self.container is not None
177
+ assert self.domain is not None
178
+ if isinstance(
179
+ self.conditioning_on,
180
+ (syms.Set, syms.Alias, implicits.ImplicitSet),
181
+ ):
182
+ temp_name = "c" + utils._get_unique_name()
183
+ temp_sym = syms.Set._constructor_bypass(
184
+ self.container,
185
+ temp_name,
186
+ self.domain, # type: ignore
187
+ )
188
+ temp_sym[...] = self
189
+ del self.container.data[temp_name]
190
+ elif isinstance(self.conditioning_on, domain.Domain):
191
+ temp_name = "c" + utils._get_unique_name()
192
+ temp_sym = syms.Set._constructor_bypass(
193
+ self.container,
194
+ temp_name,
195
+ self.domain, # type: ignore
196
+ )
197
+ temp_sym[...].where[self.condition] = True
198
+ del self.container.data[temp_name]
199
+ else:
200
+ temp_name = "c" + utils._get_unique_name()
201
+ temp_sym = syms.Parameter._constructor_bypass(
202
+ self.container,
203
+ temp_name,
204
+ self.domain, # type: ignore
205
+ )
206
+ temp_sym[...] = self
207
+ del self.container.data[temp_name]
208
+
209
+ return temp_sym.records
210
+
211
+ def gamsRepr(self) -> str:
212
+ """
213
+ Representation of this condition in GAMS.
214
+
215
+ Returns
216
+ -------
217
+ str
218
+
219
+ Examples
220
+ --------
221
+ >>> import gamspy as gp
222
+ >>> m = gp.Container()
223
+ >>> i = gp.Set(m, "i", records=["i1", "i2"])
224
+ >>> a = gp.Parameter(m, "a", domain=i)
225
+ >>> condition = a[i].where[a[i] > 5]
226
+ >>> condition.gamsRepr()
227
+ 'a(i) $ (a(i) > 5)'
228
+
229
+ """
230
+ condition_str = (
231
+ self.condition.gamsRepr() # type: ignore
232
+ if hasattr(self.condition, "gamsRepr")
233
+ else str(self.condition)
234
+ )
235
+ conditioning_on_str = self.conditioning_on.gamsRepr()
236
+
237
+ if isinstance(self.condition, bool):
238
+ condition_str = str(int(self.condition))
239
+
240
+ if isinstance(self.conditioning_on, expression.Expression):
241
+ conditioning_on_str = f"({conditioning_on_str})"
242
+
243
+ return f"{conditioning_on_str} $ ({condition_str})" # type: ignore
244
+
245
+ def getDeclaration(self) -> str:
246
+ """
247
+ Declaration of this condition in GAMS.
248
+
249
+ Returns
250
+ -------
251
+ str
252
+
253
+ Examples
254
+ --------
255
+ >>> import gamspy as gp
256
+ >>> m = gp.Container()
257
+ >>> i = gp.Set(m, "i", records=["i1", "i2"])
258
+ >>> a = gp.Parameter(m, "a", domain=i)
259
+ >>> condition = a[i].where[a[i] > 5]
260
+ >>> condition.getDeclaration()
261
+ 'a(i) $ (a(i) > 5)'
262
+
263
+ """
264
+ return self.gamsRepr()
265
+
266
+ def latexRepr(self) -> str:
267
+ """
268
+ Representation of this condition in Latex.
269
+
270
+ Returns
271
+ -------
272
+ str
273
+
274
+ Examples
275
+ --------
276
+ >>> import gamspy as gp
277
+ >>> m = gp.Container()
278
+ >>> i = gp.Set(m, "i", records=["i1", "i2"])
279
+ >>> a = gp.Parameter(m, "a", domain=i)
280
+ >>> condition = a[i].where[a[i] > 2]
281
+ >>> condition.latexRepr()
282
+ 'a_{i} ~ | ~ a_{i} > 2'
283
+
284
+ """
285
+ condition_str = (
286
+ self.condition.latexRepr() # type: ignore
287
+ if hasattr(self.condition, "latexRepr")
288
+ else str(self.condition)
289
+ )
290
+ return f"{self.conditioning_on.latexRepr()} ~ | ~ {condition_str}" # type: ignore