On a two-way road (one lane per direction), can a script move a held-back passer past its blocker by rebuilding the road segment under it? The human observed that removing a segment moves the vehicles that are on it. Settle what that move actually does:
Where does a vehicle on a removed or rebuilt segment end up: ahead, behind, at the segment start, re-pathed, or sent to a depot?
Does it keep its line, its passengers or cargo, and its speed?
Can a script do the same, without the player: api.cmd.makeWorldBuildProposalCmd with a SimpleProposal.streetProposal that removes the segment and re-adds an identical one?
Does the blocker get moved the same way? If so, can the two be told apart?
What does a rebuild cost (money, visible flicker, side effects on towns or traffic)?
HITL: the human removes or rebuilds segments in game while the probe logs positions. Outcome: go/no-go for "rebuild to move the passer" as the single-lane overtaking mechanism.
Part of #1
## Question
On a two-way road (one lane per direction), can a script move a held-back passer past its blocker by rebuilding the road segment under it? The human observed that removing a segment moves the vehicles that are on it. Settle what that move actually does:
1. Where does a vehicle on a removed or rebuilt segment end up: ahead, behind, at the segment start, re-pathed, or sent to a depot?
2. Does it keep its line, its passengers or cargo, and its speed?
3. Can a script do the same, without the player: `api.cmd.makeWorldBuildProposalCmd` with a `SimpleProposal.streetProposal` that removes the segment and re-adds an identical one?
4. Does the blocker get moved the same way? If so, can the two be told apart?
5. What does a rebuild cost (money, visible flicker, side effects on towns or traffic)?
HITL: the human removes or rebuilds segments in game while the probe logs positions. Outcome: go/no-go for "rebuild to move the passer" as the single-lane overtaking mechanism.
No-go: rebuilding the segment under a held-back passer does not get it past the blocker.
Hand-built proposals (copied BaseEdge/BaseEdgeStreet into a SimpleProposal) were silently rejected: the segments kept their ids.
api.engine.util.proposal.replaceSegment(seg) plus makeWorldBuildProposalCmd(p, nil, true, true) (the official campaign's call) does rebuild the segment, even from engine state.
Two-way road (country_new_small), 3 rebuilds: no effect. The gap stayed at 25.8 m, both vehicles stayed in lane 2, same speed and order for 10+ snapshots. The human confirmed this in game.
Multilane road (country_new_medium), 3 rebuilds: afterwards the leader moved from lane 4 to lane 3 each time, and in 1 of 3 cases the follower got past. Not proof (the engine also switches lanes by itself at segment ends). Passed to the multilane ticket as an observation.
Side findings: engine-thread scripts can't use sendCommand callbacks, and can't send api.cmd.debug.makeComponentExchangeCmd at all ("Error decoding argument #3"). GUI-thread scripts can (as the downloaded mods do). makeVehicleSetLineCmd doesn't force a lane change. The only built-in teleport is makeVehicleSendToDepotCmd(…, jumpToDepotEntity).
Details: docs/research/vehicle-probe.md on branch prototype/vehicle-probe (the rebuild code is last in commit 5d3a254 and removed in bfe5a22).
## Resolution
**No-go: rebuilding the segment under a held-back passer does not get it past the blocker.**
- Hand-built proposals (copied `BaseEdge`/`BaseEdgeStreet` into a `SimpleProposal`) were silently rejected: the segments kept their ids.
- `api.engine.util.proposal.replaceSegment(seg)` plus `makeWorldBuildProposalCmd(p, nil, true, true)` (the official campaign's call) **does** rebuild the segment, even from engine state.
- **Two-way road (`country_new_small`), 3 rebuilds:** no effect. The gap stayed at 25.8 m, both vehicles stayed in lane 2, same speed and order for 10+ snapshots. The human confirmed this in game.
- **Multilane road (`country_new_medium`), 3 rebuilds:** afterwards the leader moved from lane 4 to lane 3 each time, and in 1 of 3 cases the follower got past. Not proof (the engine also switches lanes by itself at segment ends). Passed to the multilane ticket as an observation.
- Side findings: engine-thread scripts can't use `sendCommand` callbacks, and can't send `api.cmd.debug.makeComponentExchangeCmd` at all ("Error decoding argument #3"). GUI-thread scripts can (as the downloaded mods do). `makeVehicleSetLineCmd` doesn't force a lane change. The only built-in teleport is `makeVehicleSendToDepotCmd(…, jumpToDepotEntity)`.
Details: `docs/research/vehicle-probe.md` on branch `prototype/vehicle-probe` (the rebuild code is last in commit 5d3a254 and removed in bfe5a22).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #1
Question
On a two-way road (one lane per direction), can a script move a held-back passer past its blocker by rebuilding the road segment under it? The human observed that removing a segment moves the vehicles that are on it. Settle what that move actually does:
api.cmd.makeWorldBuildProposalCmdwith aSimpleProposal.streetProposalthat removes the segment and re-adds an identical one?HITL: the human removes or rebuilds segments in game while the probe logs positions. Outcome: go/no-go for "rebuild to move the passer" as the single-lane overtaking mechanism.
Resolution
No-go: rebuilding the segment under a held-back passer does not get it past the blocker.
BaseEdge/BaseEdgeStreetinto aSimpleProposal) were silently rejected: the segments kept their ids.api.engine.util.proposal.replaceSegment(seg)plusmakeWorldBuildProposalCmd(p, nil, true, true)(the official campaign's call) does rebuild the segment, even from engine state.country_new_small), 3 rebuilds: no effect. The gap stayed at 25.8 m, both vehicles stayed in lane 2, same speed and order for 10+ snapshots. The human confirmed this in game.country_new_medium), 3 rebuilds: afterwards the leader moved from lane 4 to lane 3 each time, and in 1 of 3 cases the follower got past. Not proof (the engine also switches lanes by itself at segment ends). Passed to the multilane ticket as an observation.sendCommandcallbacks, and can't sendapi.cmd.debug.makeComponentExchangeCmdat all ("Error decoding argument #3"). GUI-thread scripts can (as the downloaded mods do).makeVehicleSetLineCmddoesn't force a lane change. The only built-in teleport ismakeVehicleSendToDepotCmd(…, jumpToDepotEntity).Details:
docs/research/vehicle-probe.mdon branchprototype/vehicle-probe(the rebuild code is last in commit5d3a254and removed inbfe5a22).