Skip to main content

oximo_core/
param.rs

1use oximo_expr::ParamId;
2use smol_str::SmolStr;
3
4/// Parameter identity (id + name). Parameters are scalars referenced
5/// symbolically in expressions and re-bound between solves.
6///
7/// The current numeric value lives in the model's expression arena
8/// (the single source of truth) so re-binding does not have to
9/// keep two copies in sync. Read it with [`Model::param_value`] /
10/// [`Model::param_value_of`].
11///
12/// For now, we support scalar parameters only.
13///
14/// TODO: Add support for more parameters
15///
16/// [`Model::param_value`]: crate::Model::param_value
17/// [`Model::param_value_of`]: crate::Model::param_value_of
18#[derive(Clone, Debug)]
19pub struct Parameter {
20    pub id: ParamId,
21    pub name: SmolStr,
22}