What Is Optimization Toolbox?

Optimization Toolbox provides solvers and the optimization app for finding the maximum or the minimum of a problem. It lets you find optimal designs, minimize risk for financial applications, optimize decision making, and fit models to data. In this optimization example, we would like to find the minimum value of this equation, known as the objective function. The objective function calculates the value to maximize or minimize, such as the cost of producing a product, or the time it takes for a race car to get around the track.

The possible values for x1 and x2 are limited to be below this line by this inequality constraint, and similarly, for this constraint. The solver finds the minimum value of the objective function, subject to the constraints, to be this point. Optimization Toolbox includes specialized solvers for linear objective functions such as this one, as well as quadratic and nonlinear objectives, and linear and nonlinear least squares.

Sometimes problems require that variables take on integer values, like when the variables represent the number of workers on an assembly line, or a yes or no decision. This type of problem is known as a mixed integer optimization problem, and can be solved by adding integer constraints to the problem. You can set up your optimization problems programmatically or with the optimization app. You enter your objective function, specify constraints, and provide initial conditions. A variety of optimization algorithms are available, enabling you to target a wide range of problems.

For this nonlinear problem with nonlinear constraints, efficiency can be improved by providing the solver with functions that calculate the derivatives of the problem. You can also speed up your optimization problems with built in support for Parallel Computing Toolbox™. A wide variety of solvers are available for different types of objectives and constraints. The toolbox's documentation helps you choose the best solver for your problem.

For large and sparse problems with many thousands of variables, you can use solvers for linear, mixed integer, quadratic, and nonlinear problems. In this example, a quadratic problem with over 40,000 variables was solved in less than four seconds. For more information, return to the Optimization Toolbox page or choose a link below.

Product Focus