pub trait MixedIntegerNonLinearProgram<const N_X: usize, const N_Y1: usize, const N_Y2: usize> {
type Error;
// Required methods
fn x_variables(&self) -> SVector<(f64, f64, f64), N_X>;
fn y_variables(&self) -> SMatrix<(i32, i32), N_Y1, N_Y2>;
fn linear_constraints(
&self,
y: SMatrix<Variable, N_Y1, N_Y2>,
) -> Vec<LinearConstraint>;
fn constraints(&self) -> Vec<GeneralConstraint>;
fn evaluate<D: DualNum<f64> + Copy>(
&self,
x: SVector<D, N_X>,
y: SMatrix<D, N_Y1, N_Y2>,
) -> Result<(D, Vec<D>), Self::Error>;
fn y_to_string(&self, y: &SMatrix<f64, N_Y1, N_Y2>) -> String;
// Provided method
fn exclude_solutions(&self, s: &[f64]) -> Vec<Vec<f64>> { ... }
}Expand description
A generic MINLP that can be solved with the OuterApproximation algorithm.
Required Associated Types§
Required Methods§
fn x_variables(&self) -> SVector<(f64, f64, f64), N_X>
fn y_variables(&self) -> SMatrix<(i32, i32), N_Y1, N_Y2>
fn linear_constraints( &self, y: SMatrix<Variable, N_Y1, N_Y2>, ) -> Vec<LinearConstraint>
fn constraints(&self) -> Vec<GeneralConstraint>
fn evaluate<D: DualNum<f64> + Copy>( &self, x: SVector<D, N_X>, y: SMatrix<D, N_Y1, N_Y2>, ) -> Result<(D, Vec<D>), Self::Error>
fn y_to_string(&self, y: &SMatrix<f64, N_Y1, N_Y2>) -> String
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".