Class TransformSolve

java.lang.Object
jline.solvers.tr.TransformSolve

public final class TransformSolve extends Object
Solver-agnostic driver of a model TRANSFORMATION, the sibling of 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.

  • Method Details

    • requested

      public static String requested(SolverOptions options)
      The canonical method name asked for, or TransformMethod.NONE.
    • isRequested

      public static boolean isRequested(SolverOptions options)
      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 shared runAnalyzerPreamble.

    • run

      public static TransformSolve.Result run(Network model, NetworkStruct sn, SolverOptions options, TransformSolve.InnerSolve innerSolve)
      Runs the transformation named by options.config.transform.
      Parameters:
      model - the original model
      sn - its struct
      options - the caller's options; the transform method name is read here
      innerSolve - how a subproblem is solved, normally with the caller's own solver class
      Returns:
      the metrics in original coordinates