pub fn solve_real_lp_problem_micro_lp(
    lp: &LinearModel,
) -> Result<LpSolution<f64>, SolverError>Expand description
Solves a linear programming problem with real variables using the microlp solver.
This is the recommended solver for linear programming problems with real variables as it provides better performance than the basic simplex implementation.
§Arguments
- lp- The linear programming model to solve, must contain only real or non-negative real variables
§Returns
- Ok(LpSolution<f64>)- The optimal solution if found
- Err(SolverError)- Various error conditions that prevented finding a solution
§Example
use rooc::{VariableType, Comparison, OptimizationType, solve_real_lp_problem_micro_lp, LinearModel};
let mut model = LinearModel::new();
model.add_variable("x1", VariableType::non_negative_real());
model.add_variable("x2", VariableType::real());
// Add constraint: x1 + x2 <= 5
model.add_constraint(vec![1.0, 1.0], Comparison::LessOrEqual, 5.0);
// Set objective: maximize x1 + 2*x2
model.set_objective(vec![1.0, 2.0], OptimizationType::Max);
let solution = solve_real_lp_problem_micro_lp(&model).unwrap();