cnvx-lp 0.0.1

linear programming solver for cnvx optimization library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use cnvx_core::*;

/// Validates a linear programming model before solving.
///
/// Checks that the model has a defined objective function.
/// You can add more LP-specific checks here in the future.
///
/// # Errors
///
/// Returns [`SolveError::NoObjective`] if the model does not have an objective.
pub fn check_lp(model: &Model) -> Result<(), SolveError> {
    if model.objective().is_none() {
        return Err(SolveError::NoObjective);
    }
    Ok(())
}