mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Refer to variables by varname instead of (vname, index)
This commit is contained in:
3
tests/fixtures/infeasible.py
vendored
3
tests/fixtures/infeasible.py
vendored
@@ -4,6 +4,7 @@
|
||||
|
||||
from typing import Any
|
||||
|
||||
from overrides import overrides
|
||||
from pyomo import environ as pe
|
||||
|
||||
from miplearn.instance.base import Instance
|
||||
@@ -13,6 +14,7 @@ from tests.solvers import _is_subclass_or_instance
|
||||
|
||||
|
||||
class InfeasiblePyomoInstance(Instance):
|
||||
@overrides
|
||||
def to_model(self) -> pe.ConcreteModel:
|
||||
model = pe.ConcreteModel()
|
||||
model.x = pe.Var([0], domain=pe.Binary)
|
||||
@@ -22,6 +24,7 @@ class InfeasiblePyomoInstance(Instance):
|
||||
|
||||
|
||||
class InfeasibleGurobiInstance(Instance):
|
||||
@overrides
|
||||
def to_model(self) -> Any:
|
||||
import gurobipy as gp
|
||||
from gurobipy import GRB
|
||||
|
||||
Reference in New Issue
Block a user