mod analysis;
mod approx;
pub(crate) mod arbitrary;
mod builder;
mod clip_bounds;
mod constraint_hints;
mod convert;
mod decision_variable;
mod error;
mod evaluate;
mod log_encode;
mod logical_memory;
mod named_function;
mod new;
mod parametric_builder;
mod parse;
mod pass;
mod penalty;
mod reduce_binary_power;
mod serialize;
mod setter;
mod stats;
mod substitute;
pub use analysis::*;
pub use builder::*;
pub use error::*;
pub use log_encode::*;
pub use parametric_builder::*;
pub use stats::*;
use crate::{
constraint_hints::ConstraintHints, named_function::NamedFunctionID, parse::Parse, v1,
AcyclicAssignments, Constraint, ConstraintID, DecisionVariable, Evaluate, Function,
NamedFunction, RemovedConstraint, VariableID, VariableIDSet,
};
use std::collections::BTreeMap;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub enum Sense {
#[default]
Minimize,
Maximize,
}
#[derive(Debug, Clone, PartialEq, getset::Getters, getset::CopyGetters, Default)]
pub struct Instance {
#[getset(get_copy = "pub")]
sense: Sense,
#[getset(get = "pub")]
objective: Function,
#[getset(get = "pub")]
decision_variables: BTreeMap<VariableID, DecisionVariable>,
#[getset(get = "pub")]
constraints: BTreeMap<ConstraintID, Constraint>,
#[getset(get = "pub")]
removed_constraints: BTreeMap<ConstraintID, RemovedConstraint>,
#[getset(get = "pub")]
decision_variable_dependency: AcyclicAssignments,
#[getset(get = "pub")]
named_functions: BTreeMap<NamedFunctionID, NamedFunction>,
#[getset(get = "pub")]
constraint_hints: ConstraintHints,
pub parameters: Option<v1::Parameters>,
pub description: Option<v1::instance::Description>,
}
#[derive(Debug, Clone, PartialEq, getset::Getters, Default)]
pub struct ParametricInstance {
#[getset(get = "pub")]
sense: Sense,
#[getset(get = "pub")]
objective: Function,
#[getset(get = "pub")]
decision_variables: BTreeMap<VariableID, DecisionVariable>,
#[getset(get = "pub")]
parameters: BTreeMap<VariableID, v1::Parameter>,
#[getset(get = "pub")]
constraints: BTreeMap<ConstraintID, Constraint>,
#[getset(get = "pub")]
removed_constraints: BTreeMap<ConstraintID, RemovedConstraint>,
#[getset(get = "pub")]
decision_variable_dependency: AcyclicAssignments,
#[getset(get = "pub")]
named_functions: BTreeMap<NamedFunctionID, NamedFunction>,
#[getset(get = "pub")]
constraint_hints: ConstraintHints,
pub description: Option<v1::instance::Description>,
}