How to Use the Problem-Based Optimize Live Editor Task
Interactively create and solve optimization problems with MATLAB®, Optimization Toolbox™, or Global Optimization Toolbox using a visual interface. The Optimize task guides you through the problem-based approach for specifying the type of problem by defining optimization variables, objective expressions, and constraint expressions.
The visual interface provides an intuitive way to set up and solve optimization problems, especially for those who do not know the MATLAB coding syntax to do so. In addition, based on the problem you define, the Optimize task automatically chooses an appropriate solver. You can easily formulate and solve constrained and unconstrained nonlinear programs, linear programs, quadratic programs, second-order cone programs, mixed-integer programs, linear and nonlinear least squares problems, and systems of nonlinear equations.
The example in the video shows how to minimize the cost of materials for a cylindrical soup can, subject to a set of linear, nonlinear, and bound constraints. While this example is conceptually simple, you apply the same approach to much more complex optimization problems.
You start by defining the optimization variables, commonly referred to as design or decision variables, as symbolic variables. You then define objectives and constraints as expressions of these optimization variables. You can specify each objective and constraint using an existing function from a file, a function local to the Live Script, or by specifying the expression on one line.
You can optionally specify some problem-dependent solver options, such as choosing a specific algorithm and modifying algorithm settings. You can choose which results to display.
Once this is done, you run the task to solve the problem and view the results. Use the generated MATLAB code to reproduce these results in applications or to share with others.
The Optimize Live Editor task makes it easier to solve your optimization problems by guiding you through the specification of the problem, adapting as you make selections, generating MATLAB code, and providing tool tips.
Published: 20 Dec 2021
Featured Product
Optimization Toolbox
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia-Pacifico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)