Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
fmincon: any way to enforce linear inequality constraints at intermediate iterations?
6 Commenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376369/image.png)
Risposta accettata
47 Commenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376669/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1391479/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1391479/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1391479/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826049/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826050/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826051/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826051/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826053/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826054/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826055/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826056/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826057/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826058/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826051/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826060/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826061/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826051/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826083/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826084/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826095/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826179/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826185/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1826187/image.png)
Più risposte (2)
- Tighten the tolerances: By tightening the tolerances in the fmincon options, you can force the algorithm to take smaller steps and converge more slowly, but with higher accuracy. This may help to ensure that the linear inequality constraints are satisfied at all intermediate iterations.
- Use a barrier function: You can try using a barrier function to penalize violations of the linear inequality constraints. This can be done by adding a term to the objective function that grows very large as the constraints are violated. This will encourage the algorithm to stay within the feasible region defined by the constraints.
- Use a penalty function: Similar to a barrier function, a penalty function can be used to penalize violations of the linear inequality constraints. However, instead of growing very large, the penalty function grows linearly with the degree of violation. This can be a more computationally efficient approach than a barrier function.
- Use a combination of methods: You can try using a combination of the above methods to ensure that the linear inequality constraints are satisfied at all intermediate iterations. For example, you could tighten the tolerances and use a penalty function or barrier function to further enforce the constraints.
Vedere anche
Categorie
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
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 (한국어)