passagemath-glpk 10.5.40__cp310-cp310-musllinux_1_2_x86_64.whl → 10.6.45__cp310-cp310-musllinux_1_2_x86_64.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.

@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-glpk
2
+
3
+ from sage.all__sagemath_glpk import *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: passagemath-glpk
3
- Version: 10.5.40
3
+ Version: 10.6.45
4
4
  Summary: passagemath: Linear and mixed integer linear optimization backend using GLPK
5
5
  Author-email: The Sage Developers <sage-support@googlegroups.com>
6
6
  Maintainer: Matthias Köppe, passagemath contributors
@@ -8,7 +8,7 @@ License-Expression: GPL-2.0-or-later
8
8
  Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
9
  Project-URL: repo (upstream), https://github.com/sagemath/sage
10
10
  Project-URL: repo, https://github.com/passagemath/passagemath
11
- Project-URL: documentation, https://doc.sagemath.org
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
12
  Project-URL: homepage (upstream), https://www.sagemath.org
13
13
  Project-URL: discourse, https://passagemath.discourse.group
14
14
  Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
@@ -17,20 +17,23 @@ Classifier: Development Status :: 6 - Mature
17
17
  Classifier: Intended Audience :: Education
18
18
  Classifier: Intended Audience :: Science/Research
19
19
  Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
20
21
  Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Operating System :: Microsoft :: Windows
21
23
  Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Programming Language :: Python :: 3.9
23
24
  Classifier: Programming Language :: Python :: 3.10
24
25
  Classifier: Programming Language :: Python :: 3.11
25
26
  Classifier: Programming Language :: Python :: 3.12
26
27
  Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Programming Language :: Python :: 3.14
27
29
  Classifier: Programming Language :: Python :: Implementation :: CPython
28
30
  Classifier: Topic :: Scientific/Engineering :: Mathematics
29
- Requires-Python: <3.14,>=3.9
31
+ Requires-Python: <3.15,>=3.10
30
32
  Description-Content-Type: text/x-rst
31
- Requires-Dist: passagemath-objects~=10.5.40.0
33
+ Requires-Dist: passagemath-objects~=10.6.45.0
32
34
  Requires-Dist: memory_allocator
33
- Requires-Dist: cysignals==1.12.0rc2
35
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
36
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
34
37
  Provides-Extra: test
35
38
 
36
39
  =========================================================================================================
@@ -45,53 +48,56 @@ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
45
48
  developed 2005-2025 under the motto “Creating a Viable Open Source
46
49
  Alternative to Magma, Maple, Mathematica, and MATLAB”.
47
50
 
48
- The passagemath fork was created in October 2024 with the following
49
- goals:
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:
50
54
 
51
- - providing modularized installation with pip, thus completing a `major
52
- project started in 2020 in the Sage
53
- codebase <https://github.com/sagemath/sage/issues/29705>`__,
55
+ - providing modularized installation with pip,
54
56
  - establishing first-class membership in the scientific Python
55
57
  ecosystem,
56
58
  - giving `clear attribution of upstream
57
59
  projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
58
60
  - providing independently usable Python interfaces to upstream
59
61
  libraries,
60
- - providing `platform portability and integration testing
62
+ - offering `platform portability and integration testing
61
63
  services <https://github.com/passagemath/passagemath/issues/704>`__
62
64
  to upstream projects,
63
65
  - inviting collaborations with upstream projects,
64
66
  - `building a professional, respectful, inclusive
65
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,
66
70
  - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
67
71
  serverless deployment with Javascript,
68
72
  - developing a native Windows port.
69
73
 
70
- `Full documentation <https://doc.sagemath.org/html/en/index.html>`__ is
74
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
71
75
  available online.
72
76
 
73
- passagemath attempts to support all major Linux distributions and recent versions of
74
- macOS. Use on Windows currently requires the use of Windows Subsystem for Linux or
75
- virtualization.
77
+ passagemath attempts to support and provides binary wheels suitable for
78
+ all major Linux distributions and recent versions of macOS.
76
79
 
77
- Complete sets of binary wheels are provided on PyPI for Python versions 3.9.x-3.12.x.
78
- Python 3.13.x is also supported, but some third-party packages are still missing wheels,
79
- so compilation from source is triggered for those.
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.
80
86
 
81
87
 
82
88
  About this pip-installable distribution package
83
89
  -----------------------------------------------
84
90
 
85
- This pip-installable source distribution ``sagemath-glpk`` provides
91
+ This pip-installable distribution ``passagemath-glpk`` provides
86
92
  a backend for linear and mixed integer linear optimization backend using GLPK.
87
93
 
88
94
  It can be installed as an extra of the distribution
89
95
  `sagemath-polyhedra <https://pypi.org/project/sagemath-polyhedra>`_::
90
96
 
91
- $ pip install "sagemath-polyhedra[glpk]"
97
+ $ pip install "passagemath-polyhedra[glpk]"
92
98
 
93
99
 
94
100
  What is included
95
101
  ----------------
96
102
 
97
- * `GLPK backends <https://doc.sagemath.org/html/en/reference/numerical/index.html#linear-optimization-lp-and-mixed-integer-linear-optimization-mip-solver-backends>`_ for LP, MILP, and graphs
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,28 @@
1
+ passagemath_glpk/__init__.py,sha256=T64ZlRcuaZwmbPhLlAIiximry2X2ntgQvL-4NdRMCzo,82
2
+ passagemath_glpk.libs/libglpk-b0cb8ac7.so.40.3.1,sha256=1uOmoLzD1d-kQcsKPuGGeIEPns6G9Ho6gyWVz_1FGGs,3361385
3
+ passagemath_glpk.libs/libgmp-0e7fc84e.so.10.5.0,sha256=19mj7ISusOKPTVdhqjzZ-Ts-9Qf82f4a_8Sslp-ypCg,773097
4
+ sage/all__sagemath_glpk.py,sha256=7SNG-LnJspb9hiMfg_wNxFMDLRrITRd_bnFqNownh3o,63
5
+ sage/libs/all__sagemath_glpk.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
6
+ sage/libs/glpk/__init__.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
7
+ sage/libs/glpk/constants.pxd,sha256=C-LZEzI2HnMF5NSKp9-OO8UoPLjtIsgfdF-biNkIzmY,2146
8
+ sage/libs/glpk/env.pxd,sha256=KPa7e71MZTB8prxxl0s2Za5zwPHI0yz5mHi1rOsF15o,532
9
+ sage/libs/glpk/graph.pxd,sha256=kBT71y0qJmV0X5pxM4lBhIvE9p1hvqC_559nYrJqzdc,2249
10
+ sage/libs/glpk/lp.pxd,sha256=cprSbx4WwOsTbqw56AQ4VDNKQnaeuVlF3ERy5gpHkIo,4106
11
+ sage/libs/glpk/types.pxd,sha256=lyEVk-aeb-JOKLQK5hoL6sUh2iyKxxTCfBkU3rTzbUM,2221
12
+ sage/numerical/all__sagemath_glpk.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
13
+ sage/numerical/backends/all__sagemath_glpk.py,sha256=mG8Db8jQgQygOLZvw6vMHJCZZoC2PfoOzKdjdYfEC_k,43
14
+ sage/numerical/backends/glpk_backend.cpython-310-x86_64-linux-gnu.so,sha256=Bq83LRWn0J9kA_sP8EIz6fhV7fz4CXX37VcvyHsTmRA,1997209
15
+ sage/numerical/backends/glpk_backend.pxd,sha256=yIMM0Hp5VBQCC13XftzoythuC_-fhC8mSTWVvndm-9Y,1648
16
+ sage/numerical/backends/glpk_backend.pyx,sha256=bMh6yLeqVMvpSJjbbqT6PWR-i1h7_t00t4bHLYZNEgA,116403
17
+ sage/numerical/backends/glpk_backend_test.py,sha256=6LGR9U7heVJgBe01vxsXY8CR1Jbqp9-Uri7DACe5H4k,437
18
+ sage/numerical/backends/glpk_exact_backend.cpython-310-x86_64-linux-gnu.so,sha256=Acr1IuJ3RSzqVAsP1eGftKxFvxafHXRSGKWsOmS7ENY,282808
19
+ sage/numerical/backends/glpk_exact_backend.pxd,sha256=hsev_ABrT2yLIUWlRoV2J1qvb7wThR9gib_1AdMfWbY,960
20
+ sage/numerical/backends/glpk_exact_backend.pyx,sha256=7GwedKeN5L9xtXFXciJQFbOQ7fg1M6YPbueVxCkuGpE,6817
21
+ sage/numerical/backends/glpk_exact_backend_test.py,sha256=okdLqxEYMiTO8HCWu8fkjah6cj4sa9HIeff2s_4K8BU,447
22
+ sage/numerical/backends/glpk_graph_backend.cpython-310-x86_64-linux-gnu.so,sha256=5evDNGGkvTIfnTP3apCzofyE6NwsmWoFBgTqZhs-VkI,1144833
23
+ sage/numerical/backends/glpk_graph_backend.pxd,sha256=xoDnzL_yC5Xu_JGZE30MXVmcaFv_2_gHcspR3Ko8Xuc,2027
24
+ sage/numerical/backends/glpk_graph_backend.pyx,sha256=1kZzrxrhpTwctBTKhVoiA6C-WTt_pgpkcaX1uwvG-A0,46343
25
+ passagemath_glpk-10.6.45.dist-info/METADATA,sha256=m_4uoCwc6U1LSDEQfMG9FBBgoWFZOJUDoL5gjqv9K08,4915
26
+ passagemath_glpk-10.6.45.dist-info/WHEEL,sha256=YJPq7zroHSsdctrb_KymZ4ss41PkmaA9SD9TZzqKSX8,112
27
+ passagemath_glpk-10.6.45.dist-info/top_level.txt,sha256=oHagucvL9dKQDkuSfaOi6hPiZ8ubLr_lZX0Wp_JvzLE,23
28
+ passagemath_glpk-10.6.45.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_glpk
3
+ sage
@@ -1 +1,2 @@
1
1
  # sage_setup: distribution = sagemath-glpk
2
+ # delvewheel: patch
@@ -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,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