| 1768 | }; |
| 1769 | |
| 1770 | void printIntVar(std::ostream& os, const std::string name, const Int::IntView& x) { |
| 1771 | os << "var "; |
| 1772 | if (x.assigned()) { |
| 1773 | os << "int: " << name << " = " << x.val() << ";"; |
| 1774 | } else if (x.range()) { |
| 1775 | os << x.min() << ".." << x.max() << ": " << name << ";"; |
| 1776 | } else { |
| 1777 | os << "array_union(["; |
| 1778 | Gecode::Int::ViewRanges<Int::IntView> r(x); |
| 1779 | while (true) { |
| 1780 | os << r.min() << ".." << r.max(); |
| 1781 | ++r; |
| 1782 | if (!r()) break; |
| 1783 | os << ','; |
| 1784 | } |
| 1785 | os << "]): " << name << ";"; |
| 1786 | } |
| 1787 | os << "\n"; |
| 1788 | } |
| 1789 | void printBoolVar(std::ostream& os, const std::string name, const BoolVar& b) { |
| 1790 | os << "var bool: " << name; |
| 1791 | if(b.assigned()) |