grb 1.3.0

A Rust API for Gurobi optimizer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use grb::prelude::*;
mod utils;

fn main() -> grb::Result<()> {
  create_model!(_g, m, x, y, z);
  c!(x + y == 1 - z);
  c!(x + y >= 1 - z);
  c!(x + y <= 1 - z);

  c!(x - y in 0..1);
  c!(x in ..1);
  c!(y - x in ..);
  c!(x in -2.3..1);
  Ok(())
}