use crate::structures::{ControlledPumpBatch, GateActuatorBatch, GateTrajectoryBatch};
use numr::dtype::DType;
use numr::runtime::Runtime;
#[derive(Clone, Debug)]
pub enum OperatingSourceBinding<'a, R: Runtime<DType = DType>> {
Manual {
source_id: String,
structure_ids: Vec<String>,
},
Prescribed {
source_id: String,
trajectory: &'a GateTrajectoryBatch<R>,
},
Actuated {
source_id: String,
actuator: &'a GateActuatorBatch<R>,
},
ControlledPump {
source_id: String,
pump: &'a ControlledPumpBatch<R>,
},
}
#[derive(Debug)]
pub enum OperatingSourceFrame<'a, R: Runtime<DType = DType>> {
ActuatedGate {
source_id: &'a str,
actuator: &'a GateActuatorBatch<R>,
},
ControlledPump {
source_id: &'a str,
pump: &'a ControlledPumpBatch<R>,
},
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OperatingSourceSupport {
pub start_s: f64,
pub end_s: f64,
}
impl<R: Runtime<DType = DType>> Copy for OperatingSourceFrame<'_, R> {}
impl<R: Runtime<DType = DType>> Clone for OperatingSourceFrame<'_, R> {
fn clone(&self) -> Self {
*self
}
}