Skip to content

Notebooks to support teaching material for the engineering systems optimization course (MECH559)

Notifications You must be signed in to change notification settings

khbalhandawi/MECH559_notebooks

Repository files navigation

MECH 559 examples

Detailed description of included files

Colab Notebooks

There are google colab versions of these notebooks in the table below:

Lecture Items
1 Multi-objective optimization of a beam Open In Colab
Interactive examples for 1D and 2D multi-objective optimization problems Open In Colab
3 Examples on continuity, set theory, and extreme value theorem Open In Colab
Interactive versions of above examples and a monotonicity example Open In Colab
4 Examples on polynomial regression, RBFs, and Kriging Open In Colab
Interactive versions of some of the above examples Open In Colab
5 Detailed derivation of multi-variate version of FONCs and SOSCs Open In Colab
Example on the Taylor's series for local approximations Open In Colab
Interactive example on Taylor's series Open In Colab
An analytical example for solving unconstrained problems using FONCs and SOSCs Open In Colab
6 Example set with various gradient-based optimization algorithms
(gradient descent, Newton methods, Conjugate gradients, and Cholesky factorization) Open In Colab
Interactive example using line search on a quadratic unconstrained problem Open In Colab
Interactive example using line search on the bean function Open In Colab
Interactive example using line search on the Himmelblau function Open In Colab
7 Solving the linear programming farmer's problem using the method of basic solutions and the simplex algorithm Open In Colab
Solving a general linear programming problem using `scipy.linprog` and simplex (using the standard form) Open In Colab
8 Various analytical constrained optimization examples solved using the KKT conditions Open In Colab
9 Examples of various constraint handling methods including penalty and augmented Lagrangian methods Open In Colab
A general NLP example solved using scipy.optimize Open In Colab
10 A blackbox optimization problem solved using Mesh Adaptive Direct search ** Open In Colab
11 A comparison of various MDO architectures for solving a numerical problem Open In Colab
A realistic MDO example based on the supersonic business jet problem solved using NHATC Open In Colab

** Source files for compiling a blackbox

Prerequisites

  • MATLAB (2019) or later with

    • Optimization Toolbox
    • Global Optimization Toolbox
    • Symbolic Math Toolbox
  • Julia 1.7 or later with

    • IJulia
    • WebIO
    • Interact
    • LaTeXStrings
    • Plots
    • PyPlot
    • LatinHypercubeSampling
    • MLBase
    • Surrogates
    • CSV
  • Python 3.8 or later with dependencies in requirements.txt

Installing Jupyter

To install Jupyter you need to have an existing Python installation (Anaconda or otherwise). You may then use the following commands in the console

  • Linux/MacOS
pip3 install jupyter
python3 -m pip install --upgrade webio_jupyter_extension
  • Windows
pip install jupyter
python -m pip install --upgrade webio_jupyter_extension

Installing Julia

The Julia interpreter and compiler can be downloaded from http://julialang.org/downloads/

Julia can be installed on major OS: Windows, MacOS X, Linux. Under Windows, it is possible to launch Julia via the start menu or, if present, by clicking on the appropriate icon. Under Linux, to launch the Julia interpreter in interactive mode, just enter at the terminal level

Julia

Note for windows: Be sure to check the "add to PATH" option during installation to add Julia to your environment variables.

Installing packages

use the following command to install all the prerequisite packages for this course

using Pkg
Pkg.add.(["IJulia", "WebIO", "Interact", "LaTeXStrings", "Plots", "PyPlot", "LatinHypercubeSampling", "MLBase", "Surrogates", "CSV"])

Setting up your Python environment

MacOS/Linux

Create a virtual environment where you can install the required packages for this class locally

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Windows

python -m venv .env
.env\Scripts\activate
pip install -r requirements.txt

After setting up your virtual environment you need to add it to the list of jupyter kernels. Inside jupyter go to select kernel and select .env from the list of environments

ipython kernel install --user --name=.env

About

Notebooks to support teaching material for the engineering systems optimization course (MECH559)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages