问题标签 [pyomo]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
import - 在 Pyomo 中导入两个或多个 .dat
我正在使用 Pyomo,我想导入两个或多个数据文件(扩展名 .dat)。我该怎么做?
我只知道如何导入其中一个,如下所示:
谢谢,玛丽亚
numpy - 将矩阵从 Python 导入 Pyomo
我在 Python 中定义了一个矩阵:(文档的名称 matrix.py)
我想在 Pyomo 中使用它,我做到了:
. . .
但我得到下一个错误:
NameError: global name 'D' is not defined
我该怎么做?
matrix - 一个向量对矩阵乘积的 Pyomo 求和
我编辑我的代码,包括所有涉及的参数和变量:
(D 是从 Python 导入的 numpy 矩阵)
但我得到下一个错误:
有什么帮助吗?
printing - Pyomo:打印导致错误的约束
我在 pyomo 中使用 ipopt,出现下一个错误:
如何打印导致 pyomo 错误的约束名称?
类似于 AMPL 命令的东西:print _sconname[15];
谢谢,M。
ampl - 开源语言仍然缺少商业代数建模语言的哪些特征?
主要的商业代数建模语言 (AML),如 GAMS 或 AMPL,有哪些开源 AML,如 Pyomo 或 JuMP,还没有(显然除了用户群和已建立模型的可用性)?
python-3.6 - 使用 python 3.6 生成带有 sum 的 pyomo 表达式时出错
我在 Python 3.6 下使用 pyomo Pyomo 5.1.1(Linux 3.16.0-4-amd64 上的 CPython 3.6.0),当我想使用求和在模型中构建表达式时收到错误消息。这是一个最小的例子:
我收到以下错误:
"
"
如果我用 model.H 中的 h 上的循环替换“求和”,我会得到同样的错误。
该错误也在这里被注意到:https ://github.com/Pyomo/pyomo/issues/103
除了退回到旧版本的 Python 之外,有没有一种简单的方法来解决这个问题?
非常感谢您的帮助,
保林
macos - Installing Pyomo on a Mac with Anaconda installed
I am new to Mac, having been well-versed in PCs for over 20 years. Unfortunately, the ease at which I can get "under the hood" with a PC is nigh on impossible for me to intuitively sort out in a Mac (ironic isn't it?). In any case, here is my situation:
I am looking to install a number of open-source analyst-centric tools on my new Mac, to include Python, R, and Pyomo. I am doing some home-testing to explore the viability of these tools for an enterprise solution on a work network. As such, I am looking at Anaconda Navigator as a potential one-stop shop for managing a variety of tools.
I have successfully installed Anaconda 4.3 with a Python 3.6 environment on the Mac, but I am running into trouble installing (or rather finding) Pyomo.
I attempted to do a "conda" install of Pyomo via the terminal shell, but got an error. I then attempted a "pip" install which apparently worked.
Unfortunately, I have no idea how to invoke Pyomo, either from the OS X interface or from Anaconda. This is partially due to my inexperience with the OS X system and how to navigate the file and/or PATH structure.
As I am attempting to evaluate Anaconda, how can I set up Pyomo through the Anaconda Navigator shell? I have attempted importing a new environment, but cannot find a specification file, again due to my inability to navigate the OS X file system.
All installations have been completing using default settings.
pyomo - 不使用 Set 的参数索引指示
有没有办法通过 Param() 函数在 Pyomo 中索引参数而不创建集合?例如,是否可以通过验证来做到这一点?
pyomo - Pyomo中的双重求和
我刚刚开始使用 Pyomo,我一直无法弄清楚如何编写双重求和。像这样的东西。
有人可以给我一个提示吗?谢谢你们的帮助!!
cplex - 如何用 cplex 热启动 pyomo?
我目前正在使用命令行使用 cplex 和 pyomo
pyomo -solver=cplex model.py data.dat
结果保存在文件中results.json
。如何使用以前的结果作为起始解决方案再次启动 cplex?