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/// An indexed family of parameters (one `Parameter` per key) is built by the
13/// indexed form of the `param!` macro and surfaced as an
14/// [`IndexedParam`](crate::IndexedParam).
15///
16/// [`Model::param_value`]: crate::Model::param_value
17/// [`Model::param_value_of`]: crate::Model::param_value_of
18/// [`Model::set_param_idx`]: crate::Model::set_param_idx
19#[derive(Clone, Debug)]
20pub struct Parameter {
21 pub id: ParamId,
22 pub name: SmolStr,
23}