File Exchange

image thumbnail

Optimization in MATLAB: An Introduction to Quadratic Program

version 1.8.0 (102 KB) by Seth DeLand
Files used in "An Introduction to Quadratic Programming" Webinar


Updated 23 Apr 2021

View Version History

View License

A control strategy for optimal operation of a hydroelectric dam is found through nonlinear and quadratic programming techniques. We use symbolic math to formulate an original model of the hydroelectric dam and then optimize the operation schedule using FMINCON. We then show how improvements can be made to the optimization process and end up with a quadratic programming problem that can be solved efficiently using the large-scale "interior-point-convex" algorithm with the QUADPROG solver.
These files go along with the "An Introduction to Quadratic Programming" webinar, which can be found here:

Cite As

Seth DeLand (2021). Optimization in MATLAB: An Introduction to Quadratic Program (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (13)

Bakrey Bsata

Thank you soo much :)
Good luck

Jinwei Zhang

Jinwei Zhang


Great work! One question, why beq is not equal to 90000 what is a final storage value? but instead to sum(inflow)? Thanks a lot!

Jegvan hansen

Leandro Coelho


You adopt the HydroelectricDamOptimization problem. Is there the description of this optimization problem in scientific papers and/or books?

Phillip Maser

Its amazing how the tools work to generate answers to polynomial problems.

Wei Xiong

dzu le ngoc

thank you for Watching this File Optimization in MATLAB: An Introduction to Quadratic Programming.





great optimization problem and solution !
and very close to my job -> so i bought symobolic math toolbox and start to work on this example
I tried to adapt HydroelectricDamOptimization_largeScale to my problem (a 1 year problem with calculation every 8 hours)

and I ave some issues
some time the problem is not convex ! and i donc understand why
for example, in HydroelectricDamOptimization_largeScale we have MW2kW = 1000. with MW2kW = 1/1000, the probleme become non convex!
an idea why ? an idea to manage this issue ?
(this is just a stupid example, but I have this kind of issues when I try to adapt this exemple on real life)

thanks (and sorry for my poor english)

MATLAB Release Compatibility
Created with R2021a
Compatible with R2011b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!