Numerical Methods for Modeling
Let a cooling step explain its own rejection
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.
Context for this challenge
Build a full Euler step and, on a separate branch, two consecutive half steps over the same interval. Compare their difference with the absolute-plus-relative tolerance. Return the candidate, discrepancy, tolerance and zero-or-one acceptance using Show the step comparison.
The simulator’s old fixed timestep misses a rapid change that its learned training target must represent.
Start with the existing Euler update. Add a branch that evaluates the rate again at a midpoint, then compare both routes before accepting either result.
Examples and results
- Temperature above ambient
10
- Cooling rate per second
0.5
- Proposed seconds to advance
0.1
- Absolute error allowance
0.1
- Relative error allowance
0.01
- Required result
- candidate
- 9.5062
- estimated_error
- 0.0063
- tolerance
- 0.1951
- accepted
- 1
- Temperature above ambient
0.001
- Cooling rate per second
0.5
- Proposed seconds to advance
1
- Absolute error allowance
0.0001
- Relative error allowance
0.01
- Required result
- candidate
- 0.0006
- estimated_error
- 0.0001
- tolerance
- 0.0001
- accepted
- 1
Try a fresh construction
This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.
Stuck? Inspect a worked construction
The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.
Assumptions and test precision
This scalar Euler comparison makes a local acceptance decision. A complete trajectory still needs a global error check and evidence for the physical cooling law; RK45 uses a different numerical method. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
A faster cooling rate exposes a shorter acceptable interval
This check uses the pieces from “Build an acceptance test around the old update”.
BOTIE
- Temperature above ambient
4
- Cooling rate per second
1
- Proposed seconds to advance
0.2
- Absolute error allowance
0.01
- Relative error allowance
0
Use a number, text, or an array matching the requested result. A named result uses field names, such as {"count": 2}. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
What separate evidence would tell us whether the physical cooling law is wrong?
Track local numerical acceptance separately from complete-trajectory error and agreement with measured equipment.
This scalar Euler comparison makes a local acceptance decision. A complete trajectory still needs a global error check and evidence for the physical cooling law; RK45 uses a different numerical method.