Skip to content

Commit

Permalink
Merge pull request #837 from ctdunc/feature/disjunctive-constraint
Browse files Browse the repository at this point in the history
add support for disjunction constraints
  • Loading branch information
Opt-Mucca committed May 3, 2024
2 parents 32caac7 + 07e1e9d commit 60ec985
Show file tree
Hide file tree
Showing 4 changed files with 334 additions and 178 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased
### Added
- Added methods for creating expression constraints without adding to problem
- Added methods for creating/adding/appending disjunction constraints
- Added check for pt_PT locale in test_model.py
### Fixed
### Changed
Expand Down
18 changes: 18 additions & 0 deletions src/pyscipopt/scip.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,24 @@ cdef extern from "scip/cons_sos2.h":
SCIP_CONS* cons,
SCIP_VAR* var)

cdef extern from "scip/cons_disjunction.h":
SCIP_RETCODE SCIPcreateConsDisjunction(SCIP *scip,
SCIP_CONS **cons,
const char *name,
int nconss,
SCIP_CONS **conss,
SCIP_CONS *relaxcons,
SCIP_Bool initial,
SCIP_Bool enforce,
SCIP_Bool check,
SCIP_Bool local,
SCIP_Bool modifiable,
SCIP_Bool dynamic)

SCIP_RETCODE SCIPaddConsElemDisjunction(SCIP *scip,
SCIP_CONS *cons,
SCIP_CONS *addcons)

cdef extern from "scip/cons_and.h":
SCIP_RETCODE SCIPcreateConsAnd(SCIP* scip,
SCIP_CONS** cons,
Expand Down
Loading

0 comments on commit 60ec985

Please sign in to comment.