Stream Tape Policy
Computes the sub-stream advance applied before each point of an EvaluationRequest is run, so that consecutive requests draw fresh, non-overlapping random numbers — exactly the way a reused model's streams advance continuously in SimulationProvider.
The policy holds a persistent tape position (a sub-stream index) that survives across requests:
Independent streams (
crnOption == false): each point consumes its replications and the tape advances cumulatively, so point i runs on sub-streams [position, position + numReplications).Common random numbers (
crnOption == true): every point of the request starts at the current tape position (the same block, for paired comparison) and the tape then advances by the request's maximum replication count.
Each planned run is positioned absolutely (reset-to-start + advance), so the advances returned here do not depend on which model executes a point or in what order. This lets one policy drive both the sequential SimulationProvider and the concurrent ParallelSimulationProvider (including a pool of reused models) and have them produce identical streams.
Not thread-safe: advancesFor mutates the tape position. It is intended to be called once per request on the single solver thread, before the request fans out to workers.
Properties
Functions
Returns the pre-run sub-stream advance for each point of inputs, in request order, and moves the tape forward. See the class documentation for the independent vs. CRN semantics.