Skip to content

Commit

Permalink
Restore propagation from objective #184
Browse files Browse the repository at this point in the history
Restoring objective value is ensured by CopyLink which copies without conflict resolution
  • Loading branch information
glebbelov committed Jul 24, 2023
1 parent 83b6f9d commit d1e6522
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions include/mp/flat/problem_flattener.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ class ProblemFlattener :
GetValuePresolver().GetTargetNodes().GetObjValues()().Add() });
/// After the CopyLink, add One2ManyLink for converted expressions.
/// When postsolving, CopyLink is executed last and copies obj values.
/// !!!! Temporarily removing AutoLinking for objectives
// pre::AutoLinkScope<FlatConverterType> auto_link_scope{
// GetFlatCvt(), obj_src
// };
/// This should resolve the issue of the "max-out"
/// value conflict resolution.
/// Tested by suf_common/funcpieces_01_01_obj.mod.
pre::AutoLinkScope<FlatConverterType> auto_link_scope{
GetFlatCvt(), obj_src
};
auto le = ToLinTerms(obj.linear_expr());
NumericExpr e = obj.nonlinear_expr();
EExpr eexpr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"options": { "ANYSOLVER_options": "debug=1" },
"comment": "test suffix should be 58, but obj auto-link is currently off",
"values": {
"Initial.test_funcpieces_presolved": 38
"Initial.test_funcpieces_presolved": 58
}
}
]

0 comments on commit d1e6522

Please sign in to comment.