Skip to content

Commit

Permalink
Merge branch 'master' into get_statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
mmghannam authored Aug 14, 2024
2 parents 3547dbb + f86fd95 commit 2ec7876
Show file tree
Hide file tree
Showing 12 changed files with 864 additions and 22 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Generate documentation

on:
workflow_dispatch:
inputs: {}

jobs:
generate-documentation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Generate documentation
run: |
sudo apt-get install doxygen graphviz
bash -ex generate-docs.sh "${{ secrets.GITHUB_TOKEN }}" "gh-pages"
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,31 @@
- Expanded Statistics class to more problems.
- Created Statistics class
- Added parser to read .stats file
- Release checklist in `RELEASE.md`
- Added Python definitions and wrappers for SCIPstartStrongbranch, SCIPendStrongbranch SCIPgetBranchScoreMultiple,
SCIPgetVarStrongbranchInt, SCIPupdateVarPseudocost, SCIPgetVarStrongbranchFrac, SCIPcolGetAge,
SCIPgetVarStrongbranchLast, SCIPgetVarStrongbranchNode, SCIPallColsInLP, SCIPcolGetAge
- Added getBipartiteGraphRepresentation
### Fixed
- Fixed too strict getObjVal, getVal check
### Changed
### Removed

## 5.1.1 - 2024-06-22
### Added
- Added SCIP_STATUS_DUALLIMIT and SCIP_STATUS_PRIMALLIMIT
- Added SCIPprintExternalCodes (retrieves version of linked symmetry, lp solver, nl solver etc)
- Added recipe with reformulation for detecting infeasible constraints
- Wrapped SCIPcreateOrigSol and added tests
- Added verbose option for writeProblem and writeParams
- Expanded locale test
- 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
- Added SCIPgetOrigConss and SCIPgetNOrigConss Cython bindings.
- Added transformed=False option to getConss, getNConss, and getNVars
### Fixed
- Fixed locale errors in reading
### Changed
- Made readStatistics a standalone function
### Removed
Expand Down
9 changes: 1 addition & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@ If you find this contributing guide unclear, please open an issue! :)
How to craft a release
----------------------

1. update `CHANGELOG`
2. increase version number in `src/pyscipopt/__init__.py` according to semantic versioning
3. commit changes to the master branch
3. tag new version `git tag vX.Y.Z`
4. `git push` && `git push --tags`
5. [create GitHub release](https://github.com/scipopt/PySCIPOpt/releases) based on that tag

A new PyPI package is automatically created by the GitHub actions when pushing a new tag onto the master and the version has been increased. Also the documentation is autmatically created in the process.
Moved to [RELEASE.md](RELEASE.md).

Design principles of PySCIPOpt
==============================
Expand Down
19 changes: 19 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Release Checklist
The following are the steps to follow to make a new PySCIPOpt release. They should mostly be done in order.
- [ ] Check if [scipoptsuite-deploy](https://github.com/scipopt/scipoptsuite-deploy) needs a new release, if a new SCIP version is released for example, or new dependencies (change symmetry dependency, add support for papilo/ parallelization.. etc). And Update release links in `pyproject.toml`
- [ ] Check if the table in [readme](https://github.com/scipopt/PySCIPOpt#installation) needs to be updated.
- [ ] Update version number according to semantic versioning [rules](https://semver.org/) in `_version.py`
- [ ] Update `CHANGELOG.md`; Change the `Unlreased` to the new version number and add an empty unreleased section.
- [ ] Create a release candidate on test-pypi by running the workflow “Build wheels” in Actions->build wheels, with these parameters `upload:true, test-pypi:true` 
- [ ] If the pipeline passes, test the released pip package on test-pypi by running and checking that it works
```bash
pip install -i https://test.pypi.org/simple/ PySCIPOpt
```
- [ ] If it works, release on pypi.org with running the same workflow but with `test-pypi:false`.
- [ ] Then create a tag wit the new version (from the master branch)
```bash
git tag vX.X.X
git push origin vX.X.X
```
- [ ] Then make a github [release](https://github.com/scipopt/PySCIPOpt/releases/new) from this new tag.
- [ ] Update documentation by running the `Generate Docs` workflow in Actions->Generate Docs.
2 changes: 1 addition & 1 deletion generate-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ echo "Downloading SCIP tagfile to create links to SCIP docu"
wget -q -O docs/scip.tag https://scip.zib.de/doc/scip.tag

#get version number for doxygen
export VERSION_NUMBER=$(grep "__version__" src/pyscipopt/__init__.py | cut -d ' ' -f 3 | tr --delete \')
export VERSION_NUMBER=$(grep "__version__" src/pyscipopt/_version.py | cut -d ' ' -f 3 | tr --delete \')

# generate html documentation in docs/html
echo "Generating documentation"
Expand Down
13 changes: 12 additions & 1 deletion src/pyscipopt/scip.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ cdef extern from "scip/scip.h":
int SCIPgetNLPCols(SCIP* scip)
SCIP_COL** SCIPgetLPCols(SCIP *scip)
SCIP_ROW** SCIPgetLPRows(SCIP *scip)
SCIP_Bool SCIPallColsInLP(SCIP* scip)

# Cutting Plane Methods
SCIP_RETCODE SCIPaddPoolCut(SCIP* scip, SCIP_ROW* row)
Expand Down Expand Up @@ -839,6 +840,7 @@ cdef extern from "scip/scip.h":
int SCIPgetNBestSolsFound(SCIP* scip)
SCIP_SOL* SCIPgetBestSol(SCIP* scip)
SCIP_Real SCIPgetSolVal(SCIP* scip, SCIP_SOL* sol, SCIP_VAR* var)
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL* sol)
SCIP_RETCODE SCIPwriteVarName(SCIP* scip, FILE* outfile, SCIP_VAR* var, SCIP_Bool vartype)
SCIP_Real SCIPgetSolOrigObj(SCIP* scip, SCIP_SOL* sol)
SCIP_Real SCIPgetSolTransObj(SCIP* scip, SCIP_SOL* sol)
Expand Down Expand Up @@ -1257,7 +1259,15 @@ cdef extern from "scip/scip.h":
SCIP_RETCODE SCIPgetLPBranchCands(SCIP* scip, SCIP_VAR*** lpcands, SCIP_Real** lpcandssol,
SCIP_Real** lpcandsfrac, int* nlpcands, int* npriolpcands, int* nfracimplvars)
SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP* scip, SCIP_VAR*** pseudocands, int* npseudocands, int* npriopseudocands)

SCIP_RETCODE SCIPstartStrongbranch(SCIP* scip, SCIP_Bool enablepropogation)
SCIP_RETCODE SCIPendStrongbranch(SCIP* scip)
SCIP_RETCODE SCIPgetVarStrongbranchLast(SCIP* scip, SCIP_VAR* var, SCIP_Real* down, SCIP_Real* up, SCIP_Bool* downvalid, SCIP_Bool* upvalid, SCIP_Real* solval, SCIP_Real* lpobjval)
SCIP_Longint SCIPgetVarStrongbranchNode(SCIP* scip, SCIP_VAR* var)
SCIP_Real SCIPgetBranchScoreMultiple(SCIP* scip, SCIP_VAR* var, int nchildren, SCIP_Real* gains)
SCIP_RETCODE SCIPgetVarStrongbranchWithPropagation(SCIP* scip, SCIP_VAR* var, SCIP_Real solval, SCIP_Real lpobjval, int itlim, int maxproprounds, SCIP_Real* down, SCIP_Real* up, SCIP_Bool* downvalid, SCIP_Bool* upvalid, SCIP_Longint* ndomredsdown, SCIP_Longint* ndomredsup, SCIP_Bool* downinf, SCIP_Bool* upinf, SCIP_Bool* downconflict, SCIP_Bool* upconflict, SCIP_Bool* lperror, SCIP_Real* newlbs, SCIP_Real* newubs)
SCIP_RETCODE SCIPgetVarStrongbranchInt(SCIP* scip, SCIP_VAR* var, int itlim, SCIP_Bool idempotent, SCIP_Real* down, SCIP_Real* up, SCIP_Bool* downvalid, SCIP_Bool* upvalid, SCIP_Bool* downinf, SCIP_Bool* upinf, SCIP_Bool* downconflict, SCIP_Bool* upconflict, SCIP_Bool* lperror)
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP* scip, SCIP_VAR* var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_RETCODE SCIPgetVarStrongbranchFrac(SCIP* scip, SCIP_VAR* var, int itlim, SCIP_Bool idempotent, SCIP_Real* down, SCIP_Real* up, SCIP_Bool* downvalid, SCIP_Bool* upvalid, SCIP_Bool* downinf, SCIP_Bool* upinf, SCIP_Bool* downconflict, SCIP_Bool* upconflict, SCIP_Bool* lperror)

# Numerical Methods
SCIP_Real SCIPinfinity(SCIP* scip)
Expand Down Expand Up @@ -1840,6 +1850,7 @@ cdef extern from "scip/pub_lp.h":
int SCIPcolGetNNonz(SCIP_COL* col)
SCIP_ROW** SCIPcolGetRows(SCIP_COL* col)
SCIP_Real* SCIPcolGetVals(SCIP_COL* col)
int SCIPcolGetAge(SCIP_COL* col)
int SCIPcolGetIndex(SCIP_COL* col)
SCIP_Real SCIPcolGetObj(SCIP_COL *col)

Expand Down
Loading

0 comments on commit 2ec7876

Please sign in to comment.