@@ -328,7 +328,7 @@ void ContainerBasePrivate::liftSolution(const SolutionBasePtr& solution, const I
328328
329329ContainerBase::ContainerBase (ContainerBasePrivate* impl) : Stage(impl) {
330330 auto & p = properties ();
331- p.declare <bool >(" pruning" , std::string (" enable pruning?" )).configureInitFrom (Stage::PARENT, " pruning" );
331+ p.declare <bool >(" pruning" , false , std::string (" enable pruning?" )).configureInitFrom (Stage::PARENT, " pruning" );
332332}
333333
334334size_t ContainerBase::numChildren () const {
@@ -535,24 +535,24 @@ void SerialContainer::onNewSolution(const SolutionBase& current) {
535535 SolutionCollector<Interface::BACKWARD> incoming (num_before, current);
536536 SolutionCollector<Interface::FORWARD> outgoing (num_after, current);
537537
538- // collect (and sort) all solutions spanning from start to end of this container
539- ordered<SolutionSequencePtr> sorted;
538+ // collect (and lift) all solutions spanning from start to end of this container
540539 for (auto & in : incoming.solutions ) {
541540 for (auto & out : outgoing.solutions ) {
542541 InterfaceState::Priority prio = in.second + InterfaceState::Priority (1u , current.cost ()) + out.second ;
543542 assert (prio.enabled ());
544543 // found a complete solution path connecting start to end?
545544 if (prio.depth () == children.size ()) {
546- SolutionSequence::container_type solution ;
547- solution .reserve (children.size ());
545+ SolutionSequence::container_type seq ;
546+ seq .reserve (children.size ());
548547 // insert incoming solutions in reverse order
549- solution .insert (solution .end (), in.first .rbegin (), in.first .rend ());
548+ seq .insert (seq .end (), in.first .rbegin (), in.first .rend ());
550549 // insert current solution
551- solution .push_back (¤t);
550+ seq .push_back (¤t);
552551 // insert outgoing solutions in normal order
553- solution.insert (solution.end (), out.first .begin (), out.first .end ());
554- // store solution in sorted list
555- sorted.insert (std::make_shared<SolutionSequence>(std::move (solution), prio.cost (), this ));
552+ seq.insert (seq.end (), out.first .begin (), out.first .end ());
553+ // create SolutionSequence and lift it to external interface
554+ auto solution = std::make_shared<SolutionSequence>(std::move (seq), prio.cost (), this );
555+ impl->liftSolution (solution, solution->internalStart (), solution->internalEnd ());
556556 }
557557 if (prio.depth () > 1 ) {
558558 // update state priorities along the whole partial solution path
@@ -562,10 +562,6 @@ void SerialContainer::onNewSolution(const SolutionBase& current) {
562562 }
563563 }
564564 // printChildrenInterfaces(*this->pimpl(), true, *current.creator());
565-
566- // finally, store + announce new solutions to external interface
567- for (const auto & solution : sorted)
568- impl->liftSolution (solution, solution->internalStart (), solution->internalEnd ());
569565}
570566
571567SerialContainer::SerialContainer (SerialContainerPrivate* impl) : ContainerBase(impl) {}
@@ -1035,6 +1031,11 @@ bool FallbacksPrivatePropagator::nextJob() {
10351031 }
10361032
10371033 // When arriving here, we have a valid job_ and a current_ child to feed it. Let's do that.
1034+ if (dir_ == Interface::FORWARD)
1035+ setStatus<Interface::BACKWARD>(nullptr , nullptr , &*job_, InterfaceState::Status::ENABLED);
1036+ else
1037+ setStatus<Interface::FORWARD>(nullptr , nullptr , &*job_, InterfaceState::Status::ENABLED);
1038+
10381039 copyState (dir_, job_, (*current_)->pimpl ()->pullInterface (dir_), Interface::UpdateFlags ());
10391040 return true ;
10401041}
0 commit comments