Calling coefficient matrics of LP/ Convex optimization model

17 views
Skip to first unread message

weiqi meng

unread,
Jul 4, 2025, 11:24:37 AMJul 4
to YALMIP
Dear Prof 

I am curious whether there is a good way to get the coefficient matrix for a general LP/convex optimization problem by using a modeling language and getting the coefficient matrix directly. If YALMIP supports this or other kinds of modeling languages like Gurobi, does it support calling coefficient matrices through commands?

Thanks!

weiqi meng

unread,
Jul 4, 2025, 11:27:34 AMJul 4
to YALMIP
The reason I ask this question is that if there is an easy way to get the coefficient matrix directly, we will save a lot of time to derive the dual problem. If not, weather YALMIP or other solvers support getting coefficient matrices in an easy way?

Johan Löfberg

unread,
Jul 4, 2025, 1:02:55 PMJul 4
to YALMIP
If you want the data in the format of a specific solver, you use export

https://yalmip.github.io/command/export/

You can also use kkt to export the kkt conditions, and while doing so, you get the data too in the second output argument

https://yalmip.github.io/command/kkt/
Reply all
Reply to author
Forward
0 new messages