Release with many small fixes as two years have passed since the last official update.
Release with new and improved solver support, and some minor fixes.
Note that you have to install both the solver, and the MATLAB interface to the solver.
]]>Untangling this from YALMIP is simple. Unboundedness can only come from the objective, hence remove the objective from the model and try again. If the message changes to Infeasible you know the model is infeasible and should start addressing that. If the solver instead solves the problem when the objective was removed, you know the model is unbounded, and should address that problem.
How to analyze a model for infeasibility is explained in the post debugging infeasible models. In short, remove constraints systematically until it becomes infeasible and you know where the peroblem lies, or add slacks to model and see which are activated.
How to analyze a model for unboundedness is explained in the post debugging unbounded models. In short, add large bounds on all variables (or small penalties) to make the model bounded, and see which variables become large when that problem is solved.
]]>Release with possibly breaking core changes, new features, and 2 years of bug fixes.
websave('install_daqp','https://raw.githubusercontent.com/darnstrom/daqp/master/interfaces/daqp-matlab/install_daqp.m')
install_daqp
Model = isoutside(P)
The following code finds the vertex/point on facet closest to the origin in a polytope by solving a non-convex problem involving an avoidance constraint. Note the required explicit bounds, as the model is constructed using big-M strategies.
x = sdpvar(2,1);
A = randn(10,2);
b = 10*rand(10,1);
Model = isoutside(A*x <= b)
optimize([Model, -100 <= x <= 100],x'*x)
clf
plot(A*x <= b,[],[],[],sdpsettings('plot.shade',0.1));
hold on;grid on
plot(value(x(1)),value(x(2)),'*')
r = sqrt(value(x'*x));
t = 0:0.01:2*pi;
plot(r*cos(t),r*sin(t),'--')

Note that isoutside will introduce binary variables.
]]>y = invpos(x)
The operator is implemented using a graph representation based on SOCP and can thus only be used in scenarios where YALMIP can propagate convexity and use a conic model.
]]>P = polytope(v,x)
P = polytope(M)
The native YALMIP use is for defing a polytope \(x = \sum_{i=1}^N \lambda_i v_i, \lambda \geq 0, \sum_{i=1}^N \lambda_i = 1\) from a set of vertices \( v_i\).
v = randn(2,10);
x = sdpvar(2,1);
P = polytope(v,x)
The opeprator does not perform any convex hull computation to reduce the numer of vertices. Note also that the polytope is defined in the \(x,\lambda\)-space. Hence, if you want plot it, you are most likely interested in the projection to \(x\)
plot(P,x)
The command also serves as the interface between YALMIP objects and MPT objects, allow us to convert objects. To generate a polytopic MPT object, simply apply the operator on a purely linear object.
x = sdpvar(2,1);
P = polytope([-1 <= x <= 1]);