graph TD A[Optimization Problem] --> B[Lagrangian Function] B --> C[Stationarity] B --> D[Primal Feasibility] B --> E[Complementary Slackness] C --> F["โf + ฮฃฮปแตขโgแตข + ฮฃฮผโฑผโhโฑผ = 0"] D --> G["gแตข(x) โค 0, hโฑผ(x) = 0"] E --> H["ฮปแตขgแตข(x) = 0, ฮปแตข โฅ 0"] style A fill:#fff3e0,stroke:#e65100,stroke-width:3px,color:#2e3440 style B fill:#fff3e0,stroke:#e65100,stroke-width:3px,color:#2e3440 style C fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px,color:#2e3440 style D fill:#e3f2fd,stroke:#1565c0,stroke-width:3px,color:#2e3440 style E fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#2e3440 style F fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px,color:#2e3440 style G fill:#e3f2fd,stroke:#1565c0,stroke-width:3px,color:#2e3440 style H fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#2e3440
graph LR A["Problem\n Formulation"] --> B{"Is it\n Convex?"} B -->|Yes| C[Choose Solver] B -->|No| D["Transform or\n Approximate"] D --> E{Convex now?} E -->|Yes| C E -->|No| F["Use Heuristic\n Methods"] C --> G["Gradient\n Descent"] C --> H["Interior\n Point"] C --> I["Barrier\n Method"] G --> J{"KKT\n Satisfied?"} H --> J I --> J J -->|Yes| K["Global\n Optimum"] J -->|No| L["Adjust\n Parameters"] L --> C F --> M["Local\n Optimum"] style A fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style B fill:#ffcdd2,stroke:#c62828,stroke-width:3px style C fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style D fill:#fff3e0,stroke:#e65100,stroke-width:3px style E fill:#ffcdd2,stroke:#c62828,stroke-width:3px style F fill:#fff3e0,stroke:#e65100,stroke-width:3px style G fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style H fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style I fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style J fill:#ffcdd2,stroke:#c62828,stroke-width:3px style K fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style L fill:#fff3e0,stroke:#e65100,stroke-width:3px style M fill:#fff3e0,stroke:#e65100,stroke-width:3px