Merge commit 'c6a967f23a254ec85f50a83266826f74c7f77ef5' into develop
This commit is contained in:
commit
a8ef3e1312
@ -1555,7 +1555,7 @@ void Trail::untrail(MiniZinc::Interpreter* interpreter) {
|
|||||||
assert(var->definitions().back() == con);
|
assert(var->definitions().back() == con);
|
||||||
var->_definitions.pop_back();
|
var->_definitions.pop_back();
|
||||||
} else {
|
} else {
|
||||||
assert(false);
|
var->_definitions.push_back(con);
|
||||||
}
|
}
|
||||||
def_trail.pop_back();
|
def_trail.pop_back();
|
||||||
}
|
}
|
||||||
|
@ -346,10 +346,10 @@ void Variable::alias(Interpreter* interpreter, Val v) {
|
|||||||
_subscriptions.clear();
|
_subscriptions.clear();
|
||||||
|
|
||||||
// Set Alias
|
// Set Alias
|
||||||
interpreter->trail.trail_alias(interpreter, this);
|
|
||||||
_aliased = true;
|
_aliased = true;
|
||||||
_domain = v;
|
_domain = v;
|
||||||
v.addRef(interpreter);
|
v.addRef(interpreter);
|
||||||
|
interpreter->trail.trail_alias(interpreter, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Variable::unalias(Interpreter* interpreter, Val dom) {
|
void Variable::unalias(Interpreter* interpreter, Val dom) {
|
||||||
|
@ -817,7 +817,7 @@ void MznSolver::flatten(const std::string& filename, const std::string& modelNam
|
|||||||
}
|
}
|
||||||
flatten_time = tm01.s();
|
flatten_time = tm01.s();
|
||||||
// FIXME: Global registers should not be removed, merely hidden
|
// FIXME: Global registers should not be removed, merely hidden
|
||||||
interpreter->clear_globals();
|
// interpreter->clear_globals();
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
std::cerr << "Status: " << Interpreter::status_to_string[interpreter->status()] << std::endl;
|
std::cerr << "Status: " << Interpreter::status_to_string[interpreter->status()] << std::endl;
|
||||||
if (interpreter->status() == Interpreter::ROGER) {
|
if (interpreter->status() == Interpreter::ROGER) {
|
||||||
|
@ -38,7 +38,9 @@ void p_mk_intvar(SolverInstanceBase& s, const Variable* var, bool isOutput) {
|
|||||||
gi._current_space->iv_defined.push_back(!var->definitions().empty());
|
gi._current_space->iv_defined.push_back(!var->definitions().empty());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
IntVar intVar(*gi._current_space, Gecode::Int::Limits::min, Gecode::Int::Limits::max);
|
IntVar intVar(*gi._current_space,
|
||||||
|
var->lb().isFinite() ? var->lb().toInt() : Gecode::Int::Limits::min,
|
||||||
|
var->ub().isFinite() ? var->ub().toInt() : Gecode::Int::Limits::max);
|
||||||
gi._current_space->iv.push_back(intVar);
|
gi._current_space->iv.push_back(intVar);
|
||||||
gi.insertVar(var, GecodeVariable(GecodeVariable::INT_TYPE, gi._current_space->iv.size() - 1));
|
gi.insertVar(var, GecodeVariable(GecodeVariable::INT_TYPE, gi._current_space->iv.size() - 1));
|
||||||
std::cerr << "% GecodeSolverInstance::processFlatZinc: Warning: Unbounded variable "
|
std::cerr << "% GecodeSolverInstance::processFlatZinc: Warning: Unbounded variable "
|
||||||
|
@ -1152,7 +1152,7 @@ bool GecodeSolverInstance::isBoolArray(const Val& arr, int& singleInt) {
|
|||||||
if (val.isInt() && val >= 0 && val <= 1) {
|
if (val.isInt() && val >= 0 && val <= 1) {
|
||||||
continue;
|
continue;
|
||||||
} else if (val.isVar()) {
|
} else if (val.isVar()) {
|
||||||
if (val.lb().toInt() >= 0 && val.ub().toInt() <= 1) {
|
if (val.lb() >= Val(int(0)) && val.ub() <= Val(int(1))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user