pyoframe 0.0.6__py3-none-any.whl → 0.0.7__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.
- pyoframe/core.py +7 -3
- pyoframe/solvers.py +1 -1
- {pyoframe-0.0.6.dist-info → pyoframe-0.0.7.dist-info}/METADATA +1 -1
- {pyoframe-0.0.6.dist-info → pyoframe-0.0.7.dist-info}/RECORD +7 -7
- {pyoframe-0.0.6.dist-info → pyoframe-0.0.7.dist-info}/WHEEL +1 -1
- {pyoframe-0.0.6.dist-info → pyoframe-0.0.7.dist-info}/LICENSE +0 -0
- {pyoframe-0.0.6.dist-info → pyoframe-0.0.7.dist-info}/top_level.txt +0 -0
pyoframe/core.py
CHANGED
|
@@ -271,7 +271,11 @@ class Set(ModelElement, SupportsMath, SupportPolarsMethodMixin):
|
|
|
271
271
|
elif isinstance(set, Constraint):
|
|
272
272
|
df = set.data.select(set.dimensions_unsafe)
|
|
273
273
|
elif isinstance(set, SupportsMath):
|
|
274
|
-
df =
|
|
274
|
+
df = (
|
|
275
|
+
set.to_expr()
|
|
276
|
+
.data.drop(RESERVED_COL_KEYS, strict=False)
|
|
277
|
+
.unique(maintain_order=True)
|
|
278
|
+
)
|
|
275
279
|
elif isinstance(set, pd.Index):
|
|
276
280
|
df = pl.from_pandas(pd.DataFrame(index=set).reset_index())
|
|
277
281
|
elif isinstance(set, pd.DataFrame):
|
|
@@ -1259,7 +1263,7 @@ class Variable(ModelElementWithId, SupportsMath, SupportPolarsMethodMixin):
|
|
|
1259
1263
|
)
|
|
1260
1264
|
|
|
1261
1265
|
def to_expr(self) -> Expression:
|
|
1262
|
-
return self._new(self.data.drop(SOLUTION_KEY))
|
|
1266
|
+
return self._new(self.data.drop(SOLUTION_KEY, strict=False))
|
|
1263
1267
|
|
|
1264
1268
|
def _new(self, data: pl.DataFrame):
|
|
1265
1269
|
e = Expression(data.with_columns(pl.lit(1.0).alias(COEF_KEY)))
|
|
@@ -1337,5 +1341,5 @@ class Variable(ModelElementWithId, SupportsMath, SupportPolarsMethodMixin):
|
|
|
1337
1341
|
data = expr.data.rename({dim: "__prev"})
|
|
1338
1342
|
data = data.join(
|
|
1339
1343
|
wrapped, left_on="__prev", right_on="__next", how="inner"
|
|
1340
|
-
).drop(["__prev", "__next"])
|
|
1344
|
+
).drop(["__prev", "__next"], strict=False)
|
|
1341
1345
|
return expr._new(data)
|
pyoframe/solvers.py
CHANGED
|
@@ -313,7 +313,7 @@ class GurobiSolver(FileBasedSolver):
|
|
|
313
313
|
termination_condition = GurobiSolver.CONDITION_MAP.get(condition, condition)
|
|
314
314
|
status = Status.from_termination_condition(termination_condition)
|
|
315
315
|
|
|
316
|
-
if status.is_ok:
|
|
316
|
+
if status.is_ok and (termination_condition == "optimal"):
|
|
317
317
|
if solution_file:
|
|
318
318
|
m.write(_path_to_str(solution_file))
|
|
319
319
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
pyoframe/__init__.py,sha256=D7HHQPy2Me-LLyfPCcSE74dn83PeMK3aOby7i7oiLTs,507
|
|
2
2
|
pyoframe/_arithmetic.py,sha256=riyN2JC-BnOgTIxGfXKIS-X_p7zm8JaKrLk_KDwKAAw,9046
|
|
3
3
|
pyoframe/constants.py,sha256=olao24mkzQfwTlc5o4rQ-AOOTytmtVqNCFwJIc8zbds,7169
|
|
4
|
-
pyoframe/core.py,sha256=
|
|
4
|
+
pyoframe/core.py,sha256=TwpWPYl1K5qDSFAX9yfabFKpahxgqoa2eL0zmkP91dI,51247
|
|
5
5
|
pyoframe/io.py,sha256=7bd_oKD8EZsuM0ONUAA9BDFSFvUoXLWGXDhnUqMde8o,5235
|
|
6
6
|
pyoframe/io_mappers.py,sha256=Op5451Yo4gNa-2BiPPCAjPYdFLo8jIeKHCYXUcGPRug,7385
|
|
7
7
|
pyoframe/model.py,sha256=xod3hSf__WWDy0V9pao9wPlQTc7-7x56FJoKKidsMbw,3768
|
|
8
8
|
pyoframe/model_element.py,sha256=H2gZxksb3UQ25vIdNlb07bCx3ZcWh7YD6-ViPVJV-JI,7691
|
|
9
9
|
pyoframe/monkey_patch.py,sha256=S_DU7cieU5C3t3kAyKQrGyLTwno0WANpDBV3xn7AyG8,2068
|
|
10
10
|
pyoframe/objective.py,sha256=JzuyMAQZ2OxEoAaK-splWwZei2hHPbCLdG-X2-yRkD0,1338
|
|
11
|
-
pyoframe/solvers.py,sha256=
|
|
11
|
+
pyoframe/solvers.py,sha256=yf-hzUHDvKgmIHk2FobmygzE9-LnOzTBL5ps-nqGo8I,11875
|
|
12
12
|
pyoframe/user_defined.py,sha256=UWZSTpFj0a8n1_RHwC8Ubwqr4FO-gRPBqqfNUut1IZg,1717
|
|
13
13
|
pyoframe/util.py,sha256=KJubFV66E7WPI5UhcuUNsVwCm7WOcQBiLN1af1MAAgA,9647
|
|
14
|
-
pyoframe-0.0.
|
|
15
|
-
pyoframe-0.0.
|
|
16
|
-
pyoframe-0.0.
|
|
17
|
-
pyoframe-0.0.
|
|
18
|
-
pyoframe-0.0.
|
|
14
|
+
pyoframe-0.0.7.dist-info/LICENSE,sha256=L1pXz6p_1OW5XGWb2UCR6PNu6k3JAT0XWhi8jV0cuRg,1137
|
|
15
|
+
pyoframe-0.0.7.dist-info/METADATA,sha256=zKjbfnByq8u6GRauys4BbRuWjL6SGiCmd9SBhwTDFCE,3445
|
|
16
|
+
pyoframe-0.0.7.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
17
|
+
pyoframe-0.0.7.dist-info/top_level.txt,sha256=10z3OOJSVLriQ0IrFLMH8CH9zByugPWolqhlHlkNjV4,9
|
|
18
|
+
pyoframe-0.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|