Skip to content

Commit

Permalink
Merge branch 'main' into set-params-all-states
Browse files Browse the repository at this point in the history
  • Loading branch information
mmghannam authored Sep 21, 2023
2 parents 2f07586 + a67787b commit 493623c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
### Added
- Added method `set_obj_integral` to allow specifying that the objective value is always integral.
- Add support for cardinality constraints.
- Simplify imports by adding `prelude` module.
### Fixed
### Changed
- Free sol after adding in `ScipPtr::add_sol()`.
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,7 @@ russcip = { git = "https://github.com/scipopt/russcip" }
## Example
Model and solve an integer program.
```rust
use russcip::model::Model;
use russcip::model::ObjSense;
use russcip::status::Status;
use russcip::variable::VarType;
use russcip::retcode::Retcode;
use crate::russcip::model::ModelWithProblem;
use crate::russcip::model::ProblemOrSolving;
use crate::russcip::WithSolutions;
use crate::russcip::WithSolvingStats;
use russcip::prelude::*;

fn main() {
// Create model
Expand Down
12 changes: 4 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@
//! # Example
//! Model and solve an integer program.
//! ```rust
//! use russcip::model::Model;
//! use russcip::model::ObjSense;
//! use russcip::status::Status;
//! use russcip::variable::VarType;
//! use crate::russcip::model::ProblemOrSolving;
//! use crate::russcip::model::ModelWithProblem;
//! use crate::russcip::WithSolutions;
//! use crate::russcip::WithSolvingStats;
//! use russcip::prelude::*;
//!
//! // Create model
//! let mut model = Model::new()
Expand Down Expand Up @@ -96,6 +89,9 @@ pub use eventhdlr::*;
pub mod heuristic;
pub use heuristic::*;

/// Contains all the traits and structs that are re-exported by default.
pub mod prelude;

mod scip;

/// A macro for calling a `SCIP` function and returning an error if the return code is not `SCIP_OKAY`.
Expand Down
9 changes: 9 additions & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pub use crate::model::Model;
pub use crate::model::ModelWithProblem;
pub use crate::model::ProblemOrSolving;
pub use crate::model::WithSolutions;
pub use crate::model::WithSolvingStats;
pub use crate::model::ObjSense;
pub use crate::status::Status;
pub use crate::variable::VarType;
pub use crate::retcode::Retcode;

0 comments on commit 493623c

Please sign in to comment.