quadprog solvers support the use of a warm start object as an
enhanced initial point. Warm start objects store algorithm-specific data from a
previous solution to help avoid costly initialization between solves. Using a warm
start can significantly increase performance between multiple solver calls. To use a
warm start with a solver, you first create a warm start object using
optimwarmstart. Specify an initial point
options created with
optimoptions, including setting the
Algorithm option to
basic examples, see the
Return Warm Start Object and the
Return Warm Start Object. For a more
extensive example, see Warm Start quadprog.
Use a warm start object when you solve a sequence of similar problems. For best performance, follow these guidelines.
Keep the same number of variables. You must have the same number of variables from one problem to the next. If the number of variables changes, solvers issue an error.
Do not change the equality constraints.
If you change the equality constraint matrices
beq, the solver cannot use a warm start.
Modify a few rows of the
matrix. A warm start works most efficiently when the problem
modifies only a few rows of the
A matrix and
b vector, representing the constraint
A*x <= b. This modification includes adding or
removing one or more constraints.
Modify a few elements of the
vector. A warm start works most efficiently when the problem
modifies only a few elements of the
Change a few bound constraint. A warm
start works most efficiently when the problem modifies only a few bounds by
adding, removing, or changing entries in the upper bounds or lower bounds.
This modification includes setting bounds to
Change the objective function. A warm
start can be efficient when you change a matrix or vector representing the
quadprog, or the
d arrays for
large modifications to these arrays can result in a loss of efficiency,
because the previous solution can be far away from the new solution.
The performance improvement of a warm start ultimately depends on problem geometry. For many problems, performance benefits improve as fewer changes are made between problems.
In addition to the guidelines for a MATLAB® warm start, follow these guidelines for code generation with static memory management: