Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/solvers/gecode/common/definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ enum UnisonConstraintExprId
TEMPORARY_OVERLAP_EXPR, // ex-PRESOLVER_OVERLAPPING_TEMPORARIES
CALLER_SAVED_EXPR, // ex-PRESOLVER_CALLER_SAVED_TEMPORARY
ALLOCATED_EXPR, // ex-PRESOLVER_OPERAND_CLASS
ALIGNED_EXPR
ALIGNED_EXPR,
TIED_DEF_EXPR
};


Expand Down
1 change: 1 addition & 0 deletions src/solvers/gecode/common/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ bool in_block(UnisonConstraintExpr & e, block b, const Parameters * input) {
case SHARE_EXPR:
case OPERAND_OVERLAP_EXPR:
case ALLOCATED_EXPR:
case TIED_DEF_EXPR:
return (input->pb[e.data[0]] == b);
case TEMPORARY_OVERLAP_EXPR:
case CALLER_SAVED_EXPR:
Expand Down
2 changes: 2 additions & 0 deletions src/solvers/gecode/models/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ BoolVar Model::adhoc_constraint_var(UnisonConstraintExpr & e) {
return v;
case ALIGNED_EXPR:
return var(ry(e.data[1]) == (ry(e.data[0]) + e.data[2]));
case TIED_DEF_EXPR:
return var((ry(e.data[0]) == ry(e.data[1])) && (pls(e.data[0]) == ple(e.data[1])));
default:
GECODE_NEVER;
}
Expand Down
1 change: 1 addition & 0 deletions src/solvers/gecode/models/parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,7 @@ void Parameters::get_element(Json::Value root, UnisonConstraintExpr & e) {
case OPERAND_OVERLAP_EXPR:
case TEMPORARY_OVERLAP_EXPR:
case ALLOCATED_EXPR:
case TIED_DEF_EXPR:
for (unsigned int i = 0; i < 2; i++) {
iti++;
e.data.push_back((*iti).asInt());
Expand Down
2 changes: 2 additions & 0 deletions src/solvers/gecode/models/relaxedmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ BoolVar RelaxedModel::relaxed_adhoc_constraint_var(UnisonConstraintExpr & e) {
return v;
case ALIGNED_EXPR:
return var(ry(e.data[1]) == (ry(e.data[0]) + e.data[2]));
case TIED_DEF_EXPR:
return var((ry(e.data[0]) == ry(e.data[1])) && (pls(e.data[0]) == ple(e.data[1])));
default:
GECODE_NEVER;
}
Expand Down