Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 AMPL,需要输入具有非负偏差变量 (s+ - s-) 的模型。
一个示例约束是:(x - 5) = (s+ - s-)
这是这样做的方法:
var x; var sp >= 0; var sm >= 0; s.t. cons1: (x - 5) = (sp - sm);
仅供参考,AMPL 书可以免费下载。