mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Add variables to model features
This commit is contained in:
@@ -21,10 +21,11 @@ class ModelFeaturesExtractor:
|
||||
constraints: Dict[str, ConstraintFeatures] = {}
|
||||
for cid in self.solver.get_constraint_ids():
|
||||
constraints[cid] = {
|
||||
"rhs": self.solver.get_constraint_rhs(cid),
|
||||
"lhs": self.solver.get_constraint_lhs(cid),
|
||||
"sense": self.solver.get_constraint_sense(cid),
|
||||
"RHS": self.solver.get_constraint_rhs(cid),
|
||||
"LHS": self.solver.get_constraint_lhs(cid),
|
||||
"Sense": self.solver.get_constraint_sense(cid),
|
||||
}
|
||||
return {
|
||||
"constraints": constraints,
|
||||
"Constraints": constraints,
|
||||
"Variables": self.solver.get_empty_solution(),
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ LearningSolveStats = TypedDict(
|
||||
ConstraintFeatures = TypedDict(
|
||||
"ConstraintFeatures",
|
||||
{
|
||||
"rhs": float,
|
||||
"lhs": Dict[str, float],
|
||||
"sense": str,
|
||||
"RHS": float,
|
||||
"LHS": Dict[str, float],
|
||||
"Sense": str,
|
||||
},
|
||||
total=False,
|
||||
)
|
||||
@@ -86,7 +86,8 @@ ConstraintFeatures = TypedDict(
|
||||
ModelFeatures = TypedDict(
|
||||
"ModelFeatures",
|
||||
{
|
||||
"constraints": Dict[str, ConstraintFeatures],
|
||||
"Variables": Solution,
|
||||
"Constraints": Dict[str, ConstraintFeatures],
|
||||
},
|
||||
total=False,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user