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.
这是我的代码,并且:
这是代码的错误声明。
我该如何解决这些错误?
的默认实现abs()只接受数字。为了使abs()for 表达式,您必须包含该mmxnlp模块。这在此处的文档中进行了说明。
abs()
mmxnlp
请注意,这会将约束的类型从 更改linctr为nlctr,因此您也必须在代码中进行更改。
linctr
nlctr
最后,不支持严格的不等式。而是>被解释为布尔运算符。对于约束,您必须>=. 如果您确实需要表达式不为零,那么除了使用 epsilon 之外别无选择:用> 0for >= epsa small number替换eps。
>
>=
> 0
>= eps
eps