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.
Featured Product
Optimization Toolbox
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asie-Pacifique
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)