Skip to content

A simple example of an optimization problem in Streamlit.

Notifications You must be signed in to change notification settings

forstertim/streamlit_optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mathematical Optimization with Streamlit 🚀

Let's run an optimization problem on Streamlit ❤️

In the top of this simple app, one can choose the type of objective function we would like to minimize, which is either a linear (will be solved with Pyomo) one, or a nonlinear (will be solved using GEKKO) one.

Since this is a very simple example, we stick to the following objective functions:

  • linear: $F(x) = c_1x_1 + c_2x_2$
  • nonlinear: $F(x) = c_1x_1^2 + c_2x_2$

The constraints are the following (equal in both cases):

  • $f_1: \quad a_1x_1 + a_2x_2 \geq b_1$
  • $f_2: \quad x_2 \geq b_2$
  • $f_3: \quad x_i \geq 0, \quad i=1,2$

The app is stored on the publicly available Streamlit cloud here ⛅, where you can choose values for the paramaters $a_1, a_2, b_1, b_2, c_1, c_2$ and check how the optimal solution is affected. 😄

About

A simple example of an optimization problem in Streamlit.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages