PySCIPOpt 4.2.0__tar.gz → 4.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/LICENSE +1 -1
  2. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/PKG-INFO +8 -9
  3. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/PySCIPOpt.egg-info/PKG-INFO +8 -9
  4. PySCIPOpt-4.4.0/PySCIPOpt.egg-info/SOURCES.txt +65 -0
  5. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/README.md +7 -5
  6. PySCIPOpt-4.4.0/pyproject.toml +46 -0
  7. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/setup.py +13 -6
  8. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/__init__.py +3 -1
  9. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/branchrule.pxi +4 -5
  10. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/expr.pxi +9 -3
  11. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/pricer.pxi +3 -4
  12. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/relax.pxi +6 -4
  13. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/scip.c +32800 -17425
  14. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/scip.pxd +335 -273
  15. PySCIPOpt-4.2.0/src/pyscipopt/scip.pyx → PySCIPOpt-4.4.0/src/pyscipopt/scip.pxi +196 -19
  16. PySCIPOpt-4.4.0/src/pyscipopt/scip.pyx +3 -0
  17. PySCIPOpt-4.4.0/tests/test_alldiff.py +301 -0
  18. PySCIPOpt-4.4.0/tests/test_benders.py +109 -0
  19. PySCIPOpt-4.4.0/tests/test_branch_incomplete.py +23 -0
  20. PySCIPOpt-4.4.0/tests/test_branch_probing_lp.py +96 -0
  21. PySCIPOpt-4.4.0/tests/test_cons.py +163 -0
  22. PySCIPOpt-4.4.0/tests/test_conshdlr.py +252 -0
  23. PySCIPOpt-4.4.0/tests/test_copy.py +20 -0
  24. PySCIPOpt-4.4.0/tests/test_customizedbenders.py +319 -0
  25. PySCIPOpt-4.4.0/tests/test_cutsel.py +81 -0
  26. PySCIPOpt-4.4.0/tests/test_event.py +84 -0
  27. PySCIPOpt-4.4.0/tests/test_expr.py +179 -0
  28. PySCIPOpt-4.4.0/tests/test_gomory.py +342 -0
  29. PySCIPOpt-4.4.0/tests/test_heur.py +66 -0
  30. PySCIPOpt-4.4.0/tests/test_knapsack.py +48 -0
  31. PySCIPOpt-4.4.0/tests/test_linexpr.py +223 -0
  32. PySCIPOpt-4.4.0/tests/test_logical.py +168 -0
  33. PySCIPOpt-4.4.0/tests/test_lp.py +22 -0
  34. PySCIPOpt-4.4.0/tests/test_memory.py +19 -0
  35. PySCIPOpt-4.4.0/tests/test_model.py +270 -0
  36. PySCIPOpt-4.4.0/tests/test_nlrow.py +74 -0
  37. PySCIPOpt-4.4.0/tests/test_nodesel.py +44 -0
  38. PySCIPOpt-4.4.0/tests/test_nonlinear.py +288 -0
  39. PySCIPOpt-4.4.0/tests/test_pricer.py +176 -0
  40. PySCIPOpt-4.4.0/tests/test_quadcons.py +28 -0
  41. PySCIPOpt-4.4.0/tests/test_quickprod.py +37 -0
  42. PySCIPOpt-4.4.0/tests/test_quicksum.py +35 -0
  43. PySCIPOpt-4.4.0/tests/test_reader.py +81 -0
  44. PySCIPOpt-4.4.0/tests/test_relax.py +64 -0
  45. PySCIPOpt-4.4.0/tests/test_reopt.py +36 -0
  46. PySCIPOpt-4.4.0/tests/test_short.py +89 -0
  47. PySCIPOpt-4.4.0/tests/test_solution.py +167 -0
  48. PySCIPOpt-4.4.0/tests/test_tree.py +63 -0
  49. PySCIPOpt-4.4.0/tests/test_tsp.py +114 -0
  50. PySCIPOpt-4.4.0/tests/test_vars.py +67 -0
  51. PySCIPOpt-4.2.0/PySCIPOpt.egg-info/SOURCES.txt +0 -30
  52. PySCIPOpt-4.2.0/PySCIPOpt.egg-info/requires.txt +0 -1
  53. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/PySCIPOpt.egg-info/dependency_links.txt +0 -0
  54. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/PySCIPOpt.egg-info/top_level.txt +0 -0
  55. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/setup.cfg +0 -0
  56. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/Multidict.py +0 -0
  57. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/benders.pxi +0 -0
  58. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/benderscut.pxi +0 -0
  59. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/conshdlr.pxi +0 -0
  60. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/cutsel.pxi +0 -0
  61. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/event.pxi +0 -0
  62. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/heuristic.pxi +0 -0
  63. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/lp.pxi +0 -0
  64. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/nodesel.pxi +0 -0
  65. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/presol.pxi +0 -0
  66. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/propagator.pxi +0 -0
  67. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/reader.pxi +0 -0
  68. {PySCIPOpt-4.2.0 → PySCIPOpt-4.4.0}/src/pyscipopt/sepa.pxi +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2016 Zuse Institute Berlin
3
+ Copyright (c) 2023 Zuse Institute Berlin (ZIB)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySCIPOpt
3
- Version: 4.2.0
3
+ Version: 4.4.0
4
4
  Summary: Python interface and modeling environment for SCIP
5
5
  Home-page: https://github.com/SCIP-Interfaces/PySCIPOpt
6
6
  Author: Zuse Institute Berlin
7
7
  Author-email: scip@zib.de
8
8
  License: MIT
9
- Platform: UNKNOWN
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Intended Audience :: Science/Research
12
11
  Classifier: Intended Audience :: Education
@@ -20,12 +19,12 @@ License-File: LICENSE
20
19
  PySCIPOpt
21
20
  =========
22
21
 
23
- This project provides an interface from Python to the [SCIP Optimization
24
- Suite](https://www.scipopt.org/).
22
+ This project provides an interface from Python to the [SCIP Optimization Suite](https://www.scipopt.org/). Starting from v8.0.3, SCIP uses the [Apache2.0](https://www.apache.org/licenses/LICENSE-2.0) license. If you plan to use an earlier version of SCIP, please review [SCIP's license restrictions](https://scipopt.org/index.php#license).
25
23
 
26
24
  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PySCIPOpt/Lobby)
27
25
  [![PySCIPOpt on PyPI](https://img.shields.io/pypi/v/pyscipopt.svg)](https://pypi.python.org/pypi/pyscipopt)
28
26
  [![Integration test](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml/badge.svg)](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml)
27
+ [![coverage](https://img.shields.io/codecov/c/github/scipopt/pyscipopt)](https://app.codecov.io/gh/scipopt/pyscipopt/)
29
28
  [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/fsa896vkl8be79j9/branch/master?svg=true)](https://ci.appveyor.com/project/mattmilten/pyscipopt/branch/master)
30
29
 
31
30
 
@@ -44,6 +43,8 @@ Installation
44
43
  [![Conda version](https://img.shields.io/conda/vn/conda-forge/pyscipopt?logo=conda-forge)](https://anaconda.org/conda-forge/pyscipopt)
45
44
  [![Conda platforms](https://img.shields.io/conda/pn/conda-forge/pyscipopt?logo=conda-forge)](https://anaconda.org/conda-forge/pyscipopt)
46
45
 
46
+ ***DO NOT USE THE CONDA BASE ENVIRONMENT TO INSTALL PYSCIPOPT.***
47
+
47
48
  Conda will install SCIP automatically, hence everything can be installed in a single command:
48
49
  ```bash
49
50
  conda install --channel conda-forge pyscipopt
@@ -89,7 +90,7 @@ from pyscipopt import Model
89
90
  model = Model("Example") # model name is optional
90
91
  ```
91
92
 
92
- 3) Access the methods in the `scip.pyx` file using the solver/model
93
+ 3) Access the methods in the `scip.pxi` file using the solver/model
93
94
  instance `model`, e.g.:
94
95
 
95
96
  ``` {.sourceCode .python}
@@ -125,7 +126,7 @@ may also extend it to increase the functionality of this interface. The
125
126
  following will provide some directions on how this can be achieved:
126
127
 
127
128
  The two most important files in PySCIPOpt are the `scip.pxd` and
128
- `scip.pyx`. These two files specify the public functions of SCIP that
129
+ `scip.pxi`. These two files specify the public functions of SCIP that
129
130
  can be accessed from your python code.
130
131
 
131
132
  To make PySCIPOpt aware of the public functions you would like to
@@ -139,7 +140,7 @@ be done in order to properly add the functions:
139
140
 
140
141
  After following the previous two steps, it is then possible to create
141
142
  functions in python that reference the SCIP public functions included in
142
- `scip.pxd`. This is achieved by modifying the `scip.pyx` file to add the
143
+ `scip.pxd`. This is achieved by modifying the `scip.pxi` file to add the
143
144
  functionality you require.
144
145
 
145
146
  We are always happy to accept pull request containing patches or
@@ -217,5 +218,3 @@ Please cite [this paper](https://opus4.kobv.de/opus4-zib/frontdoor/index/index/d
217
218
  }
218
219
  ```
219
220
  as well as the corresponding [SCIP Optimization Suite report](https://scip.zib.de/index.php#cite) when you use this tool for a publication or other scientific work.
220
-
221
-
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySCIPOpt
3
- Version: 4.2.0
3
+ Version: 4.4.0
4
4
  Summary: Python interface and modeling environment for SCIP
5
5
  Home-page: https://github.com/SCIP-Interfaces/PySCIPOpt
6
6
  Author: Zuse Institute Berlin
7
7
  Author-email: scip@zib.de
8
8
  License: MIT
9
- Platform: UNKNOWN
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Intended Audience :: Science/Research
12
11
  Classifier: Intended Audience :: Education
@@ -20,12 +19,12 @@ License-File: LICENSE
20
19
  PySCIPOpt
21
20
  =========
22
21
 
23
- This project provides an interface from Python to the [SCIP Optimization
24
- Suite](https://www.scipopt.org/).
22
+ This project provides an interface from Python to the [SCIP Optimization Suite](https://www.scipopt.org/). Starting from v8.0.3, SCIP uses the [Apache2.0](https://www.apache.org/licenses/LICENSE-2.0) license. If you plan to use an earlier version of SCIP, please review [SCIP's license restrictions](https://scipopt.org/index.php#license).
25
23
 
26
24
  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PySCIPOpt/Lobby)
27
25
  [![PySCIPOpt on PyPI](https://img.shields.io/pypi/v/pyscipopt.svg)](https://pypi.python.org/pypi/pyscipopt)
28
26
  [![Integration test](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml/badge.svg)](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml)
27
+ [![coverage](https://img.shields.io/codecov/c/github/scipopt/pyscipopt)](https://app.codecov.io/gh/scipopt/pyscipopt/)
29
28
  [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/fsa896vkl8be79j9/branch/master?svg=true)](https://ci.appveyor.com/project/mattmilten/pyscipopt/branch/master)
30
29
 
31
30
 
@@ -44,6 +43,8 @@ Installation
44
43
  [![Conda version](https://img.shields.io/conda/vn/conda-forge/pyscipopt?logo=conda-forge)](https://anaconda.org/conda-forge/pyscipopt)
45
44
  [![Conda platforms](https://img.shields.io/conda/pn/conda-forge/pyscipopt?logo=conda-forge)](https://anaconda.org/conda-forge/pyscipopt)
46
45
 
46
+ ***DO NOT USE THE CONDA BASE ENVIRONMENT TO INSTALL PYSCIPOPT.***
47
+
47
48
  Conda will install SCIP automatically, hence everything can be installed in a single command:
48
49
  ```bash
49
50
  conda install --channel conda-forge pyscipopt
@@ -89,7 +90,7 @@ from pyscipopt import Model
89
90
  model = Model("Example") # model name is optional
90
91
  ```
91
92
 
92
- 3) Access the methods in the `scip.pyx` file using the solver/model
93
+ 3) Access the methods in the `scip.pxi` file using the solver/model
93
94
  instance `model`, e.g.:
94
95
 
95
96
  ``` {.sourceCode .python}
@@ -125,7 +126,7 @@ may also extend it to increase the functionality of this interface. The
125
126
  following will provide some directions on how this can be achieved:
126
127
 
127
128
  The two most important files in PySCIPOpt are the `scip.pxd` and
128
- `scip.pyx`. These two files specify the public functions of SCIP that
129
+ `scip.pxi`. These two files specify the public functions of SCIP that
129
130
  can be accessed from your python code.
130
131
 
131
132
  To make PySCIPOpt aware of the public functions you would like to
@@ -139,7 +140,7 @@ be done in order to properly add the functions:
139
140
 
140
141
  After following the previous two steps, it is then possible to create
141
142
  functions in python that reference the SCIP public functions included in
142
- `scip.pxd`. This is achieved by modifying the `scip.pyx` file to add the
143
+ `scip.pxd`. This is achieved by modifying the `scip.pxi` file to add the
143
144
  functionality you require.
144
145
 
145
146
  We are always happy to accept pull request containing patches or
@@ -217,5 +218,3 @@ Please cite [this paper](https://opus4.kobv.de/opus4-zib/frontdoor/index/index/d
217
218
  }
218
219
  ```
219
220
  as well as the corresponding [SCIP Optimization Suite report](https://scip.zib.de/index.php#cite) when you use this tool for a publication or other scientific work.
220
-
221
-
@@ -0,0 +1,65 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.cfg
5
+ setup.py
6
+ PySCIPOpt.egg-info/PKG-INFO
7
+ PySCIPOpt.egg-info/SOURCES.txt
8
+ PySCIPOpt.egg-info/dependency_links.txt
9
+ PySCIPOpt.egg-info/top_level.txt
10
+ src/pyscipopt/Multidict.py
11
+ src/pyscipopt/__init__.py
12
+ src/pyscipopt/benders.pxi
13
+ src/pyscipopt/benderscut.pxi
14
+ src/pyscipopt/branchrule.pxi
15
+ src/pyscipopt/conshdlr.pxi
16
+ src/pyscipopt/cutsel.pxi
17
+ src/pyscipopt/event.pxi
18
+ src/pyscipopt/expr.pxi
19
+ src/pyscipopt/heuristic.pxi
20
+ src/pyscipopt/lp.pxi
21
+ src/pyscipopt/nodesel.pxi
22
+ src/pyscipopt/presol.pxi
23
+ src/pyscipopt/pricer.pxi
24
+ src/pyscipopt/propagator.pxi
25
+ src/pyscipopt/reader.pxi
26
+ src/pyscipopt/relax.pxi
27
+ src/pyscipopt/scip.c
28
+ src/pyscipopt/scip.pxd
29
+ src/pyscipopt/scip.pxi
30
+ src/pyscipopt/scip.pyx
31
+ src/pyscipopt/sepa.pxi
32
+ tests/test_alldiff.py
33
+ tests/test_benders.py
34
+ tests/test_branch_incomplete.py
35
+ tests/test_branch_probing_lp.py
36
+ tests/test_cons.py
37
+ tests/test_conshdlr.py
38
+ tests/test_copy.py
39
+ tests/test_customizedbenders.py
40
+ tests/test_cutsel.py
41
+ tests/test_event.py
42
+ tests/test_expr.py
43
+ tests/test_gomory.py
44
+ tests/test_heur.py
45
+ tests/test_knapsack.py
46
+ tests/test_linexpr.py
47
+ tests/test_logical.py
48
+ tests/test_lp.py
49
+ tests/test_memory.py
50
+ tests/test_model.py
51
+ tests/test_nlrow.py
52
+ tests/test_nodesel.py
53
+ tests/test_nonlinear.py
54
+ tests/test_pricer.py
55
+ tests/test_quadcons.py
56
+ tests/test_quickprod.py
57
+ tests/test_quicksum.py
58
+ tests/test_reader.py
59
+ tests/test_relax.py
60
+ tests/test_reopt.py
61
+ tests/test_short.py
62
+ tests/test_solution.py
63
+ tests/test_tree.py
64
+ tests/test_tsp.py
65
+ tests/test_vars.py
@@ -1,12 +1,12 @@
1
1
  PySCIPOpt
2
2
  =========
3
3
 
4
- This project provides an interface from Python to the [SCIP Optimization
5
- Suite](https://www.scipopt.org/).
4
+ This project provides an interface from Python to the [SCIP Optimization Suite](https://www.scipopt.org/). Starting from v8.0.3, SCIP uses the [Apache2.0](https://www.apache.org/licenses/LICENSE-2.0) license. If you plan to use an earlier version of SCIP, please review [SCIP's license restrictions](https://scipopt.org/index.php#license).
6
5
 
7
6
  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PySCIPOpt/Lobby)
8
7
  [![PySCIPOpt on PyPI](https://img.shields.io/pypi/v/pyscipopt.svg)](https://pypi.python.org/pypi/pyscipopt)
9
8
  [![Integration test](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml/badge.svg)](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml)
9
+ [![coverage](https://img.shields.io/codecov/c/github/scipopt/pyscipopt)](https://app.codecov.io/gh/scipopt/pyscipopt/)
10
10
  [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/fsa896vkl8be79j9/branch/master?svg=true)](https://ci.appveyor.com/project/mattmilten/pyscipopt/branch/master)
11
11
 
12
12
 
@@ -25,6 +25,8 @@ Installation
25
25
  [![Conda version](https://img.shields.io/conda/vn/conda-forge/pyscipopt?logo=conda-forge)](https://anaconda.org/conda-forge/pyscipopt)
26
26
  [![Conda platforms](https://img.shields.io/conda/pn/conda-forge/pyscipopt?logo=conda-forge)](https://anaconda.org/conda-forge/pyscipopt)
27
27
 
28
+ ***DO NOT USE THE CONDA BASE ENVIRONMENT TO INSTALL PYSCIPOPT.***
29
+
28
30
  Conda will install SCIP automatically, hence everything can be installed in a single command:
29
31
  ```bash
30
32
  conda install --channel conda-forge pyscipopt
@@ -70,7 +72,7 @@ from pyscipopt import Model
70
72
  model = Model("Example") # model name is optional
71
73
  ```
72
74
 
73
- 3) Access the methods in the `scip.pyx` file using the solver/model
75
+ 3) Access the methods in the `scip.pxi` file using the solver/model
74
76
  instance `model`, e.g.:
75
77
 
76
78
  ``` {.sourceCode .python}
@@ -106,7 +108,7 @@ may also extend it to increase the functionality of this interface. The
106
108
  following will provide some directions on how this can be achieved:
107
109
 
108
110
  The two most important files in PySCIPOpt are the `scip.pxd` and
109
- `scip.pyx`. These two files specify the public functions of SCIP that
111
+ `scip.pxi`. These two files specify the public functions of SCIP that
110
112
  can be accessed from your python code.
111
113
 
112
114
  To make PySCIPOpt aware of the public functions you would like to
@@ -120,7 +122,7 @@ be done in order to properly add the functions:
120
122
 
121
123
  After following the previous two steps, it is then possible to create
122
124
  functions in python that reference the SCIP public functions included in
123
- `scip.pxd`. This is achieved by modifying the `scip.pyx` file to add the
125
+ `scip.pxd`. This is achieved by modifying the `scip.pxi` file to add the
124
126
  functionality you require.
125
127
 
126
128
  We are always happy to accept pull request containing patches or
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ['setuptools', 'cython <3, >=0.21']
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.cibuildwheel]
6
+ skip="pp* cp312*" # currently doesn't work with PyPy or CPython 3.12
7
+
8
+
9
+ [tool.cibuildwheel.linux]
10
+ skip="pp* cp312* *musllinux*"
11
+ before-all = [
12
+ "(apt-get update && apt-get install --yes wget) || yum install -y wget zlib libgfortran || brew install wget",
13
+ "wget https://github.com/mmghannam/scip/releases/download/v8.0.3/libscip-centos.zip -O scip.zip",
14
+ "unzip scip.zip",
15
+ "mv scip_install scip"
16
+ ]
17
+ environment = { SCIPOPTDIR="$(pwd)/scip", LD_LIBRARY_PATH="$(pwd)/scip/lib:LD_LIBRARY_PATH", DYLD_LIBRARY_PATH="$(pwd)/scip/lib:$DYLD_LIBRARY_PATH", PATH="$(pwd)/scip/bin:$PATH", PKG_CONFIG_PATH="$(pwd)/scip/lib/pkgconfig:$PKG_CONFIG_PATH"}
18
+
19
+
20
+ [tool.cibuildwheel.macos]
21
+ skip="pp* cp312*"
22
+ before-all = [
23
+ "brew install wget zlib gcc",
24
+ "wget https://github.com/mmghannam/scip/releases/download/v8.0.3/libscip-macos.zip -O scip.zip",
25
+ "unzip scip.zip",
26
+ "mv scip_install src/scip"
27
+ ]
28
+ environment = { SCIPOPTDIR="$(pwd)/src/scip", LD_LIBRARY_PATH="$(pwd)/src/scip/lib:LD_LIBRARY_PATH", DYLD_LIBRARY_PATH="$(pwd)/src/scip/lib:$DYLD_LIBRARY_PATH", PATH="$(pwd)/src/scip/bin:$PATH", PKG_CONFIG_PATH="$(pwd)/src/scip/lib/pkgconfig:$PKG_CONFIG_PATH"}
29
+ repair-wheel-command = [
30
+ "delocate-listdeps {wheel}",
31
+ "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}",
32
+ ]
33
+
34
+
35
+ [tool.cibuildwheel.windows]
36
+ skip="pp* cp36* cp37* cp312*"
37
+ before-all = [
38
+ "choco install 7zip wget",
39
+ "wget https://github.com/mmghannam/scip/releases/download/v8.0.3/libscip-windows.zip -O scip.zip",
40
+ "\"C:\\Program Files\\7-Zip\\7z.exe\" x \"scip.zip\" -o\"scip-test\"",
41
+ "mv .\\scip-test\\scip_install .\\test",
42
+ "mv .\\test .\\scip"
43
+ ]
44
+ before-build = "pip install delvewheel"
45
+ environment = { SCIPOPTDIR='D:\\a\\PySCIPOpt\\PySCIPOpt\\scip' }
46
+ repair-wheel-command = "delvewheel repair --add-path c:/bin;c:/lib;c:/bin/src;c:/lib/src;D:/a/PySCIPOpt/PySCIPOpt/scip/;D:/a/PySCIPOpt/PySCIPOpt/scip/lib/;D:/a/PySCIPOpt/PySCIPOpt/scip/bin/ -w {dest_dir} {wheel}"
@@ -9,8 +9,12 @@ extra_link_args = []
9
9
 
10
10
  # if SCIPOPTDIR is not set, we assume that SCIP is installed globally
11
11
  if not scipoptdir:
12
- includedir = "."
13
- libdir = "."
12
+ if platform.system() == "Darwin":
13
+ includedir = "/usr/local/include/"
14
+ libdir = "/usr/local/lib/"
15
+ else:
16
+ includedir = "."
17
+ libdir = "."
14
18
  libname = "libscip" if platform.system() in ["Windows"] else "scip"
15
19
  print("Assuming that SCIP is installed globally, because SCIPOPTDIR is undefined.\n")
16
20
 
@@ -84,6 +88,8 @@ if not os.path.exists(os.path.join(packagedir, "scip.pyx")):
84
88
 
85
89
  ext = ".pyx" if use_cython else ".c"
86
90
 
91
+ on_github_actions = os.getenv('GITHUB_ACTIONS') == 'true'
92
+
87
93
  extensions = [
88
94
  Extension(
89
95
  "pyscipopt.scip",
@@ -93,18 +99,19 @@ extensions = [
93
99
  libraries=[libname],
94
100
  extra_compile_args=extra_compile_args,
95
101
  extra_link_args=extra_link_args,
102
+ define_macros= [("CYTHON_TRACE_NOGIL", 1), ("CYTHON_TRACE", 1)] if on_github_actions else []
96
103
  )
97
104
  ]
98
105
 
99
106
  if use_cython:
100
- extensions = cythonize(extensions, compiler_directives={"language_level": 3})
107
+ extensions = cythonize(extensions, compiler_directives={"language_level": 3, "linetrace": on_github_actions})
101
108
 
102
109
  with open("README.md") as f:
103
110
  long_description = f.read()
104
111
 
105
112
  setup(
106
113
  name="PySCIPOpt",
107
- version=version,
114
+ version="4.4.0",
108
115
  description="Python interface and modeling environment for SCIP",
109
116
  long_description=long_description,
110
117
  long_description_content_type="text/markdown",
@@ -122,8 +129,8 @@ setup(
122
129
  "Topic :: Scientific/Engineering :: Mathematics",
123
130
  ],
124
131
  ext_modules=extensions,
125
- install_requires=["wheel"],
126
132
  packages=["pyscipopt"],
127
133
  package_dir={"pyscipopt": packagedir},
128
- package_data={"pyscipopt": ["scip.pyx", "scip.pxd", "*.pxi"]},
134
+ package_data={"pyscipopt": ["scip.pyx", "scip.pxd", "*.pxi", "scip/lib/*"]},
135
+ include_package_data=True,
129
136
  )
@@ -1,4 +1,4 @@
1
- __version__ = '4.2.0'
1
+ __version__ = '4.4.0'
2
2
 
3
3
  # required for Python 3.8 on Windows
4
4
  import os
@@ -28,6 +28,8 @@ from pyscipopt.scip import quickprod
28
28
  from pyscipopt.scip import exp
29
29
  from pyscipopt.scip import log
30
30
  from pyscipopt.scip import sqrt
31
+ from pyscipopt.scip import sin
32
+ from pyscipopt.scip import cos
31
33
  from pyscipopt.scip import PY_SCIP_RESULT as SCIP_RESULT
32
34
  from pyscipopt.scip import PY_SCIP_PARAMSETTING as SCIP_PARAMSETTING
33
35
  from pyscipopt.scip import PY_SCIP_PARAMEMPHASIS as SCIP_PARAMEMPHASIS
@@ -25,18 +25,17 @@ cdef class Branchrule:
25
25
 
26
26
  def branchexeclp(self, allowaddcons):
27
27
  '''executes branching rule for fractional LP solution'''
28
- # this method needs to be implemented by the user
29
- return {}
28
+ raise NotImplementedError("branchexeclp() is a fundamental callback and should be implemented in the derived "
29
+ "class")
30
30
 
31
31
  def branchexecext(self, allowaddcons):
32
32
  '''executes branching rule for external branching candidates '''
33
- # this method needs to be implemented by the user
34
- return {}
33
+ raise NotImplementedError("branchexecext() is a fundamental callback and should be implemented in the derived class")
35
34
 
36
35
  def branchexecps(self, allowaddcons):
37
36
  '''executes branching rule for not completely fixed pseudo solution '''
38
37
  # this method needs to be implemented by the user
39
- return {}
38
+ raise NotImplementedError("branchexecps() is a fundamental callback and should be implemented in the derived class")
40
39
 
41
40
 
42
41
 
@@ -77,7 +77,7 @@ def _expr_richcmp(self, other, op):
77
77
  else:
78
78
  raise NotImplementedError
79
79
  else:
80
- raise NotImplementedError
80
+ raise NotImplementedError("Can only support constraints with '<=', '>=', or '=='.")
81
81
 
82
82
 
83
83
  class Term:
@@ -376,7 +376,7 @@ def quickprod(termlist):
376
376
  class Op:
377
377
  const = 'const'
378
378
  varidx = 'var'
379
- exp, log, sqrt = 'exp','log', 'sqrt'
379
+ exp, log, sqrt, sin, cos = 'exp', 'log', 'sqrt', 'sin', 'cos'
380
380
  plus, minus, mul, div, power = '+', '-', '*', '/', '**'
381
381
  add = 'sum'
382
382
  prod = 'prod'
@@ -601,7 +601,7 @@ cdef class PowExpr(GenExpr):
601
601
  def __repr__(self):
602
602
  return self._op + "(" + self.children[0].__repr__() + "," + str(self.expo) + ")"
603
603
 
604
- # Exp, Log, Sqrt Expressions
604
+ # Exp, Log, Sqrt, Sin, Cos Expressions
605
605
  cdef class UnaryExpr(GenExpr):
606
606
  def __init__(self, op, expr):
607
607
  self.children = []
@@ -629,6 +629,12 @@ def log(expr):
629
629
  def sqrt(expr):
630
630
  """returns expression with sqrt-function"""
631
631
  return UnaryExpr(Operator.sqrt, buildGenExprObj(expr))
632
+ def sin(expr):
633
+ """returns expression with sin-function"""
634
+ return UnaryExpr(Operator.sin, buildGenExprObj(expr))
635
+ def cos(expr):
636
+ """returns expression with cos-function"""
637
+ return UnaryExpr(Operator.cos, buildGenExprObj(expr))
632
638
 
633
639
  def expr_to_nodes(expr):
634
640
  '''transforms tree to an array of nodes. each node is an operator and the position of the
@@ -25,12 +25,11 @@ cdef class Pricer:
25
25
 
26
26
  def pricerredcost(self):
27
27
  '''calls reduced cost pricing method of variable pricer'''
28
- print("python error in pricerredcost: this method needs to be implemented")
29
- return {}
30
-
28
+ raise NotImplementedError("pricerredcost() is a fundamental callback and should be implemented in the derived class")
29
+
31
30
  def pricerfarkas(self):
32
31
  '''calls Farkas pricing method of variable pricer'''
33
- return {}
32
+ raise NotImplementedError("pricerfarkas() is a fundamental callback and should be implemented in the derived class")
34
33
 
35
34
 
36
35
 
@@ -28,7 +28,7 @@ cdef class Relax:
28
28
  '''callls execution method of relaxation handler'''
29
29
  print("python error in relaxexec: this method needs to be implemented")
30
30
  return{}
31
-
31
+
32
32
 
33
33
  cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax) with gil:
34
34
  return SCIP_OKAY
@@ -73,6 +73,8 @@ cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbo
73
73
  cdef SCIP_RELAXDATA* relaxdata
74
74
  relaxdata = SCIPrelaxGetData(relax)
75
75
  PyRelax = <Relax>relaxdata
76
- PyRelax.relaxexec()
77
- return SCIP_OKAY
78
-
76
+ result_dict = PyRelax.relaxexec()
77
+ assert isinstance(result_dict, dict), "relaxexec() must return a dictionary."
78
+ lowerbound[0] = result_dict.get("lowerbound", <SCIP_Real>lowerbound[0])
79
+ result[0] = result_dict.get("result", <SCIP_RESULT>result[0])
80
+ return SCIP_OKAY