russcip 0.1.1

Rust interface for SCIP.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use scip_sys as c_api;
pub mod model;
pub mod variable;
pub mod constraint;
pub mod status;
pub mod solution;
pub mod retcode;

#[macro_export]
macro_rules! scip_call {
    ($res:expr) => {
        let res = unsafe { $res };
        if res != c_api::SCIP_Retcode_SCIP_OKAY {
            let retcode = crate::retcode::Retcode::from_c_scip_retcode(res).expect(format!("Unknown SCIP return code {}", res).as_str());
            panic!("SCIP call failed with return code {:?}", retcode);
        }
    };
}