Skip to main content

MixedIntegerNonLinearProgram

Trait MixedIntegerNonLinearProgram 

Source
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§

Source

fn x_variables(&self) -> SVector<(f64, f64, f64), N_X>

Source

fn y_variables(&self) -> SMatrix<(i32, i32), N_Y1, N_Y2>

Source

fn linear_constraints( &self, y: SMatrix<Variable, N_Y1, N_Y2>, ) -> Vec<LinearConstraint>

Source

fn constraints(&self) -> Vec<GeneralConstraint>

Source

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>

Source

fn y_to_string(&self, y: &SMatrix<f64, N_Y1, N_Y2>) -> String

Provided Methods§

Source

fn exclude_solutions(&self, s: &[f64]) -> Vec<Vec<f64>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<M: MolecularRepresentation<N_Y>, R: PropertyModel<N>, P: ProcessModel<N_X, N>, const N_X: usize, const N_Y: usize, const N: usize> MixedIntegerNonLinearProgram<N_X, N_Y, N> for IntegratedDesign<M, R, P>