Skip to main content

UI

Plan the Buildout
App Build Plan Python UI
We sketch a plan for building our optimization application, starting with a bare-bones optimization model and then adding a data connection and simple text-based UI. Later we swap out the AMPL scripting language for Python and the text-based UI for Streamlit, and then containerize the app.
Add a Text-based User Interface
Flat Files UI AMPL
We add a simple but functional, attractive text-based user interface by way of a flat data file formatted for good readability and manual data input.
User Interfaces
UI Flat Files Streamlit
A look at practical as well as fancy means by which humans can interact with optimization models during development and in production.
Add a Streamlit User Interface
Streamlit UI AI-Assisted Coding
Now that our optimization app’s non-model logic script (aka ’the main script’) is in Python, we add a lovely Streamlit UI to replace our text-based UI, created with help from our cheerful AI coding assistant.
Go Dynamic! ...with iterative solving
Dynamic Optimization UI Streamlit AMPL
Our new Streamlit interface makes it easy to imagine and implement an important new feature: the ability to ‘pin’ one or more suggested LEGO® sets, discarding the others, and resolving, so that the user can iteratively arrive at an attractive collection of buildable sets.