-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from Kieranoski702/main
Issues with creating XYZ problem in cpp
- Loading branch information
Showing
7 changed files
with
117 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use chuffed_rs::bindings::{new_xyz_problem, solve_xyz}; | ||
|
||
#[test] | ||
fn run_cpp_problem() { | ||
let n: i32 = 1; | ||
|
||
unsafe { | ||
let p = new_xyz_problem(n); | ||
solve_xyz(p); | ||
|
||
// Pass test if no crash occurs | ||
assert!(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
predicate all_different_int(array [int] of var int: xs); | ||
var 1..3: x:: output_var ; | ||
var 1..3: y:: output_var ; | ||
var 1..3: z:: output_var ; | ||
constraint int_lin_eq([1,1,-1],[x,y,z],0); | ||
solve :: int_search([x, y, z], input_order, indomain_min, complete) | ||
satisfy; |