简体   繁体   English

如何在 MOSEK 中表达约束

[英]How to express a constraint in MOSEK

I have the following constraint to be implemented in Mosek, where the unknown variable is x.我有以下约束要在 Mosek 中实现,其中未知变量是 x。

在此处输入图像描述

I'm trying to follow the discussion here .我正在尝试关注这里的讨论。 I could write the constraint as the intersection between 15 exponential cones and one half space.我可以将约束写为 15 个指数锥和一半空间之间的交集。 However, what is the best way to write the exponential cone in Mosek given that I have a linear combination of the elements of the unknown x?但是,鉴于我有未知 x 的元素的线性组合,在 Mosek 中编写指数锥的最佳方法是什么?

In Fusion API you write the constraint t\geq exp(u) as在 Fusion API 中,您将约束t\geq exp(u)编写为

M.constraint(Expr.hstack(t, Expr.constTerm(1.0), u), Domain.inPExpCone())

and u can be an expression constructed in a more complicated way, say并且u可以是一个以更复杂的方式构造的表达式,比如说

y1 = Expr.sub(Expr.dot(c1, x), b1)
u = Expr.mul(r, y1)
....

and so on.等等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM