Pyomo (wwwpyomoorg) is a mature and widely used Python library for expressing and solving a wide range of mathematical programs  ie  algebraic optimization models Pyomo allows users to specify optimization models with linear  non-linear (including differential algebraic and ordinary differential equations)  mixed discrete-continuous  and stochastic components