mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-07 18:08:51 -06:00
Add mip_ prefix to dynamic constraints
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user