#[non_exhaustive]
#[derive(Debug, Clone)]
pub enum PhysicsConstraint {
OdeConstraint {
rate: f64,
},
ConservationLaw {
target_sum: f64,
},
Monotone {
increasing: bool,
},
BoundedVariation {
bound: f64,
},
}
#[non_exhaustive]
#[derive(Debug, Clone)]
pub struct PhysicsTsConfig {
pub hidden_dim: usize,
pub n_layers: usize,
pub physics_weight: f64,
pub n_epochs: usize,
pub learning_rate: f64,
}
impl Default for PhysicsTsConfig {
fn default() -> Self {
Self {
hidden_dim: 32,
n_layers: 2,
physics_weight: 1.0,
n_epochs: 100,
learning_rate: 1e-3,
}
}
}
#[derive(Debug, Clone)]
pub struct PhysicsTsResult {
pub predictions: Vec<f64>,
pub physics_residuals: Vec<f64>,
pub total_physics_loss: f64,
pub data_loss: f64,
}