diff --git a/pywr-schema/src/parameters/doc_examples/rbf_1.json b/pywr-schema/src/parameters/doc_examples/rbf_1.json index 8d6fc75a..add053de 100644 --- a/pywr-schema/src/parameters/doc_examples/rbf_1.json +++ b/pywr-schema/src/parameters/doc_examples/rbf_1.json @@ -2,9 +2,9 @@ "name": "my-interpolated-profile", "type": "RbfProfile", "points": [ - [90.0, 0.5], - [180.0, 0.3], - [270.0, 0.7] + [90, 0.5], + [180, 0.3], + [270, 0.7] ], "function": {"Gaussian": { "epsilon": 3.0 }} } diff --git a/pywr-schema/src/parameters/doc_examples/rbf_2.json b/pywr-schema/src/parameters/doc_examples/rbf_2.json new file mode 100644 index 00000000..0f90a146 --- /dev/null +++ b/pywr-schema/src/parameters/doc_examples/rbf_2.json @@ -0,0 +1,16 @@ +{ + "name": "my-interpolated-profile", + "type": "RbfProfile", + "points": [ + [90, 0.5], + [180, 0.3], + [270, 0.7] + ], + "function": {"Gaussian": { "epsilon": 3.0 }}, + "variable": { + "is_active": true, + "days_of_year_range": 30, + "value_upper_bounds": 1.0, + "value_lower_bounds": 0.0 + } +} diff --git a/pywr-schema/src/parameters/mod.rs b/pywr-schema/src/parameters/mod.rs index 9ad3d67c..99e7e599 100644 --- a/pywr-schema/src/parameters/mod.rs +++ b/pywr-schema/src/parameters/mod.rs @@ -36,7 +36,7 @@ pub use super::parameters::indexed_array::IndexedArrayParameter; pub use super::parameters::polynomial::Polynomial1DParameter; pub use super::parameters::profiles::{ DailyProfileParameter, MonthlyProfileParameter, RadialBasisFunction, RbfProfileParameter, - UniformDrawdownProfileParameter, + RbfProfileVariableSettings, UniformDrawdownProfileParameter, }; pub use super::parameters::python::PythonParameter; pub use super::parameters::tables::TablesArrayParameter; diff --git a/pywr-schema/src/parameters/profiles.rs b/pywr-schema/src/parameters/profiles.rs index 0adb18fc..9d199b79 100644 --- a/pywr-schema/src/parameters/profiles.rs +++ b/pywr-schema/src/parameters/profiles.rs @@ -282,6 +282,15 @@ impl Into for RbfProfileVariabl /// ```json #[doc = include_str!("doc_examples/rbf_1.json")] /// ``` +/// +/// The example below shows the definition of a [`RbfProfileParameter`] in JSON with variable +/// settings defined. This settings determine how the interpolation points be modified by +/// external algorithms. See [`RbfProfileVariableSettings`] for more information. +/// +/// ```json +#[doc = include_str!("doc_examples/rbf_2.json")] +/// ``` +/// #[derive(serde::Deserialize, serde::Serialize, Debug, Clone)] pub struct RbfProfileParameter { #[serde(flatten)]