Add mip_ prefix to dynamic constraints

This commit is contained in:
2021-08-04 13:38:23 -05:00
parent ca925119b3
commit 067f0f847c
7 changed files with 14 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ class UserCutsComponent(Component):
self.dynamic = DynamicConstraintsComponent(
classifier=classifier,
threshold=threshold,
attr="user_cuts_enforced",
attr="mip_user_cuts_enforced",
)
self.enforced: Set[str] = set()
self.n_added_in_callback = 0
@@ -87,7 +87,7 @@ class UserCutsComponent(Component):
stats: LearningSolveStats,
sample: Sample,
) -> None:
sample.put_set("user_cuts_enforced", set(self.enforced))
sample.put_set("mip_user_cuts_enforced", set(self.enforced))
stats["UserCuts: Added in callback"] = self.n_added_in_callback
if self.n_added_in_callback > 0:
logger.info(f"{self.n_added_in_callback} user cuts added in callback")