Class TransformSolve
FJFixedPoint.
Where the fork-join fixed point drives ONE transformation (MMT/HT), this
drives whichever one options.config.transform names: the strategy
rewrites the model into subproblems, each subproblem is solved by a REAL
solver, and the strategy maps the metrics back onto the original classes and
stations.
expand -> [ for e in subproblems: solve(e); couple(e) ] -> converged -> lift
SINGLE PASS BY DEFAULT: unless the expand phase declares itself iterated the loop runs one sweep and lifts, so the common case never pays for a convergence test it does not need.
THE INNER SOLVER IS THE OUTER SOLVER. The caller supplies TransformSolve.InnerSolve,
which constructs an instance of its own class, so a transformation written
once serves every solver rather than the one it was first written for.
SolverCTMC.runChainAggregationAnalyzer used to hard-wire
new SolverCTMC(...), which is what kept a transform with nothing
CTMC-specific in it out of reach of MVA, NC and FLD.
COUPLING IS GAUSS-SEIDEL BY CONSTRUCTION: the couple step runs immediately after each subproblem's solve, inside the sweep, so subproblem e+1 sees the updated state of 1..e.
Mirrors MATLAB @NetworkSolver/transformSolve.m and python
line_solver/solvers/transform_driver.py.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWhat a strategy's expand phase produces: the subproblems, plus whatever state its lift needs.static final classOne inner solve's answer, on all FOUR channels.static interfaceThe inner solve, which the caller implements with its own solver class.static final classThe lifted metrics, in ORIGINAL class and station coordinates.static final classWhat the driver answers with.static interfaceA transformation, as a pair of phases. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisRequested(SolverOptions options) Whether a transformation was asked for at all.static Stringrequested(SolverOptions options) The canonical method name asked for, orTransformMethod.NONE.static TransformSolve.Resultrun(Network model, NetworkStruct sn, SolverOptions options, TransformSolve.InnerSolve innerSolve) Runs the transformation named byoptions.config.transform.
-
Method Details
-
requested
The canonical method name asked for, orTransformMethod.NONE. -
isRequested
Whether a transformation was asked for at all.Every solver that hosts a transformation calls this at the top of its
runAnalyzer, the counterpart of the branch MATLAB puts in its sharedrunAnalyzerPreamble. -
run
public static TransformSolve.Result run(Network model, NetworkStruct sn, SolverOptions options, TransformSolve.InnerSolve innerSolve) Runs the transformation named byoptions.config.transform.- Parameters:
model- the original modelsn- its structoptions- the caller's options; the transform method name is read hereinnerSolve- how a subproblem is solved, normally with the caller's own solver class- Returns:
- the metrics in original coordinates
-