Jump to text
On this page
Copy and source
Published source confirmed at last check

Source changed 2026-10-14 19:58:00 UTC · snapshot created 2026-10-14 19:58:38 UTC · last check 2026-10-15 00:05:10 UTC

C. Change the model while retaining its use

MMP.9 - Derive a Reduced Mathematical Model of State Evolution

Type: Method pattern Status: Stable Normativity: Normative within the stated use

MMP.9:1 - Problem frame

Use this pattern when a supplied model describes how a state changes, but predicting the quantities you need would be easier with less state, shorter memory or a simpler update. After removing detail, the proposed update still depends on something you removed. You need to derive what can replace that contribution while retaining a useful answer.

Start with the quantity you want to keep and compute its change from the supplied model. Circle the part that cannot be obtained from the proposed smaller state. For an average, this may be the variance of the underlying values. For one observed component, it may be the effect of unobserved components. That expression identifies the construction needed next.

The result can be a smaller evolution law, a history-dependent rule, an approximation with a stated error, or bounds sufficient for the question. Keep the initial information, inputs and time range on which it depends. A model that is already affordable and sufficient can be used directly. If the original change law is missing, recover or construct it in the subject practice before using this reduction method.

You need the mathematics used by the supplied law: substitution and recurrence for discrete changes; differentiation and integration for differential equations; expectations when reducing a probability distribution. A mathematical collaborator may perform those operations from your stated question and model. This is reduction within mathematical modeling. A.3.3.PI supplies the general test of which information a prediction needs; C.29.1 supplies the comparison that transfers the reduced result back to the source question.

MMP.9:2 - Problem

A description can retain today’s quantity while losing what determines tomorrow’s. Differentiating a mean can introduce higher moments. Solving for an unobserved component can make its past influence explicit. Dropping a quickly decaying component can retain a lasting change it caused before decaying.

The missing contribution is often called an unclosed term: the proposed retained state does not determine it. A closure supplies a way to obtain or approximate that contribution from the information the reduced model carries. Its choice changes the resulting evolution.

Finding the unclosed term locates the difficulty. The remaining work is to derive a usable replacement and determine what that replacement permits the model to answer.

MMP.9:3 - Forces

ChoiceConsequence for the construction
Smaller state and longer memoryEliminating coordinates can replace present-state work with a history calculation.
Detailed trajectory and selected resultA bound on one output can be cheaper than a replacement for the whole trajectory.
Additional moments and finite closureDeriving another moment can expose yet another missing moment.
Short-lived component and lasting effectA small or fast component can make a consequential accumulated contribution.
Fit to supplied trajectories and use inside a new evolutionOnce the replacement supplies the next state, its errors can change the states it later receives.
Several adequate replacements and available effortAn existing bound or larger model can cost less than developing a new closure.

MMP.9:4 - Solution

Choose the retained result → derive its change → expose the unclosed contribution → construct a replacement or bound → use it over the required horizon → revise the part that changes the answer.

The work may end at a useful bound. It may also show that the smaller description would cost more than continuing with the source model.

MMP.9:4.1 - Express the retained result and its change

Name the source state z, its initial possibilities and the admitted inputs u. Specify the answer and horizon: a quantity at time T, a threshold crossing, a response to an input, or a distributional feature. Construct the retained description x=r(z) from those needs. A.3.3.PI:4.1-4.2 tests whether merged source states can still answer that question; use an already sufficient result from that test.

For a discrete source update z_next=F(z,u), substitute it into the retained description:

x_next = r(F(z,u)).

For a differentiable r and a differential law z_dot=F(z,u), the chain rule gives:

x_dot = Dr(z) F(z,u).

Dr is the derivative of r. If r also depends explicitly on time, include its time derivative. A discontinuous readout or event needs its own change relation rather than this differentiable formula. A.3.3.TR supplies composition of the relevant changes.

Rewrite the result using x, the admitted inputs and whatever other information the smaller model proposes to carry. The part still depending on discarded quantities is the unclosed contribution. One convenient decomposition is x_dot=f0(x,u)+c(z,u), where f0 is the part you will compute directly and c is the remaining contribution. Another decomposition can be useful; what matters is the complete retained law and what information obtains each term.

If every term is obtainable from the retained information, construct the closed update through A.3.3.PI and compare it through C.29.1. Continue here when the replacement itself still needs construction.

MMP.9:4.2 - Derive the discarded contribution before approximating it

Try to express the discarded variables through their own evolution, initial conditions and the retained history. In a discrete law, iterate the discarded update and substitute each earlier term until the dependence has a usable form. In a differential law, solve or integrate the discarded equation under the supplied retained history, then substitute the result into the retained equation.

For constant compatible matrices and supplied initial values, consider:

x_dot=A*x+B*y, y_dot=C*x+D*y.

Solving the second equation while treating x(s) as its input gives:

y(t)=exp(D*t)*y0 + integral_0^t exp(D*(t-s))*C*x(s) ds.

Substitution gives the retained law:

x_dot(t)=A*x(t)+B*exp(D*t)*y0 + integral_0^t B*exp(D*(t-s))*C*x(s) ds.

The first added term carries the discarded initial condition. The integral carries the past influence of x through y. With a forcing term in the discarded equation, its propagated contribution also appears in the integral. These terms identify what a proposed memory approximation would replace. Unknown y0 remains an initial uncertainty; it cannot be set to zero solely because y is being removed.

Look for a less costly way to compute the derived expression. Equal decay modes can be combined; a sum of exponentials can be updated through a few auxiliary variables. For example, v(t)=integral_0^t exp(-lambda*(t-s))*x(s) ds satisfies v_dot=x-lambda*v, v(0)=0. This replaces storage of the whole history with an evolving value. Carry a nonzero initial contribution separately or incorporate its matching initial condition. Count the required auxiliary values and update work before claiming a computational saving.

For nonlinear discarded dynamics the same elimination question remains, but the response to retained history may require solving a nonlinear problem. Use the derived dependence to select an approximation, retained variable or bound; an implicit formula that still requires the original computation has not yet supplied a cheaper model.

MMP.9:4.3 - Choose and construct a useful replacement

Use the expression just derived to decide which information or calculation earns its cost.

Retain a quantity that obtains the missing contribution. If c depends on a small additional observable v, derive v’s update from the source law and repeat the closure test for the pair (x,v). This operation can reveal a useful finite system or a growing hierarchy. For members obeying Z_dot=-Z^2, the mean m has m_dot=-mean(Z^2). Retaining q=mean(Z^2) gives q_dot=-2*mean(Z^3). The new equation exposes the next assumption needed; adding q alone does not finish the closure.

Compute the effect through memory. Use the history expression from :4.2. To truncate old history, bound its omitted contribution for the admitted histories. To replace the memory kernel by a simpler one, bound or estimate the resulting difference on those histories, then propagate that difference through the retained evolution. A slowly decaying kernel can make distant history consequential. An auxiliary-state representation can be cheaper than truncation when a few modes express that kernel.

Bound the requested output. If the use asks for a threshold or interval, derive bounds directly from the source law and available initial information. For a population, solve or bound the member response as a function of its initial value, then average using known ranges or moments. Monotonicity, convexity or conservation can give a bound without choosing a complete distribution. The nonlinear example in :5.2 constructs such bounds. Use C.29.1:4.5 to turn them into the corresponding decision, or to expose the still-unresolved range.

Approximate a contribution whose accumulated effect is small. Identify the parameter and the class over which smallness is claimed: initial values, inputs, horizon and required error. Derive or bound the contribution integrated over that horizon. A small coefficient can multiply a large hidden value, and a fast transient can shift the later state. If a transient only matters near the start, retain its effect in an adjusted initial value and state when the later approximation begins. :5.3 shows both constructions.

A learned closure is another possible approximation to the missing contribution. Specify what its inputs contain and how its output enters the retained update. Pairs of retained inputs and source contributions can support fitting, but different hidden states can give different contributions at the same retained input. A fitted conditional mean then answers a distribution-dependent question; it is not an all-cases replacement of those contributions. When probability is needed, MMP.7 helps construct the law of the sampled or recorded training cases. Use the resulting closure at its intended inputs and horizon before drawing the corresponding predictive conclusion.

Compare the candidates through the existing characterization and choice methods: the required output or bound, obtaining cost, initial information and conditions. There is no need to develop every alternative. C.11.DUA helps choose whether more derivation, data or computation can change the decision.

MMP.9:4.4 - Evaluate the replacement inside the retained evolution

Write the model that will actually be used, including its initial values, any auxiliary variables, input rule and observation interpretation. Construct the requested output from that model. Substituting the closure into known source trajectories tests a different computation from letting it generate successive retained states.

Compare the retained source result and the reduced result for the same admitted initial case and input. For an identity, use the derivation to establish the covered equality. For an approximation, propagate the discrepancy to the requested output and horizon through C.29.1:4.5. A numerical scheme adds its own approximation; include it when it can change the answer. A.3.3.PI:4.5 supplies the repeated-use and changed-condition questions.

For a probabilistic model, choose the distributional feature the work needs. Agreement of a mean can coexist with different variance, correlations or event probabilities. A further observable is worth checking when it can change the planned use. State which result the comparison supports rather than extending one fitted statistic to the whole model.

When inputs are chosen from observations, retain the information the choice rule uses. If reduction removes that information, formulate the revised choice under MMP.8 before claiming that the same intervention or control method remains available. A changed intervention also requires the corresponding source law or mechanism under C.28.MR.

MMP.9:4.5 - Return the result and revise the construction when needed

Return the reduced law, sufficient bound or located obstacle with the assumptions that affect its use. An existing derivation and calculation can carry this information. Explain which discarded contribution was replaced, how to initialize and run the replacement, and which question it answers.

If a bound settles the working question, use it. If the result is too weak, locate why: uncertain initial influence, unresolved higher moment, long memory, error amplification, or information unavailable to an action. Improve that contribution or retain more of the source model. A mathematical construction can also show that the proposed simplification offers no saving.

Reopen the affected construction when the source law, initial class, inputs, observation, horizon or required output changes. Keep conclusions whose conditions still hold. In a model of a working method, MMP.22 can use the mathematical comparison to construct a different working rule, while C.37 selects a changed representation; the actual work must still provide the quantities and relations assumed in the model.

MMP.9:5 - Archetypal Grounding

MMP.9:5.1 - Replace many response components by two evolving quantities

Suppose a dimensionless model has an observed x and n hidden response components:

x_dot=-x+sum_i y_i+u(t), y_i_dot=c_i*x-2*y_i,

where the nonnegative c_i sum to one. Initial values and a prescribed input u(t) are supplied. The question asks for x over a finite horizon; each y_i separately is irrelevant to that result.

Retaining x alone leaves the unclosed contribution sum_i y_i. Solve each hidden equation and sum:

sum_i y_i(t)=exp(-2*t)*sum_i y_i(0)+integral_0^t exp(-2*(t-s))*x(s) ds.

All hidden contributions have the same decay kernel. Define v=sum_i y_i. Differentiating the sum gives the two-variable model:

x_dot=-x+v+u(t), v_dot=x-2*v, v(0)=sum_i y_i(0).

The derived equations and initial sum preserve x for every supplied input for which these linear equations have their solution. For n>1 this uses two evolving quantities instead of n+1. The required hidden initial information is their sum. Arbitrarily setting v(0)=0 would already change x_dot(0) when the actual sum is nonzero.

The initial sum requires n terms once. Each subsequent evaluation of the reduced right-hand side uses x, v and u(t); it no longer recomputes n component contributions. This saves repeated arithmetic when those components would otherwise be advanced separately.

Now one component has decay rate 3 instead of 2. Summing produces v_dot=x-2*v-y_1; the old two-variable model has lost a contribution. Retain y_1 separately and update it by y_1_dot=c_1*x-3*y_1, or separate the two decay groups. The change determines which added state is needed. The same grouping can combine any components that share their response kernel; different kernels remain distinct until another justified approximation combines them.

MMP.9:5.2 - Answer about a nonlinear population without a closed mean equation

A finite population has nonnegative member values X_i with X_i_dot=-X_i^2. The available initial information is 0<=X_i(0)<=M and mean m0. The requested output is the mean m(t).

Differentiating the mean gives:

m_dot=-mean(X_i^2)=-m^2-Var(X_i).

Replacing this by m_dot=-m^2 sets the variance contribution to zero. Populations with the same mean can have different variance, so first ask whether a bound already answers the question.

Each member has X_i(t)=X_i(0)/(1+t*X_i(0)) for t>=0. Since X_i(0)<=M, averaging gives the lower bound m0/(1+M*t). The response a/(1+t*a) is concave for nonnegative a and t>=0; the mean of the responses is at most the response of the mean. Thus:

m0/(1+M*t) <= m(t) <= m0/(1+m0*t).

With M=2, m0=1 and t=1, the mean lies between 1/3 and 1/2. A requirement m(1)<=0.55 is established without a variance model or a complete initial distribution.

Change the requirement to m(1)<=0.4. A population whose members all start at 1 has m(1)=1/2. An equally divided population starting at 0 and 2 has m(1)=1/3. Both fit the supplied initial information, so it cannot settle the changed requirement. Information about the initial population or a different acceptable requirement would change the next move. Treating the zero-variance closure as the whole population would conceal this distinction.

MMP.9:5.3 - Decide whether a fast transient can be omitted

For a dimensionless model with epsilon>0,

x_dot=y, epsilon*y_dot=-y,

the solutions for t>=0 are y(t)=y0*exp(-t/epsilon) and x(t)=x0+epsilon*y0*(1-exp(-t/epsilon)).

Suppose the admitted initial values satisfy abs(y0)<=Y. Replacing the model by constant x0 gives an error at most epsilon*Y for every t>=0. With epsilon=0.01 and Y=1, that is 0.01. It can meet a tolerance 0.02 while failing to establish tolerance 0.001. The coefficient alone is insufficient if the initial class changes: y0=1/epsilon leaves a later change approaching one.

When y0 is known and the use concerns only later times, a different approximation is constant x0+epsilon*y0. Its error is at most epsilon*Y*exp(-t/epsilon). For tolerance 0<eta<epsilon*Y, it meets that tolerance at all times starting from t_start=epsilon*log(epsilon*Y/eta). With eta=0.001 in the preceding case, t_start is about 0.0231. The adjusted initial value has retained the transient’s later effect; it does not reproduce the initial interval.

If y0 is unknown, the adjusted value is also unknown. Its stated range can still yield a useful interval for x. The choice between an early transient calculation, a later approximation and a bound follows the requested result and available initial information.

MMP.9:6 - Bias-Annotation

Compact equations can conceal transferred effort. Removing variables may require a history integral, extra initial information or an expensive closure. Compare the work needed to obtain the requested result. A familiar equilibrium substitution or learned fit is a candidate construction whose lost contribution must remain visible in that comparison.

MMP.9:7 - Conformance Checklist

  • Can the retained quantity’s change be derived from the supplied law, with its initial and input conditions?
  • Which contribution is unavailable from the proposed retained information, and how does the replacement obtain, approximate or bound it?
  • Does an added variable have its own usable update and initialization? If a hierarchy remains, where is the closing assumption?
  • For a memory or small-parameter approximation, what bounds the omitted effect on the requested output over the stated horizon?
  • Is the comparison made in the model’s intended repeated use, with the relevant numerical and observation conditions?
  • Does the resulting law or bound settle the working question? If not, which changed contribution could do so at worthwhile cost?

MMP.9:8 - Common Anti-Patterns and How to Avoid Them

Observed difficulty in the constructionRepair
Replacing the mean of a nonlinear response by the response at the mean loses heterogeneity.Derive the missing moment term, then retain, model or bound its effect; :5.2 may already settle the output question.
Hidden state is eliminated together with its initial effect.Carry the initial-condition term in the memory formula or initialize the corresponding auxiliary value.
A small coefficient is used as the entire error argument.Bound the multiplied state, accumulated contribution and admitted initial class, as in :5.3.
A closure is judged only on inputs from the source trajectory.Insert it into the retained evolution and compare the requested result at its intended horizon.
Adding a moment is presented as completing a model although its equation needs another moment.Continue the derivation until a usable closure or sufficient bound is obtained; otherwise retain the unresolved contribution.

MMP.9:9 - Consequences

A reduced model can expose which information determines the answer and make repeated calculation cheaper. Bounds can support a decision before a full reduced trajectory is available. Derivation also identifies a reusable limitation: which initial conditions, inputs or new questions require restoring discarded content.

The cost can move into initialization, memory, closure construction or verification at the required horizon. Where that cost exceeds using the source model, the larger account remains a useful option.

MMP.9:10 - Architectural Rationale

Reduction is organized around the requested result and the source law’s unclosed contribution. This makes the choice between retained state, memory, approximation and bounds depend on what each construction obtains. Beginning with one favored approximation would select what to discard before establishing its effect.

A.3.3.PI supplies the question-relative information test. This method develops the subsequent mathematical construction of a replacement contribution. C.29.1 supplies the common exact-or-bounded transfer and error propagation; those rules also apply to constructions outside model reduction.

Linear response, nonlinear aggregation and fast transients require different constructions. A new source law requires deriving its own discarded contribution; it need not resemble one of these examples. When the deriving operation itself requires a further subject method, retain that mathematical dependency rather than presenting a technique’s name as an already obtained closure.

MMP.9:11 - SoTA-Echoing

The practice question is how to replace unresolved dynamics economically while retaining the needed result. Adopt construction from the source law and evaluation within the reduced evolution, including memory, initial information and question-relative outputs. A serious alternative fits an instantaneous missing term on source trajectories and judges primarily that fit. It can be cheaper and adequate for a limited use, but it can miss errors generated when the closure supplies its own future inputs.

Sanderse, Stinis, Maulik and Ahmed, Scientific machine learning for closure models in multiscale problems, version 2 (2024), sections 2.1-2.2, 3.2 and 7.1, is a comparative synthesis of closure constructions. It distinguishes an unclosed term from its replacement, and fitting the term from testing the evolving reduced model. Adapt these distinctions in :4.1-4.4. Its memory discussion supports preserving initial and historical effects during elimination. An exact elimination identity still needs an affordable way of obtaining its result; :4.2 makes that cost question explicit. The linear elimination, population bounds and transient estimates above are elementary derivations developed here, not empirical validation claims.

Freitas, Um, Desbrun, Buzzicotti and Biferale, A posteriori closure of turbulence models: are symmetries preserved? (2026 preprint), sections 3-5, provides a current countercase. A learned shell-model closure reproduces selected statistics while missing other correlations and scale-invariance properties. Adopt its consequence in :4.4: select the observables that the receiving use needs instead of extending fit of one statistic to all requested behavior. Missing memory is a proposed explanation in that case; it does not establish a universal cause or require every reduced model to carry the same memory construction.

The selected method spends effort on the omitted contribution and the use it can change; it need not reproduce every property of the detailed model. A sufficient analytic bound can be cheaper than training or testing another closure. Reopen the comparison when changed inputs, initial conditions, horizon or requested observables expose a consequential error, or when another construction obtains the same needed result at lower cost.

MMP.9:12 - Relations

  • A.3.3.TR and A.3.3.PI: compose source changes, determine the information needed for the future question and update the retained account. MMP.9 constructs a remaining closure or bound after those operations expose the gap.
  • C.29.1 and MATH.2: compare the retained construction with the source and determine which answers survive identification; use their exact or bounded transfer where applicable.
  • MMP.7 and MMP.8: construct observation laws and information-limited choices when a learned or controlled reduced model uses them. Their conditions determine which data law or action rule is actually being compared.
  • C.28.MR and B.5.MPC.R: reconsider the relevant mechanism or connected accounts when an intervention or model change alters the source law.
  • C.11.DUA: decide whether further derivation, observation or comparison is worth its cost for the receiving decision.
  • E.22 and E.23: frame the question for evaluating a candidate, then organize repeated improvement under that evaluation when needed.
  • EXD and C.2.8: EXD develops an explanation for the recipient’s question; C.2.8 compares what structure that recipient can recover from its expression under stated conditions. Prediction and explanation can require different retained results.
  • MMP.22: use the mathematical result to construct a changed working rule; return its practical arrangement to C.32.MWA.PP.

MMP.9:End

MMP.17 - Construct a Surrogate for Selected Model Responses

Type: Method pattern Status: Stable Normativity: Normative within the stated use

MMP.17:1 - Problem frame

Use this when repeated use of a model is too costly or cumbersome, and the next calculation needs only some of its responses. You may need values at many inputs, a probability of exceeding a limit, a field over a region, or a response used inside an inverse problem. Begin with one receiving question: which response must the replacement supply, over which inputs, and what error would change the answer?

A surrogate is a replacement constructed to reproduce selected responses of a source model. It may be an interpolation table, a constrained formula, a reduced representation of outputs, a learned function, or a correction to a cheaper model. The practical gain is a less costly response with a usable account of where substitution holds and where to return to the source.

This is a method of mathematical modeling. It applies to computational, physical, biological and organizational models; a differential equation or a neural network is one possible case. It governs the construction and use of a replacement, while the subject practice supplies the meaning and grounds of the source model. Agreement with that model and agreement with the world remain different questions.

Preparation requires functions, interpolation and an error comparison suited to the receiving calculation. The derivative branch uses elementary differentiation; the output-basis branch uses orthogonal projection and singular value decomposition. The stochastic branch requires expectation, variance and the meaning of interval coverage. For a learned replacement, CMP.7 supplies the learning rule and its further-use conditions, with CMP.6 supplying iterative computation when needed. A specialist can construct a harder approximation, but must return an evaluable replacement and the conditions under which its response can be substituted.

For a few inexpensive queries, evaluate the source or reuse already computed answers. If a prescribed numerical approximation already supplies the response and sufficient error control, CMP.8 may finish the work. Surrogate construction becomes useful when selecting the responses, cases and retained structure changes what can be obtained at affordable cost.

MMP.17:2 - Problem

A replacement can fit its construction cases and fail at the inputs or operations that matter next. Average accuracy can conceal a wrong threshold crossing, a lost dependence between outputs, or a derivative with the wrong sign. A source model can also be wrong in a way that its accurate surrogate faithfully reproduces.

The modeling problem is to construct a useful substitution without silently enlarging its promise: choose what to reproduce, obtain informative cases, build the replacement, and act on consequential discrepancies or lost structure.

MMP.17:3 - Forces

ForceTension
Selected responseReproducing less can save work, while a later question may need something discarded.
Construction costMore source evaluations can improve the replacement, but may consume the saving it was meant to provide.
Known structureConservation, bounds and symmetries restrict useful candidates; a convenient restriction can also exclude the needed response.
Local and broad useConcentrating cases near a decision can improve that answer while leaving other inputs poorly represented.
Several error sourcesSource computation, surrogate approximation and uncertain source premises can each limit use and require different repairs.
Continued useReuse makes construction worthwhile, but changed inputs or questions can invalidate the substitution.

MMP.17:4 - Solution

Construct the replacement around the response that another calculation or person will use. Carry the source conditions into that substitution, and refine only where the remaining difference matters.

MMP.17:4.1 - Select the response and the input region

Let (M) be the source model and let (Q) extract the required response. Write the target as

[ r(x)=Q(M(x)),\qquad x\in D, ]

where (x) contains the inputs and (D) is the intended region of use. The input may be a number, a vector, a history, a function or a discrete configuration. State enough of its meaning to distinguish materially different conditions. If the same listed input gives different deterministic responses because a regime or previous state was omitted, restore that input before fitting a function.

Choose (Q) from the receiving operation. A mean, a tail probability and an entire probability law are different targets. So are a field value, its spatial derivative and a quantity integrated over that field. For a random source output (Y_x), a mean surrogate targets (\mathbb E[Y_x]); reproducing individual draws or their distribution requires another construction.

Determine how response error affects the receiving result. For a comparison with a limit, the distance to the limit matters. For a ranking, the gap between alternatives matters. If the receiver will differentiate, iterate or invert the response, include the corresponding sensitivity or structural requirement. A low average value error does not select these requirements for the practitioner.

MMP.17:4.2 - Obtain construction cases that can distinguish useful replacements

Reuse source results whose inputs, output meanings and computation are compatible with the target. Choose further cases to expose consequential variation: the region the receiver will visit, boundaries or changes of regime, and places where plausible replacements disagree about the receiving answer.

For a scalar interval, an initial set of endpoints and interior points may suffice. For many inputs, a full grid can be unaffordable; use known structure to reduce the varying inputs, or distribute a finite set across the relevant region before concentrating additional cases. A design concentrated near one operating point supports a local construction unless another argument supports wider use.

Each case supplies an input and the selected source response. If the source response is itself approximate, carry its error into the construction. For a stochastic source, use MMP.7 to identify how the runs were obtained: repetitions, dependence, shared random inputs and selection can change what their averages or fitted probabilities estimate. MMP.13 supplies the uncertainty result needed from those runs.

Choose case placement and assessment together. Cases used to fit, select or repeatedly tune the replacement are construction cases. If the further-use claim depends on held-out performance, retain assessment cases suited to that use and do not count their later reuse for tuning as untouched assessment. For trajectories, repeated runs or grouped inputs, the unit that must be held out follows the claim; randomly separating nearby points does not by itself test a new trajectory or regime.

A query to the source model adds information about that model’s response. An observation of the world may also challenge the model. Keep those contributions separate. Use existing bounds or observations when they already answer the question; another experiment is not an entry condition for constructing a surrogate.

MMP.17:4.3 - Construct an evaluable replacement with the needed structure

Start with a representation that can express the required response at the available construction cost. Use MMP.11 to preserve justified relations and to expose what remains adjustable.

For ordered scalar cases ((x_i,r_i)), one complete construction is piecewise linear interpolation:

[ \widehat r(x) =\frac{x_{i+1}-x}{x_{i+1}-x_i}r_i +\frac{x-x_i}{x_{i+1}-x_i}r_{i+1}, \qquad x_i\leq x\leq x_{i+1}. ]

The rule supplies a response between distinct neighboring inputs. It needs no iterative training. Its adequacy between the cases still depends on the response’s variation and the receiving tolerance.

For a field or a large output vector, one can instead construct

[ \widehat y(x)=y_0+\sum_{j=1}^{k} a_j(x)\phi_j. ]

Here (y_0) and the retained output shapes (\phi_j) come from known structure or computed cases. For example, take (y_0) as the mean case vector, stack the centered case vectors as columns, retain selected left singular vectors of that matrix, and project each centered case onto those orthonormal vectors. Then interpolate or learn the coefficient functions (a_j(x)) from the inputs and the computed coefficients. A small reconstruction error over sampled fields can still discard a localized feature that controls the receiver’s maximum or threshold. If only (Q(y)) is needed, compare approximating that response directly with reconstructing the full field.

When a cheap model (L) already follows much of the response, construct a correction from paired cases:

[ d_i=r(x_i)-L(x_i),\qquad \widehat r(x)=L(x)+\widehat d(x). ]

Pair the same inputs and corresponding outputs. This construction still evaluates (L) at each new input. It is useful when the discrepancy is easier to approximate than the whole response; if the cheap model misses the consequential regime, adding many cheap cases may help little.

For a learned function, supply CMP.7 with the target, construction cases, function family and loss that reflects the required response. Obtain its effective fitting procedure through CMP.6 or another suitable computation. Writing an objective without a way to obtain and evaluate its candidate leaves the replacement unfinished. Optimization progress, fit on construction cases and accuracy at further inputs are separate results.

Preserve a justified relation by construction when possible. If two delivered quantities must sum to an input (d), construct one and define the other as (d-\widehat q_1), while also enforcing any required nonnegativity or capacity limits. A small penalty for violating a relation permits violations; it does not implement the relation as an identity.

MMP.17:4.4 - Locate errors and losses that change the receiving use

Compare the replacement with the source in the quantities the receiver consumes. A deterministic bound, an empirical error on selected cases and a statistical interval support different conclusions.

When bounds are available in the same response metric, propagate them. For example, if interpolation of accurate case values differs from (r) by at most (e_{\mathrm{int}}), and each supplied case value has error at most (e_{\mathrm{case}}), convex linear interpolation has error at most (e_{\mathrm{int}}+e_{\mathrm{case}}). Other fitting rules need their own propagation: a poorly conditioned fit can amplify errors in its cases. CMP.8 supplies that numerical approximation and conditioning work.

For a scalar test (r(x)\leq b), a justified bound (e(x)) gives an immediate rule:

  • if (\widehat r(x)+e(x)\leq b), the bound supports the test;
  • if (\widehat r(x)-e(x)>b), the bound rules it out;
  • otherwise the replacement leaves this test unresolved.

An observed maximum error at finitely many cases is not automatically a bound over (D). A statistical coverage result retains its sampling and calibration conditions and its pointwise, marginal or simultaneous meaning. A fitted uncertainty indicator can guide the next query without supplying such a result.

Test lost operations as well as values. On ([0,1]), (r(x)=x) and (\widehat r(x)=x+0.01\sin(1000x)) differ in value by at most (0.01). Yet (r’(x)=1), while (\widehat r’(\pi/1000)=-9). If a receiver follows the derivative, this substitution can reverse the proposed direction. Include derivative information or a justified monotone family when that operation matters, or keep the source calculation for it.

A discrepancy with the source calls for examination of case coverage, representation or fitting. A discrepancy with observations can instead require MMP.14 to revise the source or its observation model. Agreement with the source cannot close that second question.

MMP.17:4.5 - Refine, combine or return where the difference matters

Choose the next change from the unresolved receiving result. With piecewise interpolation and a bound on curvature, subdivide intervals whose error bound can change that result. With an empirical construction, inspect informative new source cases, a different family or a local correction. Adding cases everywhere can cost more than repairing the affected region.

For adaptive case selection, make a finite candidate set in the allowed region, compare its points by the expected relevance of their unresolved responses and an error or disagreement indicator, and query the chosen source cases. Retain coverage of plausible unexplored regimes; a confident but misspecified replacement can otherwise prevent its own correction. Refit after adding the cases and assess the changed replacement under the conditions needed for the claim. The indicator is a reason to investigate a point, not evidence that the source response there has already been obtained.

A useful combination may keep the source near a threshold or regime boundary and use the surrogate elsewhere. It may keep a cheap model with a learned correction, or different replacements for different response questions. Make the selection condition usable by the caller. When a query is outside the supported region or the needed error control is unavailable, call the source if it can answer, restrict the claim, or return the unresolved response.

Compare total effort: case generation, fitting, checking, each later evaluation, and repairs after relevant changes. A source call can finish a single difficult query more cheaply than improving a reusable approximation. Stop when the receiving question has sufficient support at acceptable cost. Use the existing FPF choice and improvement methods when several worthwhile replacements or refinements remain; this construction does not require one universal best surrogate.

MMP.17:4.6 - Carry the substitution into continued use

Make the evaluation rule, input meanings and region, selected responses, and consequential limits available with the replacement. The receiver must be able to obtain its response and recognize when the fallback applies. A function with its conditions in the surrounding model may suffice.

When the surrogate enters an inverse problem or an uncertainty calculation, propagate its approximation in the observation metric and into the requested conclusion. A small forward-response error can matter greatly along a poorly resolved direction. MMP.12 supplies the ambiguity and regularization analysis; MMP.13 supplies the qualified inference and uncertainty. Treating the replacement as an exact likelihood or forward relation can give a tighter answer than its construction supports.

Reopen the construction when the input region, source assumptions or receiving operation changes. A new question about an intervention may need causal identification or a mechanism supplied by the subject practice, even if the old predictions remain accurate. A new request for explanation needs the relevant relations, not only the same output number. Use C.2.8 to distinguish the structure a reader can recover and EXD to construct an explanation from a supplied subject account. A compact surrogate may expose useful structure, but compactness and predictive fit do not establish that contribution.

MMP.17:5 - Archetypal Grounding

MMP.17:5.1 - Refine an interpolation only until it settles the comparison

A repeated calculation needs the response (r(x)) of a costly reference model for (0\leq x\leq1). The present question is whether (r(0.4)\leq0.3). Available analysis of the reference model gives (|r’’(x)|\leq2). Its accurate case values are (r(0)=0) and (r(1)=1).

The first surrogate is the line (\widehat r(x)=x). For linear interpolation on an interval of width (h), the curvature bound gives an error at most (2h^2/8). With (h=1), the response at (0.4) is therefore enclosed by (0.4\pm0.25). This interval crosses (0.3); the replacement has not answered the question.

Query the reference model at (x=0.5), obtaining (r(0.5)=0.25), and use the two half-intervals. In the first half, (\widehat r(x)=0.5x), so (\widehat r(0.4)=0.2). The bound is now (2(0.5)^2/8=0.0625), giving

[ r(0.4)\in[0.1375,,0.2625]. ]

The upper endpoint is below (0.3). One added case and a specified interpolation rule settle the comparison under the curvature premise. The three values alone would not justify the bound.

Now the receiving limit changes to (0.18). The same enclosure crosses that limit. For this one query, the practitioner returns to the reference model at (0.4), which gives (0.16), and can answer the stricter comparison. If many similar queries are expected, further subdivision may instead be worthwhile. There is no need to improve the surrogate over the entire interval to finish the single question.

These calculations establish agreement with the reference model under its stated smoothness and case-accuracy conditions. Whether that model’s response represents the subject phenomenon remains a separate modeling question.

MMP.17:5.2 - Correct a cheap allocation model, then change its regime

A network model returns delivered quantities (q_1(d)) and (q_2(d)) through two channels for demand (2\leq d\leq4). In the normal regime all demand is served, so (q_1+q_2=d). A cheap approximation splits it equally: (L(d)=(d/2,d/2)).

The source supplies (q(2)=(1.2,0.8)) and (q(4)=(3,1)). The first-channel discrepancies from (L) are (0.2) and (1). Linear interpolation of that discrepancy gives

[ \widehat d_1(d)=0.4d-0.6,\qquad \widehat q_1(d)=0.9d-0.6,\qquad \widehat q_2(d)=d-\widehat q_1(d). ]

At demand (3), the replacement returns ((2.1,0.9)). It preserves total delivery and nonnegativity throughout the declared interval. Those properties follow from the construction; agreement between the cases has not yet been established.

The receiving question is whether the first delivery stays at or below (2.25) at demand (3). The provisional value (2.1) is only (0.15) below the limit, and there is no supported error bound for this interpolation. A source query at (3) returns ((2.4,0.6)), ruling out the proposed limit. Add its discrepancy (0.9) and interpolate separately over ([2,3]) and ([3,4]). The new surrogate matches all three cases and preserves the balance. Further-input accuracy remains an empirical question or requires a separate bound.

Now channel 2 becomes unavailable. The normal-regime fit does not describe this input. Suppose the changed source account states that channel 1 serves all demand up to (3) units and any excess remains unserved. The needed output now includes unserved demand (u):

[ q_1=\min(d,3),\qquad q_2=0,\qquad u=d-q_1. ]

At demand (4), the result is ((3,0,1)). The balance has become (q_1+q_2+u=d). This branch follows from the newly supplied operating rule, not from extrapolating the normal-regime cases. Its formula is already cheap enough to use; training another replacement adds no benefit here. The caller can retain the normal-regime surrogate for its supported questions and use this formula for the stated unavailable-channel regime.

MMP.17:5.3 - Reuse stochastic cases when the requested response changes

A stochastic loss model returns either (0) or (5). Its source structure states that the probability (p(x)) of loss (5) is affine for (0\leq x\leq1); the two endpoint probabilities are unknown. All 2,000 runs in the construction are independent: 1,000 runs give 100 losses of (5) at (x=0), and another 1,000 give 300 at (x=1).

Fit the endpoint proportions and interpolate:

[ \widehat p(x)=0.1+0.2x,\qquad \widehat\mu(x)=5\widehat p(x)=0.5+x. ]

The affine premise comes from the source structure, not from the two observed proportions. The mean surrogate is evaluable without rerunning the stochastic source.

At (x=0.5), the estimated mean is (1). A simple uncertainty calculation illustrates what must accompany that value. Each endpoint proportion has variance at most (1/(4{,}000)). Independence gives variance at most (1/(8{,}000)) for their average, an unbiased estimator of (p(0.5)) under the affine premise. Chebyshev’s inequality therefore gives coverage of at least 95% for a half-width of (0.05) around that average. The resulting probability interval is ([0.15,0.25]), and the corresponding mean interval is ([0.75,1.25]). For a receiver using this 95% confidence procedure, the upper endpoint supports the mean-at-most-(1.4) comparison; it is not a deterministic bound. MMP.13 permits sharper uncertainty calculations when the receiving use needs them.

The receiver now asks whether (\Pr(Y_{0.5}>4)\leq0.18). The mean alone cannot answer: a constant loss of (1) has the same mean but a different tail. Here the retained two-point support supplies the relation (\Pr(Y_x>4)=p(x)=\mu(x)/5). Reuse the same cases and the probability surrogate; no new fit is needed. The interval ([0.15,0.25]) crosses (0.18), so this uncertainty result leaves the new comparison unresolved.

The interval concerns the fixed input (0.5) under independent runs, the stated support and the affine probability law. It is not a simultaneous guarantee for all inputs, and it does not cover error in those source premises. A sharper inference, a useful bound, more runs or a qualified unresolved answer are different possible continuations; choose among them for the receiving question.

MMP.17:6 - Bias-Annotation

Convenient source cases can overrepresent smooth central behavior and miss a boundary, rare response or minority regime. Begin with the receiving consequence, then check whether the construction and assessment actually expose it.

A family with a smooth uncertainty indicator can understate error where all its members share the same missing structure. Source comparisons outside the currently attractive region can reveal that failure. The indicator’s numerical precision does not strengthen its grounds.

Construction cost can be hidden by reporting only evaluation speed. Compare the reuse expected in this work, including source queries and repair, before attributing a practical saving.

MMP.17:7 - Conformance Checklist

Use these questions when relying on or passing on the replacement. The answers can remain in the model and its explanation.

CheckRequired content
TargetThe source, selected responses, receiving operation and input region are recoverable.
CasesTheir obtaining conditions and any source-computation or sampling uncertainty fit the construction.
ConstructionThe representation and obtaining rule produce an evaluable replacement; justified coupled constraints are retained.
Consequential errorThe error comparison addresses the receiving result and states whether its grounds are a bound, empirical comparison or statistical result.
Lost structureA required derivative, dependence, regime or explanatory relation has not been inferred from value fit alone.
Continued useThe caller can identify unresolved queries and use the supported refinement, restriction or source return.
EffortConstruction and continued-use costs justify the substitution for the intended work.

MMP.17:8 - Common Anti-Patterns and How to Avoid Them

Invited mistakeRepair
Declare success from small average error while a limit crossing is wrong.Compare the response and error in the receiving operation, including the affected input region.
Treat an optimization objective as the constructed surrogate.Supply the fitting procedure and the evaluator; inspect computational failure separately from inadequate cases or family.
Add cheap cases whose model misses the needed regime.Examine the cheap-to-source discrepancy and compare correction with source-only construction at the same total effort.
Differentiate or invert a value surrogate without carrying its approximation.Include the required operation in construction and error analysis, or keep the source for that operation.
Use the same cases repeatedly for tuning and claim untouched assessment.Treat them as construction information and qualify the remaining further-use result.
Read a fitted interval as a guarantee against missing source structure.Retain its conditions and return to source-model criticism or the subject account when those conditions change.

MMP.17:9 - Consequences

Selected responses can become cheap enough for repeated comparison, simulation or inference. Known constraints can remain usable even when most of the source calculation is replaced, and a local source return can resolve the few queries that remain difficult.

The saving comes with a narrower promise and construction cost. Different responses may need different replacements. A changed question can reuse the cases while changing the response construction, as in the tail-probability example, or require a changed source account, as in the unavailable-channel example.

MMP.17:10 - Architectural Rationale

The response and the receiver’s operation are chosen before the representation because they determine which differences matter. Reconstructing an entire model can waste effort; reproducing only a convenient summary can remove what the next operation needs. Selecting (Q) and (D) makes that trade-off actionable.

MMP.11 constructs families from known relations. MMP.17 adds the substitution question: which source responses to retain, which cases make their replacement informative, and where to refine or return when the replacement changes a receiving answer. CMP.7 and CMP.6 supply learning and computation when those are the chosen construction, while CMP.8 supplies numerical approximation control. The interpolation branch shows why a surrogate need not require a learner.

The source remains distinguishable from its replacement because a source call can repair approximation without repairing the model’s account of the world. MMP.14 governs the latter discrepancy. Likewise, fast predictive use can coexist with a separate explanatory model; neither role earns the other’s conclusions by sharing outputs.

MMP.17:11 - SoTA-Echoing

The practice question is how to obtain a reusable response at lower total effort without losing what the receiver must do with it. The selected answer is a response-specific construction with informative cases, retained structure, and refinement or source return where the receiving consequence remains unresolved. It does not select one model family for every input dimension, data budget and error claim.

Adaptive construction versus a fixed case budget. Winovich et al., Active operator learning with predictive uncertainty quantification for partial differential equations, v4 (2026), §§2 and 5 compares uncertainty-guided construction with alternatives that differ in accuracy and training cost. Adapt this experimental line in :4.2 and :4.5: target informative queries while counting the guidance cost. Fixed distributed cases remain a serious alternative when guidance is unreliable or expensive. The PDE experiments establish neither general superiority nor error bounds at arbitrary inputs. Reopen the choice when consequential errors escape the indicator or the cost balance changes.

Combined models versus a single replacement. Brunel et al., A survey on multi-fidelity surrogates for simulators with functional outputs: unified framework and benchmark (2025), §§3 and 6.6 compares correction, mapping and fusion; its benchmark has no universal winner. Adopt paired correction in :4.3 and adapt the comparison in :4.5: retain the cheap model when its discrepancy is easier to represent than the whole response at comparable total effort. Interpolation or single-source construction can otherwise win. The functional-output results inform this branch, not the method’s domain boundary. Lost features or weak correspondence reopen the choice.

Structural restriction versus expressive universality. Kovachki, Lanthaler and Mhaskar, Data Complexity Estimates for Operator Learning, v2, introduction and main results supplies a theoretical counterweight to choosing an expressive learner first. Their general operator classes can require exponentially many examples, while more restricted approximation classes permit better rates under their assumptions. Reject expressive capacity as sufficient grounds for affordable construction; adapt the consequence in :4.1–:4.3 by reducing the target and using justified structure before expanding the learner. The results concern specified classes and access models, not the sample count for an arbitrary engineering model. Reopen the restriction when it excludes a consequential response.

For the scalar bounded case in :5.1, interpolation already answers the needed comparison with one added case and a supplied curvature bound. An operator learner or statistical uncertainty model would add assumptions and construction work without improving that answer. For coupled outputs or large response families, the retained contemporary branches can instead justify their extra cost. That difference, rather than a universal ranking of algorithms, selects the branch.

MMP.17:12 - Relations

  • MMP.11 supplies families constrained by known relations; MMP.17 consumes them to reproduce selected source responses.
  • MMP.7 and MMP.13 supply the obtaining law and qualified inference for stochastic construction cases. MMP.12 supplies ambiguity, stability and regularization when the replacement enters an inverse problem.
  • MMP.14 finds and repairs predictive discrepancies that can require a changed source model; a surrogate-to-source discrepancy can often be repaired within the present construction.
  • CMP.7, CMP.6 and CMP.8 supply, respectively, a learning rule with further-use conditions, iterative computation where needed, and numerical approximation or error propagation. None selects the receiving model response on behalf of the practitioner.
  • C.2.8 and EXD distinguish recoverable structure and explanatory work from predictive agreement. C.28.MR supplies intervention consequences inside a stated causal model; agreement of surrogate outputs does not identify that model.
  • C.11/C.11.CRC compare worthwhile choices and contributions; C.18 governs retention and Pareto-front claims; G.5 declares a selected set when that is the needed result. E.22/E.23 frame and conduct improvement. MMP.17 supplies the candidate replacements and their response/error/cost consequences, not another portfolio or improvement method.

MMP.17:End

MMP.18 - Couple Models with Compatible Exchanges and Scales

Type: Method pattern Status: Stable Normativity: Normative within the stated use

MMP.18:1 - Problem frame

Use this pattern when the required answer combines models whose shared quantities, representations or scales differ. One model may return an average while another needs a distribution. Two simulations may exchange a flow at different times. Two statistical analyses may reuse the same prior or observations.

Begin at one exchange that affects the answer. Identify what the supplying model returns, what the receiving model uses it to mean, and the relation needed to connect them. A matching variable name or software interface leaves that relation to be constructed.

The result is a joint formulation: component models with their shared quantities, interface relations and the assumptions needed to use their combined answer. It may expose a missing closure, incompatible conditions or a dependency that an available simulator cannot realize. The first useful result can be that obstruction, or a restricted coupled answer sufficient for the work.

This is mathematical coupling across models. A.3.3.TR supplies joint relations and change rules; MMP.10 supplies their constraint formulation. The additional work here constructs exchanges between representations, preserves the quantities the use depends on, and accounts for shared information. Subject methods supply the meaning and applicability of those exchanges.

The reader needs the mathematics used by the components and their connection. Algebra suffices for the first coupling steps; time-dependent, spatial or probabilistic branches require the corresponding integration, mapping or probability knowledge. A collaborator can construct the mathematics from supplied models and a recoverable subject question.

Use an already adequate joint model directly. Merely keeping several alternative models in a portfolio does not require coupling them into one model. Use portfolio and improvement methods when the alternatives serve complementary questions without exchanging modeled quantities or information.

MMP.18:2 - Problem

Locally useful models can give an unusable combination. An exchange may be counted twice or disappear between different time steps. Components may share an unknown while their combined calculation treats its values as independent. An average may conceal a variation needed by a nonlinear response. A sequential software call may insert a delay into relations intended to hold together.

The difficulty is to construct the joint model without silently changing what the components mean or the answer they are meant to support. Compatibility at the interface and adequacy in the subject remain separate questions.

MMP.18:3 - Forces

ForceTension
Reuse and joint meaningExisting components save work but may describe their common quantity differently.
Local accuracy and combined behaviorAccurate component calculations can lose a balance or destabilize feedback through their exchange.
Different scales and required detailA coarse result can omit the variation, timing or dependence another component needs.
Separate uncertainty and common informationIndependent treatment can count shared evidence twice or remove correlation.
One joint solve and separate executionSeparate solvers retain existing tools but introduce exchange approximations and synchronization work.
More coupling and sufficient useRecovering every interaction can cost more than the question warrants.

MMP.18:4 - Solution

Choose the combined answer. Recover the meaning and conditions of each consequential exchange. Construct interface relations that preserve what the receiving use needs, then impose them with the component models. Obtain and interpret a joint result, distinguishing a formulation defect from an approximation in its computation. Reopen only the exchange or component whose changed assumption affects that result.

MMP.18:4.1 - Identify what the models share and what they exchange

Start from the required result and trace which component supplies each quantity it uses. Recover the quantity’s referent, unit and reference point, as well as any time interval, spatial region or probability conditioning that changes its meaning.

Distinguish a shared quantity from a transferred result. If both models describe the same unknown offset, retain one common offset or a justified relation between their coordinates. If one supplies an estimated offset to the other, specify whether the receiving calculation uses its uncertainty or only an approximation by a point value.

Locate overlapping subject effects. If both component laws already include the same interaction, composing them may count it twice. Decide from the subject model which contribution is being retained and which is a second description of it. A.3.3.TR and C.29.BB supply the resulting joint change and balance relations.

Also recover the operating conditions. A component calibrated for one boundary condition may cease to apply when connected to a responsive neighbor. Replacing a supplied input by another model’s output can therefore require a changed component law, even when the variable types match.

MMP.18:4.2 - Construct the interface relation

Express the exchange as a relation between the component descriptions. A deterministic map is appropriate when the supplied result determines the needed input. Use a broader relation or conditional law when several inputs remain possible.

For a conversion, translate the quantity and its reference point. For an aggregate, state the operation over the specified region or interval. For example, an amount over [t0,t1] is the integral of a rate over that interval; a rate at t0 alone determines that amount only under an additional evolution assumption.

Let x range over values expressed by the supplying model and y over those used by the receiving model. A relation H(x,y) states the compatible pairs. A.3.3.TR supplies composition with other relations, and MMP.10 expresses the joint possibilities. MATH.18 helps determine which operations and consequences the interpretation preserves. Equality of numerical values is one possible relation, not the default.

Derive the property the map must preserve. For amounts at locations, a linear map b=W*a preserves their total for every a when every column of W sums to one. For values of an intensive field, a map preserving a constant field instead has every row sum to one. If amounts must remain nonnegative, nonnegative weights are an additional sufficient condition. The needed property chooses the map; a convenient interpolation routine does not choose the property.

The two conditions solve different problems. A common field value should remain that value on another discretization. The total amount distributed among cells should remain the same total. When both requirements matter, construct a map with the appropriate geometry or integration weights rather than substituting one condition for the other.

MMP.18:4.3 - Restore what the receiving scale needs

Apply the receiving operation to the proposed supplied description. If the result still depends on discarded detail, identify that dependency before choosing a closure.

For example, a component supplies only the mean of x over a region, while a neighboring response requires the mean of x^2. The missing contribution is the variance:

mean(x^2) = mean(x)^2 + variance(x).

Two fields with the same mean can therefore yield different received responses. Supplying the squared mean silently sets the variance to zero. Retain the needed statistic, obtain it from the finer model, supply a justified closure or return bounds sufficient for the question. MMP.9 derives reduced evolution and closures; MMP.17 constructs a surrogate when that is the chosen supplier.

A time-scale change can create memory. An interval average need not determine a response at an intermediate instant. A rapidly changing component can also leave an accumulated effect after its local state has relaxed. Recover the information needed by the receiving answer instead of assuming that a small or fast component has no relevant contribution.

Use a coupled approximation only within the conditions supporting it. If feedback drives a surrogate or closure into a different regime, revise that contribution or return to a suitable supplier. Good behavior on isolated component inputs does not establish behavior on inputs generated by the coupled system.

MMP.18:4.4 - Impose the joint conditions before choosing execution order

Combine the component relations and interface conditions for the same modeled situation. Shared boundary values and initial conditions must satisfy that joint formulation. Redundant equations can express a useful invariant; contradictory equations expose incompatible assumptions or a failed identification of the shared quantities.

Feedback can require a joint solve. Suppose the selected same-instant relations are x=1+y and y=x/2. Substitution gives x=2 and y=1. Starting from y=0 and calling the first model once, then the second, returns x=1 and y=0.5; those values fail x=1+y. That call order is only one unfinished computation of the joint relation.

Choose between a common solve and separate interacting computations from the available capabilities and error needed by the answer. For time-dependent components, specify which inputs are held, interpolated or extrapolated between communication times, how events are synchronized, and whether a proposed step can be repeated. These are computation assumptions unless the actual subject has that delay or sampling behavior.

Compare the obtained exchange against the joint conditions and the required result. A residual can reveal a mismatch. Turning a small residual into an error bound needs the relevant conditioning or stability argument; CMP.8 supplies that approximate-computation work. CMP.14 supplies interaction between computations. More iterations cannot repair an incompatible physical or statistical premise.

MMP.18:4.5 - Combine uncertainty without duplicating information

When components are probabilistic, construct a joint law for the common quantities and the component-specific quantities. Marginal distributions alone generally leave dependence unspecified. Obtain the needed dependence from the modeled mechanism, a conditional law or an explicit additional assumption.

For components sharing z, one possible factorization is:

p(z,u1,u2) = p(z) * p(u1 | z) * p(u2 | z).

It assumes conditional independence of u1 and u2 given z. If that assumption is unavailable, construct their joint conditional law or retain the unresolved dependence. A common random quantity is sampled or integrated once as that same quantity; two independent draws would describe a different model.

For two analyses using the same positive prior pi(z) and conditionally independent data D1,D2, their posteriors satisfy q1(z) proportional to pi(z)*L1(z) and q2(z) proportional to pi(z)*L2(z). The combined posterior is proportional to q1(z)*q2(z)/pi(z) on the common prior support. Multiplication without the division counts the prior twice.

If the analyses use overlapping records, first recover which observations and likelihood factors are shared. Dividing out a prior does not remove a duplicated observation. If component priors disagree, selecting a common prior or a pooling rule changes the model and needs a stated basis. MMP.7 supplies the record law and MMP.13 the resulting inference; a computational sampler obtains values from that law.

Point estimates can still be sufficient for a particular receiving use. To replace a distribution by a point, establish that the omitted uncertainty does not alter the required result at its chosen tolerance. Keep a consequential dependence when a nonlinear operation or tail probability needs it.

MMP.18:4.6 - Return the coupled result and localize a failure

Return the combined formulation with the exchanged quantities and assumptions needed to reproduce the required result. The subject recipient must be able to interpret that result, including any approximation or unresolved interface contribution that changes its use.

Check the consequence at the scope actually claimed. An interval balance establishes the amount transferred over that interval, not the time of a threshold crossing within it. A joint posterior accounts for the supplied data under its dependence assumptions; it does not establish that those assumptions describe the subject.

If a result fails, locate whether the problem lies in the quantity identification, map, closure, component law, dependence or computation. Repair that contribution and its affected consumers. For a physical question, B.5.MPC.R coordinates a change crossing the physical, mathematical and computational accounts.

Stop with the sufficient coupled answer or the missing contribution that prevents it. C.11.DUA governs whether obtaining that contribution is preferable to a restricted answer or a different method. More detailed coupling is useful when its difference matters to the work.

MMP.18:5 - Archetypal Grounding

These constructed cases keep the model assumptions visible so that the reader can change the exchange and recompute its consequence.

MMP.18:5.1 - Preserve a transfer across different time resolutions

Two components model stores A and B. Material flows from A to B with the supplied rate q(t)=k*t, where t is time since the interval’s start and k=1 unit per minute squared. The stores have enough material and capacity for the stipulated transfer over T=1 minute. Initially A=10 units and B=0.

The donor computes the interval amount:

Q = integral from 0 to T of k*t dt = k*T^2/2 = 0.5 units.
A(T) = 10 - 0.5 = 9.5 units.

The receiving simulator takes the initial rate q(0)=0 and holds it throughout the minute. It obtains B(T)=0. The combined stores now total 9.5 units, although the model contains no external removal.

The error is in the exchange. Both components must use the same transferred amount over the same interval. Sending Q=0.5 units and applying A(T)=10-Q, B(T)=Q gives a total of 10 units. C.29.BB supplies the balance; this construction makes the exchange between the two component representations satisfy it.

Now change the requested result: when does B first reach 0.125 units? Under the supplied continuous rate, B(t)=k*t^2/2, so it reaches the threshold at t=0.5 minutes. A receiver that inserts the entire amount only at T=1 minute reports a different crossing time despite preserving the final balance.

For that question, send or reconstruct the cumulative transfer Q(t)=k*t^2/2 over the interval, or use a computation with adequate intermediate and event resolution. Exchanging only the interval amount is sufficient for the final stores but insufficient for the crossing. The changed question reopens the temporal representation, not the already correct conservation argument.

A nonlinear receiver can likewise need more than an averaged input. Suppose two equally weighted fine cells supply x values (0,2), and the receiver requires the average of x^2. The mean input is 1, but the required response is (0+4)/2=2. Sending only the mean and squaring it gives 1. Supplying variance 1 restores 1^2+1=2; a justified closure could supply the same missing contribution in a larger model.

MMP.18:5.2 - Join two analyses without counting their prior twice

Two analyses concern the same binary condition z. Both start from P(z=1)=0.2 and P(z=0)=0.8. Each has one positive observation with the supplied law:

P(positive | z=1) = 0.75
P(positive | z=0) = 0.25.

The two observations are distinct and conditionally independent given z. Each separate posterior gives:

P(z=1 | one positive) = (0.2*0.75)/(0.2*0.75 + 0.8*0.25) = 3/7.

Multiplying the two posterior mass functions and normalizing gives 9/(9+16)=9/25=0.36. This has counted the shared prior twice.

Construct the joint model from one prior and the two likelihood factors:

P(z=1 | two positives)
 = (0.2*0.75^2)/(0.2*0.75^2 + 0.8*0.25^2)
 = 9/13, approximately 0.692.

The same result is recoverable from the separate posteriors by dividing their product by the common prior before normalizing. That operation preserves their intended contributions under the supplied conditional independence.

Now discover that the two reports contain the same observation, copied into two analyses. There is only one likelihood factor. The correct result under the original observation model is again 3/7; the 9/13 calculation is no longer supported. If there are two dependent observations instead, their joint conditional law is needed.

The exchange therefore includes the identity and dependence of the contributing information, not just two numbers labeled “probability.” In a method assessment, the same problem appears when two models of performance use overlapping case records.

MMP.18:6 - Bias-Annotation

Coupling is often presented through physical simulations, which can suggest that every interface carries a conserved flow. Statistical components instead require coherent shared distributions and dependence. Both cases need an explicit relation between components; the relation’s governing property comes from the modeled quantity.

The examples use small equations with known solutions. A large coupled formulation may be well defined but expensive to compute, or locally accurate but poor for the receiving use. Preserve that distinction when choosing a simpler interface or component.

MMP.18:7 - Conformance Checklist

The coupled construction supports its stated use when:

  • the requested combined result and the component contributions needed for it are recoverable;
  • shared quantities retain their subject meanings and relevant units, reference points and conditions;
  • each consequential exchange has a relation that connects what is supplied to what is used;
  • aggregation or scale change retains, obtains or bounds the information the receiving operation needs;
  • jointly applicable component and interface conditions hold for the claimed solution;
  • computational exchange approximations are distinguished from actual subject delays or events;
  • shared uncertainty and evidence have the dependence and multiplicity asserted by the joint model;
  • the result retains a consequential limit and a usable return to the contribution that failed.

These conditions recognize the coupled model. Establishing its subject applicability or a numerical error guarantee needs the corresponding subject or computational argument when the use requires it.

MMP.18:8 - Common Anti-Patterns and How to Avoid Them

Anti-patternFailureRepair
Connect equal names as equal quantitiesDifferent intervals, references or populations become silently identifiedConstruct the quantity correspondence before exchanging values
Use an interpolation because the tool offers itA total or constant field may be alteredDerive the preservation condition from the receiving use
Pass an average into an arbitrary nonlinear operationLost variation changes the resultDerive and supply the missing statistic or closure
Treat software call order as the subject lawInserts a delay or leaves same-instant relations unsatisfiedFormulate the joint conditions, then choose their computation
Preserve the final balance and claim the trajectoryIntermediate timing remains unresolvedRetain the temporal information required by the question
Multiply fitted component distributionsCan duplicate a prior or shared recordsRecover and combine the actual likelihood and dependence contributions
Reuse an isolated closure under changed feedbackThe coupled system can leave the closure’s supported regimeRevise its supply conditions or use a suitable richer component

MMP.18:9 - Consequences

A component can be replaced without rebuilding the entire model when its replacement supplies the same required exchange under the same conditions. MATH.18 gives the mathematical comparison; the present method identifies what the neighboring models actually require.

Coupling may reveal that a previously useful component is insufficient or incompatible. The resulting repair can add a shared state, a closure or a joint solve. It can also remove unnecessary detail when the receiving answer depends only on an aggregate already preserved.

For working methods, this helps model the interaction of distinct procedures: a scheduling account may consume a resource or duration distribution supplied elsewhere. The coupling explains that mathematical dependence. MMP.22 reconstructs a changed working rule where the mathematics suggests one; C.32.MWA.PP retains its actual execution and provision conditions.

MMP.18:10 - Architectural Rationale

The general relation-composition method supplies the way to impose conditions together. Model coupling adds the construction needed when those conditions use different representations, scales or overlapping information. It makes the supplier’s result usable by the receiver.

A separate interface relation keeps three possible repairs distinguishable: change a component, change how its contribution is represented, or change the computation of their joint conditions. Without that distinction, solver adjustments can conceal a subject-model error, while a harmless numerical approximation can provoke an unnecessary redesign of the subject account.

Conservation and probabilistic coherence are different preservation questions. Their coexistence here reflects a common modeling task, not an assertion that a probability distribution is a physical flow. The appropriate mathematics remains with its governing pattern or specialist method.

MMP.18:11 - SoTA-Echoing

Interoperable components still need a coupling construction. The Modelica Association’s Functional Mock-up Interface 3.0.2, §§3–4, distinguishes exchanging model equations from co-simulation and leaves the coordinating solver to the importer. This supports :4.4: an interface format does not select the numerical interaction or establish its error. Reusing existing simulators remains valuable when their exchange capabilities support the required result; a joint solve is the alternative when independently advanced components do not. Specification.

Choose a map by what it preserves. The current preCICE documentation, “Mapping configuration,” distinguishes sum-preserving maps, constant-field interpolation and weighted integral preservation. The adopted move in :4.2 is to derive the required map property from the exchanged quantity. The documentation’s mesh algorithms are useful specialized realizations, not universal choices for every representation. A cheap nearest-neighbor map can suffice when its error and preserved quantities fit the use. Source.

A common unknown needs a coherent joint distribution. Goudie and colleagues, Joining and splitting models with Markov melding (2019; arXiv v3), §3, constructs combinations through shared variables and addresses inconsistent marginal priors. This supplies a serious alternative to informal transfer of fitted summaries. The simple common-prior case in :4.5 and :5.2 is adopted here; more general pooling requires its additional assumptions. Read version. Manderson and Goudie, Combining chains of Bayesian models with Markov melding (2023), extends the construction to distinct shared quantities along a chain while retaining their dependence. That extension matters when one shared variable cannot represent all interfaces; an arbitrary network or dependent evidence still requires its own joint construction. Source.

Scale interfaces can need learned or derived closures. Sanderse and colleagues, Scientific machine learning for closure models in multiscale problems: a review (2024), §2, locates the missing contribution when reduction and evolution do not commute. That result supports :4.3’s return to MMP.9 or a suitable surrogate. A learned closure is one candidate alongside derived memory, retained state and sufficient bounds; its isolated fit does not settle its coupled use. Source.

Revisit the coupling when a component, exchange representation, shared data, scale or receiving result changes. A new numerical or learned method is useful when it improves that same coupling under its applicability conditions and available resources.

MMP.18:12 - Relations

MMP.21 consumes a suitable coupled model when comparing operation arrangements; MMP.22 uses it when a transformation changes the way work is performed. A joint model is not by itself a Method-whole or performed-work claim.

  • A.3.3.TR constructs joint change rules and A.3.3.PI tests whether retained information suffices for the needed continuation.
  • C.29.1 transfers a result between mathematical accounts. C.29.BB constructs a balance whose exchange this pattern may need to preserve.
  • MATH.18 compares mathematical accounts and the consequences their interpretations carry.
  • MMP.10 formulates constraints on the combined possibilities; MMP.9 derives reduced evolution and closures.
  • MMP.7 supplies the observation law and MMP.13 the inference under the combined probabilistic assumptions. MMP.14 investigates a failed model prediction.
  • MMP.17 constructs a surrogate for a needed contribution. Its approximation conditions remain relevant inside the coupling.
  • MMP.20 obtains a consistent continuation when the active constraints of the composed physical model change, including a restart derived from its history and impact law.
  • CMP.8 controls numerical approximation, while CMP.14 constructs interactions between computations. These obtain a result from the formulation rather than supplying its subject meaning.
  • PHY.5 selects effective physical descriptions by scales and couplings; PHY.6 supplies physical evolution from balances and response laws.
  • B.5.MPC.R coordinates repairs across physical, mathematical and computational accounts when the receiving question is physical; C.11.DUA compares further coupling work with an adequate restricted answer.
  • MMP.21 compares arrangements using the coupled model; MMP.22 constructs a working-rule candidate from a mathematical transformation. C.32.MWA.PP receives the practical conditions, and B.1.5.CM judges a claimed Method whole.

MMP.18:End

MMP.20 - Obtain a Computable Continuation When Physical Constraints Change

Type: Method pattern Status: Stable Normativity: Normative within the stated use

MMP.20:1 - Problem frame

Use this when component equations describe a physical system in several modes, but changing the active constraints leaves the next computation undefined, inconsistent or dependent on an unexplained reset. A diode starts conducting, a loose rope becomes taut, or two rotating shafts engage. The task is to obtain the next admissible state and the equations that can evolve it.

The mathematical object is a physical model whose active differential and algebraic equations change with the mode. A differential-algebraic equation system (DAE) combines evolution laws with constraints that must hold at the same time. Here the working question is how that model can continue through a change of constraints.

The result is a conditional continuation: a processed system for each used mode, a restart relation tied to the preceding state, and the conditions under which integration may resume. A missing impact law or a contradictory switch can instead be the useful result. A model with an already justified reset and suitable numerical realization can be used directly.

The reader needs the component laws, elementary differential equations, differentiation of constraints and linear algebra. The worked cases below need only small systems. Larger models need symbolic structural analysis and suitable numerical solvers. An engineer may obtain those operations from a specialist or tool, while retaining responsibility for the physical assumptions and requested outputs.

MMP.20:2 - Problem

Joining the component equations can determine motion in each mode while leaving the transition between them undefined. A velocity inherited from free flight can violate the tangency required by a newly taut rope. Finding a point that satisfies the new equations then leaves a further question: is it the state produced by the preceding motion and the specified impact?

A consistent initializer can solve the new constraints while changing quantities that the physical transition must preserve. Conversely, imposing continuity on every stored variable can make an admissible impulse impossible. The missing construction connects the previous trajectory, the active physical laws and the new consistency conditions before numerical evolution resumes.

MMP.20:3 - Forces

ForceConsequence for the construction
Component equations are reusable, but their dependencies change with the mode.Recover constraints and solvable unknowns for the active equation set.
The old trajectory fixes event data; the new mode imposes additional conditions.Separate inherited values from variables the restart may determine.
A short physical interaction can have a finite integrated effect.Preserve impulse balance while taking the event-duration limit.
A numerical state must be both determined and physically admissible.Check the actual equations and mode inequalities as well as their structural matching.
An ideal constraint can admit several impact laws.State the physical choice or return the missing specification.

MMP.20:4 - Solution

Start at one such event. Write the equations active before it, the equations intended to hold afterwards, and the values fixed by the preceding trajectory. Try those values in the new mode’s consistency conditions. A failed condition locates the restart problem.

Use an existing justified restart when it supplies the needed continuation. Otherwise perform the following construction on the affected modes. The small cases in :5 show both a continuous restart and an impulse derived from the event equations.

MMP.20:4.1 - Compose equations and recover the constraints on a start

Write component laws and connection balances together, retaining their units and sign conventions. Distinguish equations common to the modes from equations activated by a mode. A mode is a selected set of equations and inequalities over an interval. The choice of that set does not choose an order in which to calculate its variables.

For an active DAE, F(z,z_dot,t)=0, identify the highest derivative of each variable appearing in each equation. An equation–variable incidence graph can expose a missing determination or an overconstrained subsystem. When a constraint must hold throughout an interval, differentiate it to obtain the additional relations needed to solve for the leading derivatives and algebraic variables. Keep the undifferentiated and lower derivative constraints as conditions on a consistent start.

For example, a mass m>0 on a taut rope of length L has position q=(x,y) and velocity v. With downward gravitational acceleration g, its equations are

q_ddot + lambda*q + (0,g) = 0,
q·q = L^2.

Here lambda is a force coefficient: the tension magnitude is m*L*lambda on the circle. Differentiating the circle constraint within the taut mode gives q·v=0, then v·v+q·q_ddot=0. Substitution yields lambda=(v·v-g*y)/L^2. The position and tangency conditions constrain initialization; the last equation determines the coefficient used in the acceleration. Require L>0 and lambda≥0 for a rope that can pull but cannot push.

Differentiation applies on the smooth segment. Differentiating a position constraint across an impact while silently assuming continuous velocity would remove the very jump that needs explanation.

For larger DAEs, the Sigma or Pantelides methods organize this index reduction. They use equation–variable incidence and derivative orders to select differentiations and solution blocks. Obtain the transformed equations, consistency conditions and reconstruction of requested outputs from the implementation. An equation count or a perfect matching alone cannot establish solvability at the actual parameter values: the equations a+b=1 and 2a+2b=2 have a perfect structural matching but a singular numerical Jacobian.

A cold initializer chooses values satisfying the initial specification and these constraints. A hot restart additionally has to respect the preceding trajectory and the physical effects concentrated at the event. Replacing a physical initial value is a model change; replacing a numerical starting guess is part of solving the same model.

MMP.20:4.2 - Preserve the preceding state while constructing the event

Locate the first enabled event with its specified direction of crossing. At that instant, retain a copy of the preceding values. Recover any equality implied by the event, such as q·q=L^2 when the rope first reaches full extension. A time command to tighten a rope does not imply that equality.

Determine which stored quantities can remain continuous from the governing laws. With finite current a capacitor voltage is continuous; an impulsive current can change it. With finite force a velocity is continuous; a force impulse can change it. Thus continuity is a consequence to justify for the transition, not a universal property of every variable labelled a state.

If the inherited values satisfy the new consistency conditions, solve for the new algebraic variables and derivatives and check the new mode’s inequalities. This can produce a continuous restart even when some algebraic readouts jump. If inherited values conflict with a newly imposed constraint, preserve the common physical balances and construct the effect needed at the event. A numerical projection onto the new constraint set is suitable only when that projection follows from the specified physical transition.

MMP.20:4.3 - Construct and rescale a mode-change array when an impulse is needed

The method in Benveniste et al., v1, §§2–7 uses a small formal interval epsilon to relate derivatives to successive values, for example v_dot=(v_next-v)/epsilon. Combine finitely many shifted copies of the new mode’s equations and their necessary differentiated constraints. Add these Euler identities. This finite system is a mode-change array; it is used to derive an event relation, not to select the eventual integration step size.

Values already determined by the previous mode are data. Event equalities involving only those data can be removed from the unknown solve when their validity follows from the guard and previous smooth trajectory. Record that reason: an inconvenient equation with a small residual is not automatically such a fact.

The array must retain the dynamics common to the two modes and all the new mode’s equations at its final instant, including the consistency conditions and the equations for leading derivatives. Some new constraints that conflict with the inherited state may be postponed at earlier instants of the array. This is the constrained construction in the source, not permission to delete whichever equation prevents a solve. Match the dependent variables to equations while retaining all equations required to be active. A structurally underdetermined part identifies values still lacking a determining relation.

Find the orders of the potentially impulsive quantities. If z grows as epsilon^(-mu), replace it by z_bar=epsilon^mu*z and scale its equations accordingly. The source solves conditions that preserve a matched term of maximal order in each equation; for the linear occurrences of impulsive quantities these reduce to difference constraints on the offsets. Its general procedure also chooses bounded array heights and diagnoses underdetermined portions.

A usable result needs finite offsets, finite restart variables, and enough array values to express the scaled quantities without introducing an unavailable later value. A nonlinear function of an impulsive variable can defeat this construction. Failure of that test is a limitation of the proposed restart construction; further physical specification or another mathematical treatment may be needed.

After scaling, set epsilon to zero. Solve the remaining restart equations using the preceding values as inputs. Check existence, local uniqueness and conditioning at the actual data, the new consistency constraints, conserved quantities and the physical inequalities. Reconstruct the new mode’s algebraic values and leading derivatives. Resolve further immediate events before advancing time. If a mode requires a negative rope tension or a negative conducting diode current, it is not the admissible continuation.

For automatic processing of a larger array, the cited paper supplies the construction in §5, the rescaling problem and goodness conditions in §6, and the bounded-height and offset results in §7. The derivation below makes the limit construction explicit for one small model. It assumes a genuine outward crossing and a specified following interval. Grazing contact, simultaneous impacts and an accumulating sequence of events require further event semantics and analysis.

MMP.20:4.4 - Choose and use a sufficient realization

For the small cases, hand reduction plus event location and the derived restart is sufficient. For a larger composition, obtain a tool that supports the selected mode equations, structural changes, event localization and the chosen restart semantics. Exercise the consequential transition on the actual configuration; a successful single-mode solve does not answer that question.

Modelica’s reinit operator, as described in its development specification, applies a supplied state reset at an event. ModelingToolkit’s event API provides event effects and DAE reinitialization options. These are ways to execute and reconcile a specified update; the cited API descriptions do not establish that they derive the impulse law above from every multimode DAE. When computing a reset in a callback, preserve the pre-event values before updating any component, then solve the new algebraic conditions.

If an instantaneous idealization is unsuitable, model a finite contact duration, compliant rope or nonideal diode. That changes the physical or mathematical model and can introduce stiffness. Compare the answer needed at the receiving time scale as the added parameters vary. Reducing a solver’s step alone does not supply the omitted contact law.

Use the checks that bear on the requested continuation: equation and constraint residuals, signs that admit the mode, conserved or dissipated quantities, event location, and numerical sensitivity. Structural regularity and actual numerical solvability answer different questions. A convergence check supports the computed case and horizon; it does not validate the physical idealization.

MMP.20:5 - Archetypal Grounding

The circuit first shows a change of algebraic readouts with continuous stored energy. The rope then shows why a changed velocity needs a derived impulse and a stated impact law. The executable realization in :5.4 supplies the event and the following short trajectory for both cases.

MMP.20:5.1 - A mode change that needs no storage-state jump: RLDC2

Use the RLDC2 balance and component equations below. For each k=1,2, i_k is the diode current, u_k its signed voltage, v_k the capacitor voltage, and j_k the current through the resistor–inductor branch. The diode convention is i_k≥0, u_k≤0, i_k*u_k=0. Set V=u1+v1=u2+v2, R=(10,15) ohm, L=(1,1.5) H and C=(0.1,0.15) F. The common equations include

i1+i2+j1+j2 = 0,
Lk*j_k_dot = V-Rk*j_k,
ik = Ck*v_k_dot.

A conducting diode imposes u_k=0; a blocking diode imposes i_k=0. The modes require different reductions. When both conduct, v1=v2 and differentiation gives v1_dot=v2_dot. When both block, j1+j2=0 and differentiation supplies the relation used to find V. With only one conducting, only its capacitor voltage is tied to V. Preserve the reduced state’s reconstruction of the eliminated voltage or current.

Begin with v1=0.5 V, v2=0.7 V, j1=-0.2 A and j2=-0.3 A, with only the first diode conducting. Then V=v1, i1=-(j1+j2)>0 and u2=v1-v2<0. Because R1/L1=R2/L2=10 s^-1, V satisfies

V_ddot + 10*V_dot + (50/3)*V = 0,
V(0)=0.5, V_dot(0)=5.

The two characteristic roots r,s solve r^2+10*r+50/3=0. Write V=A*exp(r*t)+B*exp(s*t), with A=(5-0.5*s)/(r-s) and B=0.5-A. This derivative stays positive through t=0.1 s, so the bracket [0,0.1] contains the first crossing of V=0.7. To recover the individual currents, set J=-C1*V_dot and D=L1*j1-L2*j2. The component equations give D_dot=-10*D, hence D=0.25*exp(-10*t), j1=(D+L2*J)/(L1+L2), and j2=(L1*J-D)/(L1+L2).

The second diode reaches u2=0 while u2 is increasing at t≈0.055317579971 s. At the event, V=v1=v2=0.7 V, j1≈-0.088645906588 A and j2≈-0.154950677682 A. The capacitor voltages and inductor currents are a consistent start for the mode with both diodes conducting. Set

V_dot = -(j1+j2)/(C1+C2),
i1 = C1*V_dot, i2 = C2*V_dot.

This yields i1≈0.097438633708 A and i2≈0.146157950562 A, both admissible. Just before the event the currents were approximately (0.243596584270,0) A. Their finite jump changes neither capacitor voltage nor inductor current. Both modes satisfy the energy balance

E = (L1*j1^2+L2*j2^2+C1*v1^2+C2*v2^2)/2,
E_dot = -R1*j1^2-R2*j2^2.

One millisecond into the new mode gives V≈0.700967203954 V and j1+j2≈-0.240011099724 A; both diodes still conduct. The implementation below uses the closed form on each of these two segments and locates the event by a bracketed root. Its chosen bracket contains the first crossing for these initial data.

When the R/L ratios change, return to the joint equations for V,j1,j2 and choose a numerical solution or a new reduction. The displayed scalar closed form uses the equal ratios. The mode equations and continuity argument remain available. A changed connection that instantaneously ties unequal capacitor voltages can instead require a charge-transfer impulse or a model of the intervening resistance. Use the equations of that new connection to determine it.

MMP.20:5.2 - Construct an impact and continue the motion

Take a unit mass, L=1 m, and g=9.81 m/s^2. During free flight the initial values are q0=(0.4,-0.74905) m and v0=(2,-0.019) m/s. The trajectory

q(t) = (0.4+2*t, -0.74905-0.019*t-g*t^2/2),
v(t) = (2, -0.019-g*t)

first reaches the circle at t=0.1 s, with q_minus=(0.6,-0.8) and v_minus=(2,-1). The radial component is outward: q_minus·v_minus=2. The new taut mode requires q_plus·v_plus=0, which continuity of the old velocity would violate.

Specify an inelastic capture into a taut interval. Keep q continuous. To display the event limit, use the inherited limiting position and velocity as the earlier array values and set q_epsilon=q_minus+epsilon*v_minus. Using the source’s past-determined Euler values instead changes these data by O(epsilon) and gives the same limit here. The circle residual at q_epsilon is O(epsilon), owing to the boundary event, and tends to zero. Use the common force equations and the velocity Euler identity, imposing tangency at that next position:

a + lambda*q_minus + (0,g) = 0,
v_epsilon-v_minus = epsilon*a,
q_epsilon·v_epsilon = 0.

These are five scalar equations for a_x,a_y,lambda,v_epsilon_x,v_epsilon_y. This reduced subsystem follows the construction in the source’s Figures 2–3: the earlier tangency condition and its acceleration-level consequence are postponed, while the final-instant constraints remain active. The new mode’s equations for leading derivatives at the final instant can be solved once this velocity is known; the calculation below reconstructs them through lambda_plus.

Acceleration and lambda can be O(1/epsilon), while both velocities remain finite. Set a_bar=epsilon*a and alpha=epsilon*lambda, multiply the force equations by epsilon, and take the limit q_epsilon→q_minus, v_epsilon→v_plus:

v_plus-v_minus + alpha*q_minus = 0,
q_minus·v_plus = 0,
q_plus = q_minus.

The Jacobian of the first three scalar equations with respect to v_plus_x,v_plus_y,alpha has determinant -(x_minus^2+y_minus^2)=-L^2. For L>0 this system has the unique solution

alpha = (q_minus·v_minus)/L^2,
v_plus = v_minus - alpha*q_minus.

Here alpha=2 s^-1 and v_plus=(0.8,0.6) m/s. The impulse is radial; the scalar angular momentum per unit mass x*v_y-y*v_x is 1 m^2/s both before and after. Kinetic energy falls from 2.5 J to 0.5 J. In general, the loss for this inelastic capture is m*(q_minus·v_minus)^2/(2*L^2). These results follow from the displayed equations.

Now compute the taut-mode coefficient using the new velocity: lambda_plus=8.848 s^-2. It is positive, so a taut interval is locally admissible. Parameterize q=L*(sin(theta),-cos(theta)); then theta_dot=omega and omega_dot=-(g/L)*sin(theta). The restart gives theta=atan2(0.6,0.8), omega=1 s^-1. Integrating those equations for another 0.1 s gives theta≈0.712977020833 and omega≈0.380685005685 s^-1. Tension stays positive over that computed segment.

This example has passed through a free trajectory, an event, a derived impulse and a computable new segment. Continue monitoring the tension. A later loss of tension changes the active equations again.

MMP.20:5.3 - Change the impact law or event and return to the affected construction

The rope constraint and common force direction do not select an impact law. Add a coefficient of restitution e with 0≤e≤1 and radial relation q_minus·v_plus=-e*(q_minus·v_minus). The same impulse balance now gives

v_plus = v_minus - (1+e)*(q_minus·v_minus)*q_minus/L^2.

For e=0.5 the initial event above yields v_plus=(0.2,1.4), radial component -1, and kinetic energy 1 J. The ball moves inward and the next interval is free flight. Imposing the taut interval’s tangency condition together with this restitution relation would contradict the nonzero incoming radial velocity. Preserve the free-flight equations and replace the event law and selected next mode.

Without a restitution or capture law, radial impulse balance leaves alpha free. For this case, inward or tangent departure and no energy gain still allow every alpha in [2,4]. The values alpha=2 and alpha=4 give different valid departures under different impact assumptions. Report the missing law instead of choosing an arbitrary nearby consistent state.

Changing the guard can require a different model as well. If a time command imposes the length L=1 when q_minus=(0.5,0), the event no longer supplies q_minus·q_minus=L^2. Position continuity and the new circle constraint cannot both hold. Obtain a law for reeling, finite compliance or another specified physical action. Reusing the boundary-impact reset would silently change the situation.

MMP.20:5.4 - Run the two small models

Save the following code as mode_changes.py and run python mode_changes.py with Python 3. It uses the standard library. The default circuit event is near 0.055317579971 s; its voltage 1 ms later is near 0.700967203954 V. The rope event is at 0.1 s, with inelastic restart velocity (0.8,0.6) m/s. A further 0.1 s of taut motion gives theta near 0.712977020833 rad and omega near 0.380685005685 s^-1.

The code uses the reductions derived above. Its root brackets and horizons belong to these initial data. To change the event or parameters, establish a bracket for the first enabled crossing and follow the relevant return in :5.1 or :5.3. The final calls demonstrate rejection of a missing impact law and an event away from the rope boundary. Residuals, conserved quantities and the step-halving comparison help distinguish an implementation error from a change in the modeled physics.

"""Small-model realization: RLDC2 event and a specified rope impact (SI units)."""
from math import atan2, cos, exp, sin, sqrt


def first_root(f, lo, hi):
    assert f(lo) < 0 < f(hi)
    for _ in range(60):
        mid = (lo + hi) / 2
        if f(mid) < 0:
            lo = mid
        else:
            hi = mid
    return (lo + hi) / 2


def voltage(v0, dv0, capacitance, t):
    # Applies here because R1/L1 = R2/L2 = 10 and L = (1, 1.5).
    d = sqrt(100 - 4 * (1 + 1 / 1.5) / capacitance)
    r, s = (-10 + d) / 2, (-10 - d) / 2
    a = (dv0 - s * v0) / (r - s)
    b = v0 - a
    return a * exp(r * t) + b * exp(s * t), r * a * exp(r * t) + s * b * exp(s * t)


te = first_root(lambda t: voltage(.5, 5, .1, t)[0] - .7, 0, .1)
V, dV = voltage(.5, 5, .1, te)
J = -.1 * dV
D = .25 * exp(-10 * te)
j1, j2 = (D + 1.5 * J) / 2.5, (J - D) / 2.5
assert J < 0 and abs(V - .7) < 1e-14
di = [(V - 10 * j1), (V - 15 * j2) / 1.5]
for cap_rates in ([dV, 0], [-J / .25, -J / .25]):
    i1, i2 = .1 * cap_rates[0], .15 * cap_rates[1]
    assert i1 >= 0 and i2 >= 0 and abs(i1 + i2 + J) < 1e-14
    energy_rate = j1 * di[0] + 1.5 * j2 * di[1] + V * (i1 + i2)
    assert abs(energy_rate + 10 * j1**2 + 15 * j2**2) < 1e-14
print('RLDC2 event:', te, V, j1, j2, 'diode currents after:', -.1 * J / .25, -.15 * J / .25)
Vr, dVr = voltage(V, -J / .25, .25, .001)
assert dVr > 0  # Both diodes continue conducting on this short segment.
print('RLDC2 1 ms later:', Vr, 'J:', -.25 * dVr)


def dot(a, b):
    return sum(x * y for x, y in zip(a, b))


g, length = 9.81, 1.0


def flight(t):
    return (.4 + 2 * t, -.74905 - .019 * t - g * t * t / 2), (2, -.019 - g * t)


def impact(q, v, restitution):
    if restitution is None:
        raise ValueError('Specify an impact law before computing its reset.')
    if not 0 <= restitution <= 1 or abs(dot(q, q) - length**2) > 1e-12:
        raise ValueError('This reset requires a boundary impact and 0 <= e <= 1.')
    radial = dot(q, v) / length**2
    if radial <= 0:
        raise ValueError('This entry requires outward approach to the boundary.')
    return tuple(v[k] - (1 + restitution) * radial * q[k] for k in range(2))


tb = first_root(lambda t: dot(flight(t)[0], flight(t)[0]) - length**2, 0, .2)
q, vm = flight(tb)
vp = impact(q, vm, 0)
assert abs(dot(q, vp)) < 1e-12
assert abs(q[0] * vm[1] - q[1] * vm[0] - (q[0] * vp[1] - q[1] * vp[0])) < 1e-12
assert abs((dot(vm, vm) - dot(vp, vp)) / 2 - 2) < 1e-12
print('ball event:', tb, q, vm, 'inelastic restart:', vp)


def taut_segment(h):
    theta = atan2(q[0], -q[1])
    omega = (q[0] * vp[1] - q[1] * vp[0]) / length**2
    initial_energy = .5 * length**2 * omega**2 - g * length * cos(theta)
    min_tension = float('inf')
    for _ in range(round(.1 / h)):
        k1 = omega, -g / length * sin(theta)
        k2 = omega + h * k1[1] / 2, -g / length * sin(theta + h * k1[0] / 2)
        k3 = omega + h * k2[1] / 2, -g / length * sin(theta + h * k2[0] / 2)
        k4 = omega + h * k3[1], -g / length * sin(theta + h * k3[0])
        theta += h * (k1[0] + 2 * k2[0] + 2 * k3[0] + k4[0]) / 6
        omega += h * (k1[1] + 2 * k2[1] + 2 * k3[1] + k4[1]) / 6
        min_tension = min(min_tension, omega**2 + g / length * cos(theta))
    assert min_tension > 0
    energy_error = abs(.5 * length**2 * omega**2 - g * length * cos(theta) - initial_energy)
    return theta, omega, energy_error


coarse, fine = taut_segment(.001), taut_segment(.0005)
assert max(abs(coarse[k] - fine[k]) for k in (0, 1)) < 1e-10
print('ball after 0.1 s taut:', fine, 'step-halving difference:', max(abs(coarse[k] - fine[k]) for k in (0, 1)))
ve = impact(q, vm, .5)
assert abs(dot(q, ve) + 1) < 1e-12 and abs(dot(ve, ve) / 2 - 1) < 1e-12
print('changed restitution e=0.5:', ve, 'radial velocity:', dot(q, ve), 'new mode: free')
for args in [(q, vm, None), ((.5, 0), vm, 0)]:
    try:
        impact(*args)
    except ValueError as exc:
        print('required model return:', exc)
    else:
        raise AssertionError('An unsupported reset was accepted.')

MMP.20:6 - Bias-Annotation

Ideal diodes and an inextensible rope concentrate the question on equation changes. Real switching and contact can involve resistance, compliance and a finite interaction time. Choose that idealization from the physical question and the time scale on which the answer will be used.

A numerically convenient reset can conceal a physical choice. Recover the physical law and admissible signs before accepting it. For a different component, obtain its balances, event and consistency conditions before transferring either derivation.

MMP.20:7 - Conformance Checklist

Use this checklist when deciding whether the computed continuation can answer the physical question.

CheckWhat to establish
CC-MMP.20.1The active equations, mode inequalities, sign conventions and quantities inherited from the preceding trajectory are explicit.
CC-MMP.20.2The processed mode equations determine the required leading derivatives and algebraic variables. Any differentiated constraints retain their lower conditions at a start; the actual solve is sufficiently determined and conditioned.
CC-MMP.20.3The event direction and any equality treated as a fact follow from the guard and preceding trajectory.
CC-MMP.20.4Continuity or a jump of each affected stored quantity follows from its governing balance and the specified transition.
CC-MMP.20.5An array used to derive an impulse preserves the common dynamics and final constraints, admits finite rescaling, and uses no unavailable later value.
CC-MMP.20.6The restart satisfies the new consistency conditions, physical inequalities and relevant conserved or dissipated quantities. Any additional impact law is stated.
CC-MMP.20.7The numerical realization resolves the event and next segment at sufficient accuracy; further immediate events are settled before time advances.
CC-MMP.20.8A changed law, guard or reduction assumption returns to the affected construction; an absent determining law is reported as a model question.

MMP.20:8 - Common Anti-Patterns and How to Avoid Them

Anti-patternEffectRepair
Keep every stored variable continuous at an impactExcludes the velocity change required by the new constraintDerive the jump from the impulse balance and impact law
Project to any nearby consistent stateCan change momentum or energy without a physical causeDerive which projection, if any, the transition permits
Drop a conflicting equation solely to obtain a square systemCan remove the common balance or a required final constraintPreserve those equations and use the constrained array construction
Treat a perfect matching as numerical invertibilityMisses parameter-dependent or algebraic singularitiesExamine the actual Jacobian and the resulting solve
Treat a time command as a boundary crossingIntroduces a geometric fact the event did not supplyReconstruct the event or obtain the missing physical action
Reuse a reduction after its parameter relation changesEvolves a different modelReturn to the joint mode equations and derive a suitable reduction
Reduce the integration step to select an impact lawAdds precision without determining the physical continuationSpecify the law or resolve a finite contact model

MMP.20:9 - Consequences

The model can supply a next state together with the equations and conditions that make its continuation meaningful. A failure can be localized to the component laws, event, consistency constraints, structural processing or numerical computation.

This changes repair in practice. A different coefficient of restitution reopens the event law and next mode. A changed R/L relation reopens the circuit reduction. A tighter requested numerical tolerance changes the computation while preserving a justified physical restart. An unresolved impact law remains a modeling question even when a solver returns a consistent point.

The construction costs more than executing a supplied reset. Use it where that reset or its admissibility is missing. Large arrays require appropriate symbolic and numerical support, and a singular or unsupported event can require a richer physical model.

MMP.20:10 - Architectural Rationale

The preceding trajectory and the new mode contribute different information. Treating both as freely adjustable initialization data loses the relation between the event and its physical history. Treating both as simultaneously smooth can suppress a real jump. Keeping inherited values separate from restart unknowns exposes the determining relation.

A mode-change array preserves the time relation long enough to identify the concentrated effect. Scaling before taking the limit retains the finite impulse that would disappear from an unscaled calculation. The final constraints then connect that event result to ordinary evolution in the new mode.

Separate physical specification, mathematical processing and numerical realization so that a change returns to the operation it affects. An improved numerical solver can compute an already determined answer more accurately; choosing a different impact law changes the answer being computed.

MMP.20:11 - SoTA-Echoing

Mode-dependent structural processing. Benveniste, Caillaud and Malandain, The Mathematical Foundations of Physical Systems Modeling Languages (2020/2021), §12, uses RLDC2 to show that dependencies and differentiations change with the diode modes. This pattern adopts that structural lesson. The example in :5.1 uses the declared complementarity directly and permits finite jumps of algebraic diode currents. The source’s continuous-diode-current assumption would exclude this event. The printed auxiliary convention s=i when conducting, s=−u when blocking, with conduction selected by s≥0, would classify a constant blocking state i=0,u=−1 as conducting. Its fixed initial currents j1=2,j2=1 also require i1+i2=−3 under the displayed balance, contradicting i_k≥0. Use the explicit convention and consistent initial data in :5.1. The source’s discussion of particular compiler versions is historical. Source, §12.

Derive the restart before integrating it. Benveniste et al., Structural Methods for handling mode changes in multimode DAE systems, v1 (December 2025), §§2–7, develops the array, permitted postponement, rescaling and restart construction used in :4.3 and :5.2. The source supplies general structural procedures and conditions for a well-defined limit. The small derivation here exposes the physical balances and the finite system an engineer can solve directly; automatic treatment of larger arrays needs the source’s height, matching and rescaling algorithms. Source.

An impact choice remains a physical input. The January 2026 revision adds a restart constraint T and an elastic-impact example in §9. This supports the explicit-law alternative in :5.3: a different restitution can require a different following mode. Adopt that distinction when specifying the transition; a mode declaration alone leaves the impact choice unresolved. Revision v2, §9.

Use the simplest adequate realization. A supplied, justified reset can be executed with an event update, such as the Modelica or ModelingToolkit facilities cited in :4.4. Deriving a mode-change array is useful when the reset itself is missing. A finite contact or switching model is another choice when its duration or internal behavior matters; it adds parameters and possibly stiffness, while retaining the transient physics the instantaneous idealization removes. Compare those alternatives against the same physical question and required time scale.

MMP.20:12 - Relations

  • MMP.18 supplies a joint formulation when the component models still need compatible exchanges. This pattern processes an already composed model when its active constraints change.
  • A.3.3.TR uses the resulting mode equations, event and restart relation to describe and compose the continuation. Its supplied-reset case can be used directly when that relation is already justified.
  • C.29.2 connects mathematical equations with an effective computation; CMP.8 controls the numerical approximation of the answer determined here.
  • MMP.10 helps revise an inconsistent constraint formulation. The subject practice supplies the component and impact laws whose meaning the formulation must retain.
  • MMP.9 can reduce a determined evolution and MMP.17 can replace selected responses when their preservation conditions hold. Neither is a required stage for the small continuations above.
  • MMP.14 investigates a failed prediction when the discrepancy, rather than an already identified changed premise, is the unresolved question.

MMP.20:End