v0.8.1
Updates
-
In this version, you can now attach any data to the
Modelinstance using the
set_datamethod, and retrieve it using theget_dataandget_data_mutmethods.
This is useful for communicating data between plugins, or storing other representations of the
variables/constraints in the model.let mut model = Model::new(); // Some user-defined data struct MyData { title: String, } let data = MyData { title: "My Data".to_string(), }; // Attach the data to the model model.set_data(data); // Retrieve the data let data_ref = model.get_data::<MyData>().unwrap(); assert_eq!(data_ref.title, "My Data"); // Mutate the data let data_mut = model.get_data_mut::<MyData>().unwrap(); data_mut.title = "New Title".to_string(); assert_eq!(data_mut.title, "New Title");
-
This release also brings support to SCIP's diving and probing modes, through the
start_divingandstart_probingmethods. Returning aDiverandProberobjects that allow access to methods only available in diving and probing modes respectively, where the mode is exited safely, when the corresponding object is dropped. -
New ergonomic builder for the
Rowobject throughrow()function.
What's Changed
- Probing mode methods by @mmghannam in #242
- Change the default of adding solution to not print anything by @mmghannam in #243
- Add ergonomic row builder & ability to add row in probing mode by @mmghannam in #244
- LP status method by @mmghannam in #245
- Add diving support by @mmghannam in #246
- Datastore feature: allow attaching generic data to SCIP instance by @mmghannam in #247
Full Changelog: v0.8.0...v0.8.1