Repository navigation
feat(shadows): compute joint groups of cascading elements together - #273
Closed
blackopsrepl wants to merge 1 commit into
Closed
blackopsrepl wants to merge 1 commit into
blackopsrepl wants to merge 1 commit into
Conversation
A cascading_peers hook joins elements, transitively, into joint groups that propagation computes as one node: after the previous element and every dependency of every member are final, each member once. Two technicians that start a visit together each wait on the other's arrival, which a pair of dependencies would make a cycle. Models without peers run an instance with the group lookups compiled away. Closes #272
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #272.
What
#[shadow_variable_updates(cascading_peers = "method")]: a solution method returning the elements computed together with an element. Peers are joined transitively into a joint group, andCascadePropagationtreats the group as one node:This is how two technicians start a job together: each visit's start is the later of both arrivals, which a pair of dependencies would make a cycle.
Cost for models without peers
propagatedispatches once per call on whether any group exists. The no-peers instance is const-generic with the group lookups compiled away, so it is the 0.30.1 loop.cascade_tests(propagation stops where values are unchanged) are unchanged.Tests
solverforge-corecascade_group_tests: pairs, a triple, dependencies, unassigned members, a group on one route (cycle), early stop on an unchanged group, and 3 × 500 random moves checked against an independent least fixed point of the compute (not againstrefresh_all). With groups disabled, 5 of the 7 tests fail.solverforgejoint_cascading_shadows: aplanning_model!crew through the score director (move plus undo vs fresh shadows and score), and afull_assertsolve with two pairs and a triple. With groups disabled, the solve fails with score drift.docs/modeling.mdis compiled throughreadme_examples/crew.Gates
make lint: fmt, clippy, doc names, file length, facade reachability, public API (blessed:PlanningSolution::cascading_peers), deps.cargo test --workspace --no-fail-fast: 1,616 passed, 0 failed.