passagemath-glpk 10.6.46__cp314-cp314t-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.

Files changed (31) hide show
  1. passagemath_glpk/__init__.py +3 -0
  2. passagemath_glpk-10.6.46.dist-info/DELVEWHEEL +2 -0
  3. passagemath_glpk-10.6.46.dist-info/METADATA +103 -0
  4. passagemath_glpk-10.6.46.dist-info/RECORD +31 -0
  5. passagemath_glpk-10.6.46.dist-info/WHEEL +5 -0
  6. passagemath_glpk-10.6.46.dist-info/top_level.txt +3 -0
  7. passagemath_glpk.libs/libgcc_s_seh-1-8ac28fe21ad5783af7630f2f0c8f554d.dll +0 -0
  8. passagemath_glpk.libs/libglpk-40-a2b083517ab17d71a64901ccf3d73f9d.dll +0 -0
  9. passagemath_glpk.libs/libgmp-10-23decc023ff052bc2d748f1d5bb87892.dll +0 -0
  10. passagemath_glpk.libs/libwinpthread-1-e271f374468d584905afcdf7da96a6ad.dll +0 -0
  11. sage/all__sagemath_glpk.py +11 -0
  12. sage/libs/all__sagemath_glpk.py +1 -0
  13. sage/libs/glpk/__init__.py +1 -0
  14. sage/libs/glpk/constants.pxd +94 -0
  15. sage/libs/glpk/env.pxd +14 -0
  16. sage/libs/glpk/graph.pxd +43 -0
  17. sage/libs/glpk/lp.pxd +95 -0
  18. sage/libs/glpk/types.pxd +87 -0
  19. sage/numerical/all__sagemath_glpk.py +1 -0
  20. sage/numerical/backends/all__sagemath_glpk.py +1 -0
  21. sage/numerical/backends/glpk_backend.cp314t-win_amd64.pyd +0 -0
  22. sage/numerical/backends/glpk_backend.pxd +41 -0
  23. sage/numerical/backends/glpk_backend.pyx +3359 -0
  24. sage/numerical/backends/glpk_backend_test.py +13 -0
  25. sage/numerical/backends/glpk_exact_backend.cp314t-win_amd64.pyd +0 -0
  26. sage/numerical/backends/glpk_exact_backend.pxd +17 -0
  27. sage/numerical/backends/glpk_exact_backend.pyx +190 -0
  28. sage/numerical/backends/glpk_exact_backend_test.py +12 -0
  29. sage/numerical/backends/glpk_graph_backend.cp314t-win_amd64.pyd +0 -0
  30. sage/numerical/backends/glpk_graph_backend.pxd +56 -0
  31. sage/numerical/backends/glpk_graph_backend.pyx +1346 -0
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-glpk
2
+
3
+ from sage.all__sagemath_glpk import *
@@ -0,0 +1,2 @@
1
+ Version: 1.11.2
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-7xt3w9s3\\cp314t-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-vv', '--custom-patch', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-7xt3w9s3\\cp314t-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-7xt3w9s3\\cp314t-win_amd64\\built_wheel\\passagemath_glpk-10.6.46-cp314-cp314t-win_amd64.whl']
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.4
2
+ Name: passagemath-glpk
3
+ Version: 10.6.46
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 :: 3.14
29
+ Classifier: Programming Language :: Python :: Implementation :: CPython
30
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
31
+ Requires-Python: <3.15,>=3.10
32
+ Description-Content-Type: text/x-rst
33
+ Requires-Dist: passagemath-objects~=10.6.46.0
34
+ Requires-Dist: memory_allocator
35
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
36
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
37
+ Provides-Extra: test
38
+
39
+ =========================================================================================================
40
+ passagemath: Linear and mixed integer linear optimization backend using GLPK
41
+ =========================================================================================================
42
+
43
+ `passagemath <https://github.com/passagemath/passagemath>`__ is open
44
+ source mathematical software in Python, released under the GNU General
45
+ Public Licence GPLv2+.
46
+
47
+ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
48
+ developed 2005-2025 under the motto “Creating a Viable Open Source
49
+ Alternative to Magma, Maple, Mathematica, and MATLAB”.
50
+
51
+ The passagemath fork uses the motto "Creating a Free Passage Between the
52
+ Scientific Python Ecosystem and Mathematical Software Communities."
53
+ It was created in October 2024 with the following goals:
54
+
55
+ - providing modularized installation with pip,
56
+ - establishing first-class membership in the scientific Python
57
+ ecosystem,
58
+ - giving `clear attribution of upstream
59
+ projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
60
+ - providing independently usable Python interfaces to upstream
61
+ libraries,
62
+ - offering `platform portability and integration testing
63
+ services <https://github.com/passagemath/passagemath/issues/704>`__
64
+ to upstream projects,
65
+ - inviting collaborations with upstream projects,
66
+ - `building a professional, respectful, inclusive
67
+ community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
68
+ - `empowering Sage users to participate in the scientific Python ecosystem
69
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
70
+ - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
71
+ serverless deployment with Javascript,
72
+ - developing a native Windows port.
73
+
74
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
75
+ available online.
76
+
77
+ passagemath attempts to support and provides binary wheels suitable for
78
+ all major Linux distributions and recent versions of macOS.
79
+
80
+ Binary wheels for native Windows (x86_64) are are available for a subset of
81
+ the passagemath distributions. Use of the full functionality of passagemath
82
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
83
+ or virtualization.
84
+
85
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.14.x.
86
+
87
+
88
+ About this pip-installable distribution package
89
+ -----------------------------------------------
90
+
91
+ This pip-installable distribution ``passagemath-glpk`` provides
92
+ a backend for linear and mixed integer linear optimization backend using GLPK.
93
+
94
+ It can be installed as an extra of the distribution
95
+ `sagemath-polyhedra <https://pypi.org/project/sagemath-polyhedra>`_::
96
+
97
+ $ pip install "passagemath-polyhedra[glpk]"
98
+
99
+
100
+ What is included
101
+ ----------------
102
+
103
+ * `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.46.dist-info/DELVEWHEEL,sha256=uCZ2g5VgLiH8_XdJBmm0a3ROwaDubtcnu4glDqzSz2w,440
3
+ passagemath_glpk-10.6.46.dist-info/METADATA,sha256=qcPJdWEOXTQ0DCgvyePRO7sPcuEnukqZPFP6GJGnfak,5018
4
+ passagemath_glpk-10.6.46.dist-info/RECORD,,
5
+ passagemath_glpk-10.6.46.dist-info/top_level.txt,sha256=oHagucvL9dKQDkuSfaOi6hPiZ8ubLr_lZX0Wp_JvzLE,23
6
+ passagemath_glpk-10.6.46.dist-info/WHEEL,sha256=IxxXYqBIlKEzFy9ulBJ928Gdqg6XQ3DHti4avqq3myk,102
7
+ passagemath_glpk.libs/libgcc_s_seh-1-8ac28fe21ad5783af7630f2f0c8f554d.dll,sha256=5s9WNgfltVdZb16GiFZ6ABmgAZnre2j86SADcsJjWIE,150196
8
+ passagemath_glpk.libs/libglpk-40-a2b083517ab17d71a64901ccf3d73f9d.dll,sha256=bjlRY4-1CHlsJww4-ULD_8LB5hLUaI5ExHZIRRnOD5k,3811834
9
+ passagemath_glpk.libs/libgmp-10-23decc023ff052bc2d748f1d5bb87892.dll,sha256=I97MAj_wUrwtdI8dW7h4kvrLxmkdtAExaZ48NnDlMJI,3004991
10
+ passagemath_glpk.libs/libwinpthread-1-e271f374468d584905afcdf7da96a6ad.dll,sha256=4nHzdEaNWEkFr8332pamrete4VcCs5hp4gA7DxAvIMQ,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.cp314t-win_amd64.pyd,sha256=DnZe9xXT9B8vX9TCsJv0X-_6N-MaL97cxONys-KMUqI,285696
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.cp314t-win_amd64.pyd,sha256=wFMEVXc2Qli9hXmY9K38RcUE6zw01kBNGxHyG8Gurw4,47616
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.cp314t-win_amd64.pyd,sha256=d684YGGPHVbnO-xwuEug-gHybVupOWSVbDtYg77O3zw,163328
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
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314t-win_amd64
5
+
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_glpk
3
+ sage
@@ -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)
@@ -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)
@@ -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
@@ -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