glpk.LPX向后兼容? [英] glpk.LPX backward compatiblity?

查看:113
本文介绍了glpk.LPX向后兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

glpk的较新版本没有LPX api,这是旧软件包所必需的. 如何将较旧的软件包(如 COBRA )与更新的glpk版本一起使用?

Newer versions of glpk do not have the LPX api, which is required by older packages. How can I use an older package (like COBRA) with the newer versions of glpk?

请注意,COBRA可用于MATLAB和Python.两者都需要glpkLPX api,我想同时使用它们.

Note that COBRA is available for MATLAB and Python. Both require glpk and the LPX api, and I would like to use both.

推荐答案

理想情况下,您应该切换到使用新API的版本.已经有好几年了.如果没有选择,那么ChangeLog到V4.53中的以下条目将指向正确的方向

Ideally you should switch to a version that uses the new API. It has been around for years. If that is no option, then the following entry in the ChangeLog to V4.53 points in the right direction

    * examples/oldapi/lpx.h, examples/oldapi/lpx.c
    A set of routines that simulate the old GLPK API (as defined
    in 4.48) were added. Thanks to Jan Engelhardt <jengelh@inai.de>
    for suggestion.

在源版本的目录examples/oldapi中,您找到了所需的所有内容.自述摘录:

In the directory examples/oldapi of the source release you find everything you need. Excerpt from README:

The program module in this subdirectory contains an implementation of
the old GLPK API as it was defined in GLPK 4.48.

To compile an existing project using the old GLPK API you need to add
to the project two files lpx.h and lpx.c.

这篇关于glpk.LPX向后兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆