I have a LP/MPS file like this:
我有这样一个LP/MPS文件:
Maximize
3x + 2y
Subject To
Constraint1: x + 2y <= 5
Constraint2: 2x - y >= 3
Bounds
0 <= x <= 10
y >= 0
General
x, y
End
Can I read it in pulp or I have to read by myself?
I've tried to read it by myself, and it's very complicated. I also searched on the internet for how to read an LP/MPS file, but I didn't find any instructions.
Thanks
我可以看纸质书,还是自己读?我试着自己读它,它非常复杂。我还在网上搜索了如何阅读LP/MPS文件,但没有找到任何说明。谢谢
更多回答
You'll have to rewrite the problem in python. See pulp examples. MPS is an old format (punch card old), you probably don't want to go there.
您必须用python语言重写这个问题。请参阅纸浆示例。MPS是一种旧的格式(穿孔卡片旧),你可能不想去那里。
I don't get what you mean, I want to read that file to pulp and solve it, your example is write the problem into a file, right?
我不明白你的意思,我想把那个文件读成纸浆,然后解决它,你的例子是把问题写到一个文件里,对吗?
You cannot read your file in. You must rewrite the problem in the form shown in the pulp examples.
您不能读取您的文件。你必须用纸浆例子中所示的形式重写这道题。
oh, after rewrite can I read that file?
哦,重写后我可以读那个文件吗?
优秀答案推荐
我是一名优秀的程序员,十分优秀!