This is a demo project showing how to make a (very basic) interface allowing
the mosekcomodel to use the Highs solver for linear
continuous and integer problems.
Please note that it is only meant as a proof of concept and has several loose
ends.
Example: milo1
extern crate mosekcomodel;
use mosekcomodel::*;
use mosekcomodel_highs::Model;
fn milo1() -> (SolutionStatus,Result<Vec<f64>,String>) {
let a0 : &[f64] = &[ 50.0, 31.0 ];
let a1 : &[f64] = &[ 3.0, -2.0 ];
let c : &[f64] = &[ 1.0, 0.64 ];
let mut m = Model::new(Some("milo1"));
let x = m.variable(Some("x"), greater_than(0.0).with_shape(&[2]).integer());
m.constraint(Some("c1"), a0.dot(&x), less_than(250.0));
m.constraint(Some("c2"), a1.dot(&x), greater_than(-4.0));
m.objective(Some("obj"), Sense::Maximize, c.dot(&x));
m.solve();
let (psta,_) = m.solution_status(SolutionType::Integer);
(psta,m.primal_solution(SolutionType::Integer, &x))
}