solves optimization problems by calling a solver:
solve can call these
functions, the problems must be converted to solver form, either by
or some other associated functions or objects. This conversion entails, for example, linear
constraints having a matrix representation rather than an optimization variable
The first step in the algorithm occurs as you place
optimization expressions into the problem. An
OptimizationProblem object has an internal list of the variables used in its
expressions. Each variable has a linear index in the expression, and a size. Therefore, the
problem variables have an implied matrix form. The
function performs the conversion from problem form to solver form. For an example, see Convert Problem to Structure.
For the default and allowed solvers that
solve calls, depending on the problem objective and constraints, see
can override the default by using the
name-value pair argument when calling
For the algorithm that
intlinprog uses to solve MILP problems, see intlinprog Algorithm. For
the algorithms that
linprog uses to solve linear programming problems,
see Linear Programming Algorithms.
For the algorithms that
quadprog uses to solve quadratic programming
problems, see Quadratic Programming Algorithms. For the algorithms that
to solve linear least-squares problems, see Least-Squares (Model Fitting) Algorithms.
If your objective function is a sum of squares, and you want
to recognize it as such, write it as
sum(expr.^2), and not as
expr'*expr. The internal parser recognizes only explicit sums of
squares. For an example, see Nonnegative Least-Squares, Problem-Based.