如何将LP文件提供给or-tools的GLOP求解器? [英] How to feed LP files to the GLOP solver of or-tools?

查看:139
本文介绍了如何将LP文件提供给or-tools的GLOP求解器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用or-tools和 GLOP 求解器来求解线性编程问题.

I would like to use or-tools and the GLOP solver to solve linear programming problems.

我已经有另一个程序可以创建 LP文件,它们是据我所知,这是定义线性程序的相当标准.

I already have another program that creates LP files which are, as far as I know, fairly standard for defining linear programs.

是否有人设法将这些文件直接传递给GLOP?das GLOP可以理解哪种文件格式,如何将它们传递给GLOP?

Has anyone managed to pass those files directly to GLOP? What file format das GLOP understand and how do I pass them to GLOP?

lp文件示例:

maximize 2x1 + 3x2 - x3
subject to
 x1 + x2 <= 1
 x1 + x2 + x3 <= 0
 x2 - 2x3 <= 2
bounds
 x1 free
 x2 free
 x3 free
end

  • 我正在寻找Java解决方案
  • LoadLinearProgramFromModelOrRequest 似乎是这样.请参见此处.我也不知道怎么用
  • I am looking for a Java solution
  • LoadLinearProgramFromModelOrRequest seems to be the way. See here. I don't know how to use it though

推荐答案

没有用于读取LP文件的API,我们没有编写足够好的LP阅读器.我们确实支持读取MPS文件.

There is not API to read LP files, we did not write a good enough LP reader. We do support reading MPS files.

这篇关于如何将LP文件提供给or-tools的GLOP求解器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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