passagemath-glpk 10.6.39__cp312-cp312-win_amd64.whl
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.
Potentially problematic release.
This version of passagemath-glpk might be problematic. Click here for more details.
- passagemath_glpk/__init__.py +3 -0
- passagemath_glpk-10.6.39.dist-info/DELVEWHEEL +2 -0
- passagemath_glpk-10.6.39.dist-info/METADATA +102 -0
- passagemath_glpk-10.6.39.dist-info/RECORD +31 -0
- passagemath_glpk-10.6.39.dist-info/WHEEL +5 -0
- passagemath_glpk-10.6.39.dist-info/top_level.txt +3 -0
- passagemath_glpk.libs/libgcc_s_seh-1-bbef70ff32dc86f897fc23701edb828e.dll +0 -0
- passagemath_glpk.libs/libglpk-40-099cbe1945b41080a6e0c3ae67ca485c.dll +0 -0
- passagemath_glpk.libs/libgmp-10-c5253895fc7c5250c60357174b2254ea.dll +0 -0
- passagemath_glpk.libs/libwinpthread-1-473d22253a557d17894ea0588f37c4f8.dll +0 -0
- sage/all__sagemath_glpk.py +11 -0
- sage/libs/all__sagemath_glpk.py +1 -0
- sage/libs/glpk/__init__.py +1 -0
- sage/libs/glpk/constants.pxd +94 -0
- sage/libs/glpk/env.pxd +14 -0
- sage/libs/glpk/graph.pxd +43 -0
- sage/libs/glpk/lp.pxd +95 -0
- sage/libs/glpk/types.pxd +87 -0
- sage/numerical/all__sagemath_glpk.py +1 -0
- sage/numerical/backends/all__sagemath_glpk.py +1 -0
- sage/numerical/backends/glpk_backend.cp312-win_amd64.pyd +0 -0
- sage/numerical/backends/glpk_backend.pxd +41 -0
- sage/numerical/backends/glpk_backend.pyx +3359 -0
- sage/numerical/backends/glpk_backend_test.py +13 -0
- sage/numerical/backends/glpk_exact_backend.cp312-win_amd64.pyd +0 -0
- sage/numerical/backends/glpk_exact_backend.pxd +17 -0
- sage/numerical/backends/glpk_exact_backend.pyx +190 -0
- sage/numerical/backends/glpk_exact_backend_test.py +12 -0
- sage/numerical/backends/glpk_graph_backend.cp312-win_amd64.pyd +0 -0
- sage/numerical/backends/glpk_graph_backend.pxd +56 -0
- sage/numerical/backends/glpk_graph_backend.pyx +1346 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Version: 1.11.2
|
|
2
|
+
Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-1ibvncm_\\cp312-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-vv', '--custom-patch', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-1ibvncm_\\cp312-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-1ibvncm_\\cp312-win_amd64\\built_wheel\\passagemath_glpk-10.6.39-cp312-cp312-win_amd64.whl']
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: passagemath-glpk
|
|
3
|
+
Version: 10.6.39
|
|
4
|
+
Summary: passagemath: Linear and mixed integer linear optimization backend using GLPK
|
|
5
|
+
Author-email: The Sage Developers <sage-support@googlegroups.com>
|
|
6
|
+
Maintainer: Matthias Köppe, passagemath contributors
|
|
7
|
+
License-Expression: GPL-2.0-or-later
|
|
8
|
+
Project-URL: release notes, https://github.com/passagemath/passagemath/releases
|
|
9
|
+
Project-URL: repo (upstream), https://github.com/sagemath/sage
|
|
10
|
+
Project-URL: repo, https://github.com/passagemath/passagemath
|
|
11
|
+
Project-URL: documentation, https://passagemath.org/docs/latest
|
|
12
|
+
Project-URL: homepage (upstream), https://www.sagemath.org
|
|
13
|
+
Project-URL: discourse, https://passagemath.discourse.group
|
|
14
|
+
Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
|
|
15
|
+
Project-URL: tracker, https://github.com/passagemath/passagemath/issues
|
|
16
|
+
Classifier: Development Status :: 6 - Mature
|
|
17
|
+
Classifier: Intended Audience :: Education
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Classifier: Operating System :: POSIX
|
|
20
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
22
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
23
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
28
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
29
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
30
|
+
Requires-Python: <3.15,>=3.10
|
|
31
|
+
Description-Content-Type: text/x-rst
|
|
32
|
+
Requires-Dist: passagemath-objects~=10.6.39.0
|
|
33
|
+
Requires-Dist: memory_allocator
|
|
34
|
+
Requires-Dist: cysignals<1.12.4; sys_platform == "win32"
|
|
35
|
+
Requires-Dist: cysignals!=1.12.0,>=1.11.2
|
|
36
|
+
Provides-Extra: test
|
|
37
|
+
|
|
38
|
+
=========================================================================================================
|
|
39
|
+
passagemath: Linear and mixed integer linear optimization backend using GLPK
|
|
40
|
+
=========================================================================================================
|
|
41
|
+
|
|
42
|
+
`passagemath <https://github.com/passagemath/passagemath>`__ is open
|
|
43
|
+
source mathematical software in Python, released under the GNU General
|
|
44
|
+
Public Licence GPLv2+.
|
|
45
|
+
|
|
46
|
+
It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
|
|
47
|
+
developed 2005-2025 under the motto “Creating a Viable Open Source
|
|
48
|
+
Alternative to Magma, Maple, Mathematica, and MATLAB”.
|
|
49
|
+
|
|
50
|
+
The passagemath fork uses the motto "Creating a Free Passage Between the
|
|
51
|
+
Scientific Python Ecosystem and Mathematical Software Communities."
|
|
52
|
+
It was created in October 2024 with the following goals:
|
|
53
|
+
|
|
54
|
+
- providing modularized installation with pip,
|
|
55
|
+
- establishing first-class membership in the scientific Python
|
|
56
|
+
ecosystem,
|
|
57
|
+
- giving `clear attribution of upstream
|
|
58
|
+
projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
|
|
59
|
+
- providing independently usable Python interfaces to upstream
|
|
60
|
+
libraries,
|
|
61
|
+
- offering `platform portability and integration testing
|
|
62
|
+
services <https://github.com/passagemath/passagemath/issues/704>`__
|
|
63
|
+
to upstream projects,
|
|
64
|
+
- inviting collaborations with upstream projects,
|
|
65
|
+
- `building a professional, respectful, inclusive
|
|
66
|
+
community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
|
|
67
|
+
- `empowering Sage users to participate in the scientific Python ecosystem
|
|
68
|
+
<https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
|
|
69
|
+
- developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
|
|
70
|
+
serverless deployment with Javascript,
|
|
71
|
+
- developing a native Windows port.
|
|
72
|
+
|
|
73
|
+
`Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
|
|
74
|
+
available online.
|
|
75
|
+
|
|
76
|
+
passagemath attempts to support and provides binary wheels suitable for
|
|
77
|
+
all major Linux distributions and recent versions of macOS.
|
|
78
|
+
|
|
79
|
+
Binary wheels for native Windows (x86_64) are are available for a subset of
|
|
80
|
+
the passagemath distributions. Use of the full functionality of passagemath
|
|
81
|
+
on Windows currently requires the use of Windows Subsystem for Linux (WSL)
|
|
82
|
+
or virtualization.
|
|
83
|
+
|
|
84
|
+
The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.13.x.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
About this pip-installable distribution package
|
|
88
|
+
-----------------------------------------------
|
|
89
|
+
|
|
90
|
+
This pip-installable distribution ``passagemath-glpk`` provides
|
|
91
|
+
a backend for linear and mixed integer linear optimization backend using GLPK.
|
|
92
|
+
|
|
93
|
+
It can be installed as an extra of the distribution
|
|
94
|
+
`sagemath-polyhedra <https://pypi.org/project/sagemath-polyhedra>`_::
|
|
95
|
+
|
|
96
|
+
$ pip install "passagemath-polyhedra[glpk]"
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
What is included
|
|
100
|
+
----------------
|
|
101
|
+
|
|
102
|
+
* `GLPK backends <https://passagemath.org/docs/latest/html/en/reference/numerical/index.html#linear-optimization-lp-and-mixed-integer-linear-optimization-mip-solver-backends>`_ for LP, MILP, and graphs
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
passagemath_glpk/__init__.py,sha256=T64ZlRcuaZwmbPhLlAIiximry2X2ntgQvL-4NdRMCzo,82
|
|
2
|
+
passagemath_glpk-10.6.39.dist-info/DELVEWHEEL,sha256=116I5pc6lf_eyV31POCcknGky6pbZLcBJux9oAnYn0c,436
|
|
3
|
+
passagemath_glpk-10.6.39.dist-info/METADATA,sha256=6MBW-_pSHWo0pbLcvupcOEv94HEJE59MdxbKkQQiuis,4965
|
|
4
|
+
passagemath_glpk-10.6.39.dist-info/RECORD,,
|
|
5
|
+
passagemath_glpk-10.6.39.dist-info/top_level.txt,sha256=oHagucvL9dKQDkuSfaOi6hPiZ8ubLr_lZX0Wp_JvzLE,23
|
|
6
|
+
passagemath_glpk-10.6.39.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
|
7
|
+
passagemath_glpk.libs/libgcc_s_seh-1-bbef70ff32dc86f897fc23701edb828e.dll,sha256=4LFArFx7pKYIZL2FIWlAvr9mDSX1i1j-H28N3VgQ2_4,150196
|
|
8
|
+
passagemath_glpk.libs/libglpk-40-099cbe1945b41080a6e0c3ae67ca485c.dll,sha256=rJxNbVJBgJO6PMGOXGQKM4GHPIUbOn-6g7jcVswzVr8,3811834
|
|
9
|
+
passagemath_glpk.libs/libgmp-10-c5253895fc7c5250c60357174b2254ea.dll,sha256=xSU4lfx8UlDGA1cXSyJU6vifu1YOvgD7yV7wiwvW3jY,3004991
|
|
10
|
+
passagemath_glpk.libs/libwinpthread-1-473d22253a557d17894ea0588f37c4f8.dll,sha256=Rz0iJTpVfReJTqBYjzfE-GcVLiKIafPXotgL2ZpACRI,64915
|
|
11
|
+
sage/all__sagemath_glpk.py,sha256=eVWCMus1MozBRfTg1D4FVIGGA5V57MWeTYyavtWt_iw,362
|
|
12
|
+
sage/libs/all__sagemath_glpk.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
|
|
13
|
+
sage/libs/glpk/constants.pxd,sha256=C-LZEzI2HnMF5NSKp9-OO8UoPLjtIsgfdF-biNkIzmY,2146
|
|
14
|
+
sage/libs/glpk/env.pxd,sha256=KPa7e71MZTB8prxxl0s2Za5zwPHI0yz5mHi1rOsF15o,532
|
|
15
|
+
sage/libs/glpk/graph.pxd,sha256=kBT71y0qJmV0X5pxM4lBhIvE9p1hvqC_559nYrJqzdc,2249
|
|
16
|
+
sage/libs/glpk/lp.pxd,sha256=cprSbx4WwOsTbqw56AQ4VDNKQnaeuVlF3ERy5gpHkIo,4106
|
|
17
|
+
sage/libs/glpk/types.pxd,sha256=lyEVk-aeb-JOKLQK5hoL6sUh2iyKxxTCfBkU3rTzbUM,2221
|
|
18
|
+
sage/libs/glpk/__init__.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
|
|
19
|
+
sage/numerical/all__sagemath_glpk.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
|
|
20
|
+
sage/numerical/backends/all__sagemath_glpk.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
|
|
21
|
+
sage/numerical/backends/glpk_backend.cp312-win_amd64.pyd,sha256=Rz4OzC1VEQ7tQyeaBmESwnLYucIuAHcJf5G-PbQ08rI,257024
|
|
22
|
+
sage/numerical/backends/glpk_backend.pxd,sha256=yIMM0Hp5VBQCC13XftzoythuC_-fhC8mSTWVvndm-9Y,1648
|
|
23
|
+
sage/numerical/backends/glpk_backend.pyx,sha256=bMh6yLeqVMvpSJjbbqT6PWR-i1h7_t00t4bHLYZNEgA,116403
|
|
24
|
+
sage/numerical/backends/glpk_backend_test.py,sha256=6LGR9U7heVJgBe01vxsXY8CR1Jbqp9-Uri7DACe5H4k,437
|
|
25
|
+
sage/numerical/backends/glpk_exact_backend.cp312-win_amd64.pyd,sha256=JanSMpZkn6qeYOYf8Fo0EhINgwgbdrjDcU-L8UXejHw,44032
|
|
26
|
+
sage/numerical/backends/glpk_exact_backend.pxd,sha256=hsev_ABrT2yLIUWlRoV2J1qvb7wThR9gib_1AdMfWbY,960
|
|
27
|
+
sage/numerical/backends/glpk_exact_backend.pyx,sha256=7GwedKeN5L9xtXFXciJQFbOQ7fg1M6YPbueVxCkuGpE,6817
|
|
28
|
+
sage/numerical/backends/glpk_exact_backend_test.py,sha256=okdLqxEYMiTO8HCWu8fkjah6cj4sa9HIeff2s_4K8BU,447
|
|
29
|
+
sage/numerical/backends/glpk_graph_backend.cp312-win_amd64.pyd,sha256=jeyeLyLegpicS17ZwJsidmOzKYyZo5ZrnNflMHdKAKY,134144
|
|
30
|
+
sage/numerical/backends/glpk_graph_backend.pxd,sha256=xoDnzL_yC5Xu_JGZE30MXVmcaFv_2_gHcspR3Ko8Xuc,2027
|
|
31
|
+
sage/numerical/backends/glpk_graph_backend.pyx,sha256=1kZzrxrhpTwctBTKhVoiA6C-WTt_pgpkcaX1uwvG-A0,46343
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
2
|
+
# start delvewheel patch
|
|
3
|
+
def _delvewheel_patch_1_11_2():
|
|
4
|
+
import os
|
|
5
|
+
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'passagemath_glpk.libs'))):
|
|
6
|
+
os.add_dll_directory(libs_dir)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
_delvewheel_patch_1_11_2()
|
|
10
|
+
del _delvewheel_patch_1_11_2
|
|
11
|
+
# end delvewheel patch
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
2
|
+
#*****************************************************************************
|
|
3
|
+
# Copyright (C) 2010 Nathann Cohen <nathann.cohen@gmail.com>
|
|
4
|
+
# Copyright (C) 2015 Jeroen Demeyer <jdemeyer@cage.ugent.be>
|
|
5
|
+
#
|
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
# http://www.gnu.org/licenses/
|
|
11
|
+
#*****************************************************************************
|
|
12
|
+
|
|
13
|
+
cdef extern from "glpk.h":
|
|
14
|
+
# constants for smcp control
|
|
15
|
+
int GLP_MSG_OFF
|
|
16
|
+
int GLP_MSG_ERR
|
|
17
|
+
int GLP_MSG_ON
|
|
18
|
+
int GLP_MSG_ALL
|
|
19
|
+
|
|
20
|
+
int GLP_PRIMAL
|
|
21
|
+
int GLP_DUALP
|
|
22
|
+
int GLP_DUAL
|
|
23
|
+
|
|
24
|
+
int GLP_PT_STD
|
|
25
|
+
int GLP_PT_PSE
|
|
26
|
+
|
|
27
|
+
int GLP_RT_STD
|
|
28
|
+
int GLP_RT_HAR
|
|
29
|
+
|
|
30
|
+
int GLP_ON
|
|
31
|
+
int GLP_OFF
|
|
32
|
+
|
|
33
|
+
# constants for iocp control, not already in simplex
|
|
34
|
+
int GLP_BR_FFV
|
|
35
|
+
int GLP_BR_LFV
|
|
36
|
+
int GLP_BR_MFV
|
|
37
|
+
int GLP_BR_DTH
|
|
38
|
+
int GLP_BR_PCH
|
|
39
|
+
|
|
40
|
+
int GLP_BT_DFS
|
|
41
|
+
int GLP_BT_BFS
|
|
42
|
+
int GLP_BT_BLB
|
|
43
|
+
int GLP_BT_BPH
|
|
44
|
+
|
|
45
|
+
int GLP_PP_NONE
|
|
46
|
+
int GLP_PP_ROOT
|
|
47
|
+
int GLP_PP_ALL
|
|
48
|
+
|
|
49
|
+
# error codes
|
|
50
|
+
int GLP_EBADB
|
|
51
|
+
int GLP_ESING
|
|
52
|
+
int GLP_ECOND
|
|
53
|
+
int GLP_EBOUND
|
|
54
|
+
int GLP_EFAIL
|
|
55
|
+
int GLP_EOBJLL
|
|
56
|
+
int GLP_EOBJUL
|
|
57
|
+
int GLP_EITLIM
|
|
58
|
+
int GLP_ETMLIM
|
|
59
|
+
int GLP_ENOPFS
|
|
60
|
+
int GLP_ENODFS
|
|
61
|
+
int GLP_EROOT
|
|
62
|
+
int GLP_ESTOP
|
|
63
|
+
int GLP_EMIPGAP
|
|
64
|
+
int GLP_EDATA
|
|
65
|
+
int GLP_ERANGE
|
|
66
|
+
|
|
67
|
+
int GLP_UNDEF
|
|
68
|
+
int GLP_OPT
|
|
69
|
+
int GLP_FEAS
|
|
70
|
+
int GLP_NOFEAS
|
|
71
|
+
int GLP_INFEAS
|
|
72
|
+
int GLP_UNBND
|
|
73
|
+
|
|
74
|
+
# other constants
|
|
75
|
+
int GLP_MAX
|
|
76
|
+
int GLP_MIN
|
|
77
|
+
int GLP_UP
|
|
78
|
+
int GLP_FR
|
|
79
|
+
int GLP_DB
|
|
80
|
+
int GLP_FX
|
|
81
|
+
int GLP_LO
|
|
82
|
+
int GLP_CV
|
|
83
|
+
int GLP_IV
|
|
84
|
+
int GLP_BV
|
|
85
|
+
int GLP_MPS_DECK
|
|
86
|
+
int GLP_MPS_FILE
|
|
87
|
+
|
|
88
|
+
int GLP_MSG_DBG
|
|
89
|
+
|
|
90
|
+
int GLP_BS # basic variable
|
|
91
|
+
int GLP_NL # non-basic variable on lower bound
|
|
92
|
+
int GLP_NU # non-basic variable on upper bound
|
|
93
|
+
int GLP_NF # non-basic free (unbounded) variable
|
|
94
|
+
int GLP_NS # non-basic fixed variable
|
sage/libs/glpk/env.pxd
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
2
|
+
# distutils: libraries = glpk ZLIB_LIBRARIES gmp
|
|
3
|
+
|
|
4
|
+
cdef extern from "glpk.h":
|
|
5
|
+
int glp_init_env()
|
|
6
|
+
int glp_free_env()
|
|
7
|
+
int glp_term_out(int flag)
|
|
8
|
+
void glp_term_hook(int (*func)(void *info, const char *s), void *info)
|
|
9
|
+
int glp_open_tee(const char *fname)
|
|
10
|
+
int glp_close_tee()
|
|
11
|
+
void glp_error_hook(void (*func)(void *info), void *info)
|
|
12
|
+
int glp_at_error()
|
|
13
|
+
void glp_mem_limit(int limit)
|
|
14
|
+
void glp_mem_usage(int *count, int *cpeak, size_t *total, size_t *tpeak)
|
sage/libs/glpk/graph.pxd
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
2
|
+
# distutils: libraries = glpk ZLIB_LIBRARIES gmp
|
|
3
|
+
|
|
4
|
+
#*****************************************************************************
|
|
5
|
+
# Copyright (C) 2012 Christian Kuper <christian.kuper@t-online.de>
|
|
6
|
+
# Copyright (C) 2015 Jeroen Demeyer <jdemeyer@cage.ugent.be>
|
|
7
|
+
#
|
|
8
|
+
# This program is free software: you can redistribute it and/or modify
|
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
|
10
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
11
|
+
# (at your option) any later version.
|
|
12
|
+
# http://www.gnu.org/licenses/
|
|
13
|
+
#*****************************************************************************
|
|
14
|
+
|
|
15
|
+
from sage.libs.glpk.types cimport *
|
|
16
|
+
|
|
17
|
+
cdef extern from "glpk.h":
|
|
18
|
+
glp_graph *glp_create_graph(int v_size, int a_size)
|
|
19
|
+
void glp_set_graph_name(glp_graph *G, char *name)
|
|
20
|
+
int glp_add_vertices(glp_graph *G, int nv)
|
|
21
|
+
void glp_set_vertex_name(glp_graph *G, int i, char *name)
|
|
22
|
+
glp_arc *glp_add_arc(glp_graph *G, int i, int j)
|
|
23
|
+
void glp_del_vertices(glp_graph *G, int ndel, int num[])
|
|
24
|
+
void glp_del_arc(glp_graph *G, glp_arc *a)
|
|
25
|
+
void glp_delete_graph(glp_graph *G)
|
|
26
|
+
void glp_create_v_index(glp_graph *G)
|
|
27
|
+
int glp_find_vertex(glp_graph *G, char *name)
|
|
28
|
+
int glp_read_graph(glp_graph *G, char *fname)
|
|
29
|
+
int glp_write_graph(glp_graph *G, char *fname)
|
|
30
|
+
int glp_read_ccdata(glp_graph *G, int v_wgt, char *fname)
|
|
31
|
+
int glp_write_ccdata(glp_graph *G, int v_wgt, char *fname)
|
|
32
|
+
int glp_read_mincost(glp_graph *G, int v_rhs, int a_low,
|
|
33
|
+
int a_cap, int a_cost, char *fname)
|
|
34
|
+
int glp_write_mincost(glp_graph *G, int v_rhs, int a_low,
|
|
35
|
+
int a_cap, int a_cost, char *fname)
|
|
36
|
+
int glp_mincost_okalg(glp_graph *G, int v_rhs, int a_low, int a_cap,
|
|
37
|
+
int a_cost, double *sol, int a_x, int v_pi)
|
|
38
|
+
int glp_read_maxflow(glp_graph *G, int *s, int *t,
|
|
39
|
+
int a_cap, char *fname)
|
|
40
|
+
int glp_write_maxflow(glp_graph *G, int s, int t, int a_cap, char *fname)
|
|
41
|
+
int glp_maxflow_ffalg(glp_graph *G, int s, int t, int a_cap,
|
|
42
|
+
double *sol, int a_x, int v_cut)
|
|
43
|
+
double glp_cpp(glp_graph *G, int v_t, int v_es, int v_ls)
|
sage/libs/glpk/lp.pxd
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
2
|
+
# distutils: libraries = glpk ZLIB_LIBRARIES gmp
|
|
3
|
+
|
|
4
|
+
#*****************************************************************************
|
|
5
|
+
# Copyright (C) 2010 Nathann Cohen <nathann.cohen@gmail.com>
|
|
6
|
+
# Copyright (C) 2015 Jeroen Demeyer <jdemeyer@cage.ugent.be>
|
|
7
|
+
#
|
|
8
|
+
# This program is free software: you can redistribute it and/or modify
|
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
|
10
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
11
|
+
# (at your option) any later version.
|
|
12
|
+
# http://www.gnu.org/licenses/
|
|
13
|
+
#*****************************************************************************
|
|
14
|
+
|
|
15
|
+
from sage.libs.glpk.types cimport *
|
|
16
|
+
|
|
17
|
+
cdef extern from "glpk.h":
|
|
18
|
+
void glp_init_iocp(glp_iocp *)
|
|
19
|
+
void glp_init_smcp(glp_smcp *)
|
|
20
|
+
glp_prob * glp_create_prob()
|
|
21
|
+
void glp_set_prob_name(glp_prob *, char *)
|
|
22
|
+
const char* glp_get_prob_name(glp_prob *)
|
|
23
|
+
void glp_set_obj_dir(glp_prob *, int)
|
|
24
|
+
void glp_add_rows(glp_prob *, int)
|
|
25
|
+
void glp_add_cols(glp_prob *, int)
|
|
26
|
+
void glp_del_rows(glp_prob *, int, int *)
|
|
27
|
+
void glp_set_row_name(glp_prob *, int, char *)
|
|
28
|
+
void glp_set_col_name(glp_prob *, int, char *)
|
|
29
|
+
void glp_set_row_bnds(glp_prob *, int, int, double, double)
|
|
30
|
+
void glp_set_col_bnds(glp_prob *, int, int, double, double)
|
|
31
|
+
void glp_set_obj_coef(glp_prob *, int, double)
|
|
32
|
+
void glp_set_row_stat(glp_prob *, int, int)
|
|
33
|
+
void glp_set_col_stat(glp_prob *, int, int)
|
|
34
|
+
int glp_warm_up(glp_prob *)
|
|
35
|
+
void glp_load_matrix(glp_prob *, int, int *, int *, double *)
|
|
36
|
+
int glp_simplex(glp_prob *, glp_smcp *)
|
|
37
|
+
int glp_exact(glp_prob *, glp_smcp *)
|
|
38
|
+
int glp_intopt(glp_prob *, glp_iocp *)
|
|
39
|
+
int lpx_intopt(glp_prob *)
|
|
40
|
+
void glp_std_basis(glp_prob *)
|
|
41
|
+
void glp_delete_prob(glp_prob *)
|
|
42
|
+
double glp_get_col_prim(glp_prob *, int)
|
|
43
|
+
double glp_get_obj_val(glp_prob *)
|
|
44
|
+
double glp_get_col_dual(glp_prob *, int)
|
|
45
|
+
double glp_get_row_prim(glp_prob *, int)
|
|
46
|
+
double glp_get_row_dual(glp_prob *, int)
|
|
47
|
+
int glp_get_col_stat(glp_prob *, int)
|
|
48
|
+
int glp_get_row_stat(glp_prob *, int)
|
|
49
|
+
int glp_print_ranges(glp_prob *lp, int,int, int, char *fname)
|
|
50
|
+
int glp_get_num_rows(glp_prob *)
|
|
51
|
+
int glp_get_num_cols(glp_prob *)
|
|
52
|
+
double glp_mip_col_val(glp_prob *, int)
|
|
53
|
+
double glp_mip_obj_val(glp_prob *)
|
|
54
|
+
void glp_set_col_kind(glp_prob *, int, int)
|
|
55
|
+
int glp_write_mps(glp_prob *lp, int fmt, void *parm, char *fname)
|
|
56
|
+
int glp_write_lp(glp_prob *lp, void *parm, char *fname)
|
|
57
|
+
void glp_set_prob_name(glp_prob *lp, char *name)
|
|
58
|
+
void glp_set_obj_name(glp_prob *lp, char *name)
|
|
59
|
+
void glp_set_row_name(glp_prob *lp, int i, char *name)
|
|
60
|
+
void glp_set_col_name(glp_prob *lp, int i, char *name)
|
|
61
|
+
|
|
62
|
+
double glp_get_row_ub(glp_prob *lp, int i)
|
|
63
|
+
double glp_get_row_lb(glp_prob *lp, int i)
|
|
64
|
+
|
|
65
|
+
double glp_get_col_ub(glp_prob *lp, int i)
|
|
66
|
+
double glp_get_col_lb(glp_prob *lp, int i)
|
|
67
|
+
|
|
68
|
+
void glp_set_col_ub(glp_prob *lp, int i, double value)
|
|
69
|
+
void glp_set_col_lb(glp_prob *lp, int i, double value)
|
|
70
|
+
|
|
71
|
+
int glp_eval_tab_row(glp_prob *lp, int k, int ind[], double val[])
|
|
72
|
+
int glp_eval_tab_col(glp_prob *lp, int k, int ind[], double val[])
|
|
73
|
+
|
|
74
|
+
const char* glp_get_row_name(glp_prob *lp, int i)
|
|
75
|
+
const char* glp_get_col_name(glp_prob *lp, int i)
|
|
76
|
+
|
|
77
|
+
void glp_create_index(glp_prob *lp)
|
|
78
|
+
|
|
79
|
+
int glp_get_prim_stat(glp_prob *lp)
|
|
80
|
+
int glp_get_status(glp_prob *lp)
|
|
81
|
+
int glp_mip_status(glp_prob *lp)
|
|
82
|
+
int glp_set_mat_row(glp_prob *lp, int, int, int *, double * )
|
|
83
|
+
int glp_set_mat_col(glp_prob *lp, int, int, int *, double * )
|
|
84
|
+
int glp_get_mat_row(glp_prob *lp, int, int *, double * )
|
|
85
|
+
double glp_get_row_ub(glp_prob *lp, int)
|
|
86
|
+
double glp_get_row_lb(glp_prob *lp, int)
|
|
87
|
+
int glp_get_col_kind(glp_prob *lp, int)
|
|
88
|
+
double glp_get_obj_coef(glp_prob *lp, int)
|
|
89
|
+
int glp_get_obj_dir(glp_prob *lp)
|
|
90
|
+
void glp_copy_prob(glp_prob *dst, glp_prob *src, int names)
|
|
91
|
+
double glp_ios_mip_gap(glp_tree *T)
|
|
92
|
+
int glp_ios_best_node(glp_tree *tree)
|
|
93
|
+
double glp_ios_node_bound(glp_tree *T, int p)
|
|
94
|
+
|
|
95
|
+
int glp_bf_exists(glp_prob *lp)
|
sage/libs/glpk/types.pxd
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
2
|
+
#*****************************************************************************
|
|
3
|
+
# Copyright (C) 2010 Nathann Cohen <nathann.cohen@gmail.com>
|
|
4
|
+
# Copyright (C) 2015 Jeroen Demeyer <jdemeyer@cage.ugent.be>
|
|
5
|
+
#
|
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
# http://www.gnu.org/licenses/
|
|
11
|
+
#*****************************************************************************
|
|
12
|
+
|
|
13
|
+
from libc.stdio cimport FILE
|
|
14
|
+
|
|
15
|
+
cdef extern from "glpk.h":
|
|
16
|
+
ctypedef struct glp_tree
|
|
17
|
+
|
|
18
|
+
ctypedef struct glp_prob
|
|
19
|
+
|
|
20
|
+
ctypedef struct glp_iocp:
|
|
21
|
+
int msg_lev
|
|
22
|
+
int br_tech
|
|
23
|
+
int bt_tech
|
|
24
|
+
int pp_tech
|
|
25
|
+
int fp_heur
|
|
26
|
+
int gmi_cuts
|
|
27
|
+
int mir_cuts
|
|
28
|
+
int cov_cuts
|
|
29
|
+
int clq_cuts
|
|
30
|
+
double tol_int
|
|
31
|
+
double tol_obj
|
|
32
|
+
double mip_gap
|
|
33
|
+
int tm_lim
|
|
34
|
+
int out_frq
|
|
35
|
+
int out_dly
|
|
36
|
+
int presolve
|
|
37
|
+
int binarize
|
|
38
|
+
void (*cb_func)(glp_tree *T, void *info) # callback function
|
|
39
|
+
void *cb_info # callback function input
|
|
40
|
+
|
|
41
|
+
ctypedef struct glp_smcp:
|
|
42
|
+
int msg_lev
|
|
43
|
+
int meth
|
|
44
|
+
int pricing
|
|
45
|
+
int r_test
|
|
46
|
+
double tol_bnd
|
|
47
|
+
double tol_dj
|
|
48
|
+
double tol_piv
|
|
49
|
+
double obj_ll
|
|
50
|
+
double obj_ul
|
|
51
|
+
int it_lim
|
|
52
|
+
int tm_lim
|
|
53
|
+
int out_frq
|
|
54
|
+
int out_dly
|
|
55
|
+
int presolve
|
|
56
|
+
|
|
57
|
+
# Graph structure
|
|
58
|
+
ctypedef struct glp_graph:
|
|
59
|
+
void *pool
|
|
60
|
+
char *name
|
|
61
|
+
int nv_max
|
|
62
|
+
int nv
|
|
63
|
+
int na
|
|
64
|
+
glp_vertex **v
|
|
65
|
+
void *index
|
|
66
|
+
int v_size
|
|
67
|
+
int a_size
|
|
68
|
+
|
|
69
|
+
# Arc structure
|
|
70
|
+
ctypedef struct glp_arc:
|
|
71
|
+
glp_vertex *tail
|
|
72
|
+
glp_vertex *head
|
|
73
|
+
void *data
|
|
74
|
+
void *temp
|
|
75
|
+
glp_arc *t_prev
|
|
76
|
+
glp_arc *t_next
|
|
77
|
+
glp_arc *h_prev
|
|
78
|
+
glp_arc *h_next
|
|
79
|
+
|
|
80
|
+
# Vertex structure
|
|
81
|
+
ctypedef struct glp_vertex:
|
|
82
|
+
int i
|
|
83
|
+
char *name
|
|
84
|
+
void *entry
|
|
85
|
+
void *data
|
|
86
|
+
void *temp
|
|
87
|
+
glp_arc *out
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-glpk
|
|
2
|
+
#*****************************************************************************
|
|
3
|
+
# Copyright (C) 2010 Nathann Cohen <nathann.cohen@gmail.com>
|
|
4
|
+
#
|
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
|
7
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
8
|
+
# (at your option) any later version.
|
|
9
|
+
# http://www.gnu.org/licenses/
|
|
10
|
+
#*****************************************************************************
|
|
11
|
+
|
|
12
|
+
from sage.libs.glpk.types cimport glp_prob, glp_iocp, glp_smcp
|
|
13
|
+
from sage.numerical.backends.generic_backend cimport GenericBackend
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# search_tree_data_t:
|
|
17
|
+
#
|
|
18
|
+
# This structure stores the data gathered by the callback function while the
|
|
19
|
+
# search tree is explored.
|
|
20
|
+
ctypedef struct search_tree_data_t:
|
|
21
|
+
double mip_gap
|
|
22
|
+
double best_bound
|
|
23
|
+
|
|
24
|
+
cdef class GLPKBackend(GenericBackend):
|
|
25
|
+
cdef glp_prob * lp
|
|
26
|
+
cdef glp_iocp * iocp
|
|
27
|
+
cdef glp_smcp * smcp
|
|
28
|
+
cdef int simplex_or_intopt
|
|
29
|
+
cdef search_tree_data_t search_tree_data
|
|
30
|
+
cpdef __copy__(self)
|
|
31
|
+
cpdef int print_ranges(self, filename=*) except -1
|
|
32
|
+
cpdef double get_row_dual(self, int variable) noexcept
|
|
33
|
+
cpdef double get_col_dual(self, int variable) except? -1
|
|
34
|
+
cpdef int get_row_stat(self, int variable) except? -1
|
|
35
|
+
cpdef int get_col_stat(self, int variable) except? -1
|
|
36
|
+
cpdef eval_tab_row(self, int k)
|
|
37
|
+
cpdef eval_tab_col(self, int k)
|
|
38
|
+
cpdef get_row_prim(self, int i)
|
|
39
|
+
cpdef set_row_stat(self, int i, int stat)
|
|
40
|
+
cpdef set_col_stat(self, int j, int stat)
|
|
41
|
+
cpdef int warm_up(self) noexcept
|