Runtime creation of constraints and optimization variable
Sie verfolgen jetzt diese Frage
- Aktualisierungen können Sie in Ihrem Feed verfolgter Inhalte sehen.
- Je nach Ihren Kommunikationseinstellungen können Sie auch E-Mails erhalten.
Es ist ein Fehler aufgetreten
Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.
0 Stimmen
Teilen Sie einen Link zu dieser Frage
Akzeptierte Antwort
0 Stimmen
Teilen Sie einen Link zu dieser Antwort
- Kindly define the optimization variable ‘Q’
- Second step is to set up the constraints, since each row of “Q” is “g*P_i” and “P_i” is an “NxN” diagonal matrix, you can express “P_i” as a vector (since it's diagonal) and then multiply by g to get the row of “Q”. The Frobenius norm constraint on “P_i” is equivalent to constraining the 2-norm of the vector since “P_i” is diagonal.
- Then we need to define the objective function, Since you have not specified the objective function, I am considering a placeholder function(“myObjectiveFunction”).
- So we have our problem set up now, we will need to loop over different values of “T” to solve for each scenario.
- https://in.mathworks.com/help/optim/ug/optimvar.html%22
- https://in.mathworks.com/help/optim/ug/optimproblem.html%22
- https://in.mathworks.com/help/optim/examples.html?category=problem-based-basics&s_tid=CRUX_topnav%22
4 Kommentare
Teilen Sie einen Link zu diesem Kommentar
Teilen Sie einen Link zu diesem Kommentar
- We loop over the array 'T_values' to solve the optimization problem for different values of 'T'.
- We define 'Q' and 'P_i' variables for each 'T' within the loop.
- We create a structure 'x0' to hold the initial conditions for each 'P_i'.
- We set an example initial condition for each 'P_i' as a vector of ones multiplied by sqrt(N/N). This is a simple starting point, and you might want to choose a more appropriate initial condition based on your specific problem.
- We pass the initial guess 'x0' to the 'solve' function to provide a starting point for the optimization.
Teilen Sie einen Link zu diesem Kommentar
Teilen Sie einen Link zu diesem Kommentar
Weitere Antworten (0)
Kategorien
Mehr zu Surrogate Optimization finden Sie in Hilfe-Center und File Exchange
Tags
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- 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)
