Releases: scipopt/russcip
v0.8.2
What's Changed
- Add bin packing example and some added methods by @mmghannam in #250
- Closes #251 by @HunkBenny in #252
- [upd] check number of original variables when querying (Closes #253) by @HunkBenny in #254
New Contributors
- @HunkBenny made their first contribution in #252
Full Changelog: v0.8.1...v0.8.2
v0.8.1
Updates
-
In this version, you can now attach any data to the
Model
instance using the
set_data
method, and retrieve it using theget_data
andget_data_mut
methods.
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_diving
andstart_probing
methods. Returning aDiver
andProber
objects 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
Row
object 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
v0.8.0
What's Changed
- Adds current_val to Model and adjusts examples by @bgraf in #229
- Do not run pipelines on draft PRs by @mmghannam in #232
- Add add_cons_local, add_cons_node by @Joao-Dionisio in #230
- CI: update to ubuntu 22.04 by @mmghannam in #235
- Solution handling improvments & Random Rounding heuristic example by @mmghannam in #236
- Most infeasible branching example by @mmghannam in #237
- Add clique separator example by @mmghannam in #238
- Adds transformed method to Constraint by @bgraf in #234
- Constraint attributes in cons builder by @bgraf in #239
- Add a node counter event handler example by @mmghannam in #241
New Contributors
- @bgraf made their first contribution in #229
- @Joao-Dionisio made their first contribution in #230
Full Changelog: v0.7.1...v0.8.0
v0.7.1
What's Changed
- Solution debug string should print the values in the original problem by @mmghannam in #223
- Allow ergonomic api from solving stage too by @mmghannam in #224
- Custom Constraint Handlers by @mmghannam in #222
- Add TSP example with lazy constraints by @mmghannam in #225
- Update scip-sys by @mmghannam in #226
Full Changelog: v0.7.0...v0.7.1
v0.7.0
What's Changed
- ConsBuilder expr method by @mmghannam in #204
- Add knapsack example by @mmghannam in #205
- Improve readability by @mmghannam in #206
- More concise api for building variables by @mmghannam in #207
- Ergonomic builders for plugins by @mmghannam in #208
- Add a getter method for raw SCIP_EVENT pointer by @mmghannam in #209
- var() method for event by @mmghannam in #210
- Update scip-sys by @mmghannam in #211
- Variable local bounds getters by @mmghannam in #212
- Add semantic versioning check to CI by @mmghannam in #213
- Update scip-sys, remove usage of Rc by @mmghannam in #214
- model.inner() by @mmghannam in #215
- Original variables method, more methods on variable by @mmghannam in #217
- Add comparison methods by @mmghannam in #218
- Method to create solutions in the original space by @mmghannam in #219
- Add sol.inner() by @mmghannam in #220
- Implement cutting stock problem example by @jdsalchow in #216
New Contributors
- @jdsalchow made their first contribution in #216
Full Changelog: v0.6.1...v0.7.0
v0.6.1
What's Changed
This release introduces a new ergonomic way to build models.
use russcip::prelude::*;
let mut model = Model::default().minimize();
let x = model.add(var().binary().obj(1.0));
let y = model.add(var().binary().obj(2.0));
model.add(cons().coef(&x, 1.0).coef(&y, 1.0).eq(1.0));
let solved = model.solve();
assert_eq!(solved.status(), Status::Optimal);
assert_eq!(solved.obj_val(), 1.0);
Merged PRs
- Ergonomic generic way to add SCIP objects & variable builder by @mmghannam in #199
- Minimize and maximize methods by @mmghannam in #200
- Enable adding iterators of objects too by @mmghannam in #201
- Ergonomic constraint builder by @mmghannam in #202
Full Changelog: v0.6.0...v0.6.1
v0.6.0
What's Changed
- Add method to get var sol val by @mmghannam in #188
- Use correct mutability symantics for row by @mmghannam in #189
- Remove use of Rc for
Variable
andConstraint
& Add parameter getters by @mmghannam in #190 - Add missing clone implementations by @mmghannam in #192
- feat: add set_display_verbosity and show_output by @KnorpelSenf in #194
- Method to get non-zero columns in a row by @mmghannam in #195
- Generic parametr setter and getter by @mmghannam in #196
New Contributors
- @KnorpelSenf made their first contribution in #194
Full Changelog: v0.5.1...v0.6.0
v0.5.0
What's changed
- This release brings a bunch of API changes related to plugins:
- Now all plugin traits get passed
Model<Solving>
object, enabling easy access for methods available in the solving stage, and removing the need for saving it in the struct implementing the plugin trait usingmodel.clone_for_plugins()
. That's why this release also removes the method. - Additionally, callbacks now also include wrappers for the SCIP plugin objects, for example in the Separator trait's
execute_lp
method now aSCIPSeparator
also gets passed, with which one would query its data like the Separator's name or ask it to create a row with this separator as its origin. - The
EventHdlr
plugin callback now also gets passed anEvent
object representing which event was triggered in that specific call. This struct will in the future include methods that give access to the specific event data for different events.
- Now all plugin traits get passed
- Added wrappers for SCIP_COL and SCIP_ROW with access to most of their methods.
- Refactoring:
- Simplification of the trait implementations of the different Model stages.
- Remove the HasSCIPPtr trait and refactor common functionality in different stages to not depend on macros.
Merged PRs
- Add wrapper methods and structs for columns and rows by @mmghannam in #179
- Allow access to model in solving stage in plugins by @mmghannam in #180
- Add access to internal scip separator in callbacks by @mmghannam in #181
- Add method to add cuts by @mmghannam in #182
- Remove HasSCIPPtr trait by @mmghannam in #183
- Remove unneeded macros by @mmghannam in #184
Full Changelog: v0.4.2...v0.5.0
v0.4.2
What's Changed
- Remove caching of variables and constraints in Model by @mmghannam in #164
- Methods to return solution as map by @mmghannam in #165
- Update scip-sys by @mmghannam in #166
- Update scip-sys by @mmghannam in #168
- Update README.md by @mmghannam in #169
- Move scip_ptr() method to trait by @mmghannam in #170
- Make HasScipPtr public by @mmghannam in #171
- Make ScipPtr public by @mmghannam in #172
- Basic structure for separator plugins by @mmghannam in #174
- Add minimal model fn, extra test for separator by @mmghannam in #175
- Update scip-sys to version 0.1.17 by @mmghannam in #177
- Use older runner for conda test by @mmghannam in #178
Full Changelog: v0.4.0...v0.4.2
v0.4.0
What's Changed
- Better handling of unexpected plugin behaviors by @mmghannam in #150
- Allow setting boolean parameters by @Andful in #148
- Add lifetime to solution by @Andful in #149
- Add dual bound method by @mmghannam in #153
- Use Arc in place of all scip pointer uses by @mmghannam in #155
- Hold a SCIP pointer to prevent freeing the model while the constraint is still in use by @mmghannam in #158
- Hold scipptr in variable to eliminate use-after-free errors by @mmghannam in #160
- Use weak refs for model in solving state by @mmghannam in #162
New Contributors
Full Changelog: v0.3.4...v0.4.0