Refinement reference
refine applies lifts where a certificate is tight, following a refinement strategy. See Refining the graph.
The interface
PathCompleteCertificates.AbstractRefinementStrategy — Type
AbstractRefinementStrategyThe supertype of the strategies refine can follow: the rule that says where to lift the graph from its certificate. A new strategy subtypes it and implements next_graph.
PathCompleteCertificates.initial_graph — Method
initial_graph(strategy, system)The graph refine(template, problem) starts from: common_graph of system unless strategy says otherwise.
PathCompleteCertificates.next_graph — Function
next_graph(strategy, certificate; atol, solve)The next graph after certificate, as (lifted, next) with lifted a Lifted, or nothing if there is none. next is the certificate on lifted if the strategy already solved it, nothing otherwise.
Edges with slack at most atol are tight, and solve(lifted) solves a candidate.
The strategies
PathCompleteCertificates.TightestNodeSplitting — Type
TightestNodeSplitting(; rng = nothing)The strategy of (Ninite and Jungers, 2026; Alg. 1), with OutSplitLift at a node, which refines their forward lift: split the node with the most tight outgoing edges, among those with at least two, into one copy per outgoing edge. When no node has two tight outgoing edges, there is no next graph.
When several nodes have that many, the one with the fewest outgoing edges is split, since its lift adds the fewest nodes. A tie that remains goes to the lowest index, so a run is deterministic but depends on how the nodes are numbered. With rng, for example rng = MersenneTwister(1), that last tie is drawn at random instead.
From common_graph, the first step gives the dual of de_bruijn(1, n_modes).
PathCompleteCertificates.BestOfTightEdgeLifts — Type
BestOfTightEdgeLifts(lifts = (OutSplitLift(), InSplitLift(),
ForwardProductLift(), BackwardProductLift()))The strategy of (Athanasopoulos and Jungers, 2019; Ex. 2). At each step, every lift of lifts is applied at every tight edge, one edge at a time. By default these are its partial P*-, P-, T- and T*-lifts (Defs. 7, 6, 4 and 5). Each candidate graph is solved, and the one with the lowest rate is kept.
The loop
PathCompleteCertificates.DEPTH_REACHED — Constant
DEPTH_REACHEDThe run visited depth_max graphs, its limit.
PathCompleteCertificates.EXHAUSTED — Constant
EXHAUSTEDThe strategy had no next graph before the gap closed.
PathCompleteCertificates.OPTIMAL — Constant
OPTIMALThe optimality_gap closed. For stability, the last rate is the joint spectral radius.
PathCompleteCertificates.STALLED — Constant
STALLEDstall_max steps in a row did not lower the objective by a fraction rtol.
PathCompleteCertificates.STOPPED — Constant
STOPPEDThe stop predicate held on the last certificate.
PathCompleteCertificates.RefinementStatus — Type
RefinementStatusWhy a refine run stopped.
PathCompleteCertificates.RefinementTrace — Type
RefinementTrace(certificates, steps, status)The certificates of a refine run, one per graph visited, the Lifted step that produced each graph after the first, and a RefinementStatus.
PathCompleteCertificates.certificates — Method
certificates(trace)The certificate solved on each graph a refine run visited.
PathCompleteCertificates.graphs — Method
graphs(trace)The graphs visited by a refine run, the starting graph first.
PathCompleteCertificates.rates — Method
rates(trace)The rate certified on each of graphs of a stability run.
PathCompleteCertificates.refine — Method
refine(template, problem; optimizer, kwargs...)
refine(template, graph, problem; optimizer, strategy = TightestNodeSplitting(),
stop = Returns(false), depth_max = 5, stall_max = 1, atol = 1e-4,
gap_tol = 1e-6, rtol = 1e-6, check_path_complete = true, kwargs...)Refine graph, by default initial_graph of strategy on the system of problem, until the optimality_gap of its certificate closes, and return a RefinementTrace. At each step next_graph of strategy gives the next graph, a lift of the current one.
- The run stops when
stop(certificate)holds, the gap is at mostgap_tol,stall_maxsteps in a row fail to improve the objective byrtol,depth_maxgraphs are visited, or no candidate is left. rtolis the bisection tolerance on the rate,atolthe tightness threshold on the slacks, withatol ≥ 10 rtol.check_path_complete = falseskips the path-completeness check of the starting graph.
Other keywords go to certify.
PathCompleteCertificates.status — Method
status(trace::RefinementTrace)Why the run stopped, as a RefinementStatus.
PathCompleteCertificates.steps — Method
steps(trace)The Lifted graph of each step: steps(trace)[k] produced graphs(trace)[k + 1].