Develop custom Internal solvers for YALMIP

38 views
Skip to first unread message

JackJack

unread,
May 8, 2026, 7:09:12 AM (13 days ago) May 8
to YALMIP
Dear Professor  Johan Löfberg,

I am trying to develop 
 custom Internal solvers for YALMIP,

Where should I start ? I already got the algorithm so I am just asking for the software architecture so that it integrate properly with yalmip !

Thank you and best regard

Johan Löfberg

unread,
May 8, 2026, 7:26:47 AM (13 days ago) May 8
to YALMIP
Not sure what you mean with internal solver.

If you want to interface a new solver, I think a quick way to understand what is needed is to look at the recent commit where Highs was added as a supported solver. As you can see, you have to update definesolvers, sdpsettings, and create one interface file. Nota bene, this whole commit was one-shotted by Claude 4.6 in VS Code copilot with the prompt "Here is the YALMIP repository. Highs can be found in c:\.... Add that solver to YALMIP by integrating it in sdpsetings, definesolvers and writing a suitable interface".
https://github.com/yalmip/YALMIP/commit/908bf2056a5acb0e87cf3e4f219a3029d1bb9040

If you really mean internal solver as interfacing other solvers via internal YALMIP calls, I think looking at bnb or bisection or solvebilevel could be useful.

JackJack

unread,
May 12, 2026, 4:07:20 AM (9 days ago) May 12
to YALMIP
Well what I want is to 

First develop a YALMIP model with objective function, decision variable and contraints.

Second make it possible to use matlab built-in function to solve it. For example, currently I want to be able to solve my YALMIP model using matlab GA or PSO function  

https://www.mathworks.com/help/gads/ga.html

Johan Löfberg

unread,
May 13, 2026, 9:42:46 AM (8 days ago) May 13
to YALMIP
Those solvers should be trivial to connect to as they use simplified versions of the fmincon logic. Starting from callfmincon and the changes should be minimal (probably nothing except the actual call) and fmincon specific data/options/inputs/outputs

A word of warning though. The fact that you want to use these solvers indicate that you have a messy problem, and it could very likely be that YALMIP is not a good way to represent these models when trying to connect to ga etc. YALMIP strives at a structured model which can cause the introduction of many extra variables and constrainyts, while these solvers pretty much don't care about any structure and want to work in low dimensions.
Reply all
Reply to author
Forward
0 new messages