Skip to main content

TopmodelModel

Struct TopmodelModel 

Source
pub struct TopmodelModel { /* private fields */ }

Trait Implementations§

Source§

impl HydroModel for TopmodelModel

Source§

type Params = TopmodelParams

Model-specific parameters (serializable for config persistence).
Source§

fn new(params: Self::Params) -> Self

Construct a model instance with the given parameters (default state).
Source§

fn step(&mut self, f: &Forcing, dt_h: f64)

Advance one time-step given the forcing (precipitation, PET, temperature).
Source§

fn discharge(&self) -> f64

Current discharge at the basin outlet (m³/s).
Source§

fn state(&self) -> Value

Serialize internal state for warm-restart across events.
Source§

fn reset(&mut self)

Reset internal state to default (cold start).
Source§

fn name(&self) -> &'static str

Model display name (e.g. “新安江”, “TOPMODEL”).
Source§

fn params(&self) -> &Self::Params

Read-only access to parameters.
Source§

fn params_mut(&mut self) -> &mut Self::Params

Mutable access to parameters (for calibration).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<M> DynHydroModel for M
where M: HydroModel,

Source§

fn step(&mut self, forcing: &Forcing, dt_h: f64)

Source§

fn discharge(&self) -> f64

Source§

fn name(&self) -> &'static str

Source§

fn params_json(&self) -> Value

Source§

fn set_params_json(&mut self, v: &Value)

Source§

fn reset(&mut self)

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.