Formulieren der Nebenbedingungen
Geben Sie Schranken, lineare Nebenbedingungen und nichtlineare Nebenbedingungen an.
Erfahren Sie, wie man die Nebenbedingungen für verschiedene Problemtypen formuliert.
Funktionen
checkGradients | Check first derivative function against finite-difference approximation (Seit R2023b) |
Themen
Formulieren der Nebenbedingungen
- Types of Constraints
Choose the most appropriate form for your constraints. - Iterations Can Violate Constraints
Considerations for constrained problems. - Bound Constraints
How to write constraints for individual components. - Linear Constraints
Include constraints that can be expressed as matrix inequalities or equalities. - Nonlinear Constraints
How to include general inequality and equality constraints. - Checking Validity of Gradients or Jacobians
Check whether a derivative function matches finite difference estimates. - Or Instead of And Constraints
Optimize when only one constraint of a set is necessary. - Objective and Nonlinear Constraints in the Same Function
Save function evaluations, typically useful in simulations. - How to Use All Types of Constraints
Example showing all constraints.
Übergeben zusätzlicher Parameter
- Passing Extra Parameters
Including extra parameters or data in your objective or nonlinear constraint functions.
Einzelheiten zu den Nebenbedingungsargumenten
- Matrixargumente
Umgang mit mehrdimensionalen Argumenten