If two Connect stages are sequenced, both sides can become ARMED.
However, that means that the wave of PRUNED status updates, shouldn't
overwrite a present ARMED state.
Added unit test.
Let's consider the following simple situation, where generators produce solutions in the given order.
GEN 1 3
Fallbacks |X
GEN 2 4
When passing state 4 to the Fallbacks' connector, it forms pending pairs with both 1 and 3.
Thus, the container needs to check whether 1-4 or 3-4 was processed when receiving a success or failure,
to correctly forward the failed one to the next child.
- Enable moving/swapping of other container impls (e.g. Fallbacks)
- Clarify (via move semantics) that content of source impl will be lost
- Get rid of friend declarations
Adapt test results FallbacksFixturePropagate.computeFirstSuccessfulStagePerSolutionOnly
due to 2e63c154aa:
The order of computations has changed, because we lock the processed state
as soon as it is forwarded to the first fallback child.
In this case, after processing GEN1 und FWD1 once, we have the two states with costs 2, 4 in the queue.
The first one, i.e. with cost 2 is forwarded to the child FWD2, which fails.
In the next cycle, although we have new states in the queue (1, 2, 3, 4), we stick with state "2"
and forward it two FWD3, which adds costs 210, resulting in 212.
With previous code, the Fallback container switched to state "1", forwarded to FWD2.
Not only propagate updates along solution paths, but also bridge
the gap of a `Connecting` stage.
- If a state becomes enabled, re-enable opposite `ARMED` states as well.
- If a state becomes pruned, also prune opposite states if they don't have alternatives.
- Make sure that we don't run into a recursive update loop by disabling notify() callbacks.
Keep the previous logic around for Generator stages.
Note that this only makes sense for *pure* Generators and not for MonitoringGenerator,
because for the latter we would expect monitored solutions to be passed individually
(similar to pruning).
never unload the plugin loader before the plugins (IK plugins here).
We don't have unrelated loaders in gtest executables, so the static should be fine.
yes, most pruning happen along children of a serial container,
but children for many tests comprise a lot of other containers as well.
- migrated pruning tests from Connect to ConnectMockup (as the concrete implementation
is not relevant for them)
- added missing header to stage_mockups.h
The current implementation will not fall back for each state
independently, but is meant to stay with the first child producing
a solution. For propagators, this is problematic though
as the picked child depends on the (arbitrary) first received state.
Instead, fallbacks should pass each state to each child separately
until one produces a solution for it (or all are exhausted).