Check status of brancher, return true if alternatives left.
| 168 | public: |
| 169 | /// Check status of brancher, return true if alternatives left. |
| 170 | virtual bool status(const Space& _home) const { |
| 171 | if (done) return false; |
| 172 | const FlatZincSpace& home = static_cast<const FlatZincSpace&>(_home); |
| 173 | for (int i=0; i<home.iv_aux.size(); i++) |
| 174 | if (!home.iv_aux[i].assigned()) return true; |
| 175 | for (int i=0; i<home.bv_aux.size(); i++) |
| 176 | if (!home.bv_aux[i].assigned()) return true; |
| 177 | #ifdef GECODE_HAS_SET_VARS |
| 178 | for (int i=0; i<home.sv_aux.size(); i++) |
| 179 | if (!home.sv_aux[i].assigned()) return true; |
| 180 | #endif |
| 181 | #ifdef GECODE_HAS_FLOAT_VARS |
| 182 | for (int i=0; i<home.fv_aux.size(); i++) |
| 183 | if (!home.fv_aux[i].assigned()) return true; |
| 184 | #endif |
| 185 | // No non-assigned variables left |
| 186 | return false; |
| 187 | } |
| 188 | /// Return choice |
| 189 | virtual Choice* choice(Space& home) { |
| 190 | done = true; |