Main Content

Solver-Based Optimization Problem Setup

Choose solver, define objective function and constraints, compute in parallel

Before you begin to solve an optimization problem, you must choose the appropriate approach: problem-based or solver-based. For details, seeFirst Choose Problem-Based or Solver-Based Approach.

To represent your optimization problem for solution in this solver-based approach, you generally follow these steps:

• Choose an optimization solver.

• Create an objective function, typically the function you want to minimize.

• Create constraints, if any.

• Set options, or use the default options.

• Call the appropriate solver.

For a basic nonlinear optimization example, seeSolve a Constrained Nonlinear Problem, Solver-Based. For a basic mixed-integer linear programming example, seeMixed-Integer Linear Programming Basics: Solver-Based.

For a visual approach for optimizing or solving equations, use theOptimizeLive Editor task.

Categories