Project

EarthSciAST

The EarthSciML Abstract Syntax Tree format: schema, operators, coupling, and five language bindings.

Contents

This is the documentation for the older version v0.15.1. For the latest release, see v0.17.0.

simulate_error

Stable error · Simulation

Tier: stable · Kind: error · Topic: Simulation

JuliaTypeScriptPythonRustGo
SimulateErroroutside profilenot exportedSimulateErroroutside profile

Julia

struct SimulateError <: EarthSciASTError
SimulateError(msg::AbstractString)
SimulateError(msg::AbstractString, code::AbstractString)
SimulateError(msg, code = "")

Exception thrown when a simulation Problem cannot be built or run (API_SPEC §5.8): esm_problem given a missing file or an unsupported input, an override in p / u0 that names no variable, is ambiguous or collides with another, a document with no models, a provider or compiler that cannot serve the request, an observed_field read of a name that is not an evaluable observed, or solve called without the solver extension loaded. The ModelingToolkit and Catalyst constructors (ModelingToolkit.System, Catalyst.ReactionSystem) raise it too, for a document construct they cannot lower.

Fields: code, the ERROR_CODES value when the failure has one (such as compiler_unknown, override_key_ambiguous or unsupported_construct) and "" otherwise, then msg, the human-readable description.

Source

TypeScript

Not available in TypeScript. TypeScript is outside the simulation capability profile (Julia, Python, Rust): build an RHS and integrate it; TypeScript and Go are deliberately non-simulating.

Python

Python does not export this error.

Rust

pub enum SimulateError {
    Compile(CompileError),
    DiffsolError { details: String },
    ToleranceBelowWorkingPrecision { source_name: &'static str, reltol: f64, floor: f64 },
    ToleranceNotMet,
    NotDynamic { details: String },
    CompilerUnavailable { compiler: &'static str, details: String },
    RangeRestriction { code: &'static str, message: String },
    Strip { code: &'static str, message: String },
    DataSourceUnbound { parameter: String, data_source: String },
    Cancelled { details: String },
    UnsubstitutableBinding { name: String, class: String },
    InvalidTimeSpan { start: f64, end: f64 },
    InvalidParameter { name: String },
    AmbiguousParameter { name: String, candidates: Vec<String> },
    CollidingParameterKeys { name: String, keys: Vec<String> },
    InvalidInitialCondition { name: String },
    AmbiguousInitialCondition { name: String, candidates: Vec<String> },
    CollidingInitialConditionKeys { name: String, keys: Vec<String> },
    InvalidFieldInitialCondition { name: String, details: String },
    IcReadsState { name: String, details: String },
    ProviderError { name: String, details: String },
}

impl SimulateError { pub fn code(&self) -> Option<&'static str> }

impl SimulateError { pub fn is_cancelled(&self) -> bool }

Errors raised building an crate::problem::EsmProblem or running crate::problem::solve .

Source · Rust docs

Go

Not available in Go. Go is outside the simulation capability profile (Julia, Python, Rust): build an RHS and integrate it; TypeScript and Go are deliberately non-simulating.