This repository contains the lecture materials and tutorials for the course "Applied Optimization" currently taught at the University of Hamburg. The course focuses on practical optimization techniques using the Julia programming language.
The course covers applied optimization methods with hands-on tutorials and real-world examples. Students learn to solve optimization problems using Julia and various optimization packages.
-
lectures/
- Course lecture materials- Lecture content in Quarto markdown (
.qmd
) files - Rendered HTML versions for web viewing
- Presentation slides (
*-presentation.html
) for classroom use - Supporting images and files
- Lecture content in Quarto markdown (
-
tutorials/
- Interactive tutorials and exercises- Step-by-step Julia tutorials in
.qmd
format - Hands-on exercises covering optimization concepts
- Data files and supporting materials in
data/
andimages/
- Step-by-step Julia tutorials in
-
general/
- General course information and resources
helpers/
- Post-processing automation scripts (see Helper Functions)_site/
- Generated website output (created by Quarto)_repo-md/
- Processed markdown files (created by helper scripts)_freeze/
- Quarto's computational cachesite_libs/
- Website dependencies and libraries
_quarto.yml
- Main Quarto configuration and build settings_brand.yml
- Website branding and stylingProject.toml
- Julia project dependenciesPipfile
- Python dependencies for helper scriptsjupytext.toml
- Jupytext configuration for notebook conversion
The project uses Quarto as the main build system with automated post-processing:
- Render Phase: Quarto processes
.qmd
files into HTML, creating the website in_site/
- Post-Render Phase: Helper scripts automatically process the generated content
The build pipeline is configured in _quarto.yml
:
project:
type: website
post-render:
- helpers/convert_pypercent.py
- helpers/convert_qmd_to_md.py
- helpers/create_pdf.py
The helpers/
directory contains automation scripts that run after each build:
Purpose: Converts Jupyter notebooks to Julia percent format
- Input: All
.ipynb
files in_site/tutorials/
- Output: Corresponding
.jl
files in percent format - Technology: Uses Jupytext for format conversion
- Usage: Enables easy editing of tutorials in Julia-native format
How it works:
- Finds all notebook files in the tutorials directory
- Reads each notebook using Jupytext
- Converts to Julia percent format (
.jl
files with# %%
cell separators) - Saves alongside original notebooks
Purpose: Extracts and organizes rendered markdown files
- Input: All
.md
files in_site/
- Output: Organized copy in
_repo-md/
maintaining directory structure - Usage: Creates a clean markdown repository for version control or external processing
How it works:
- Recursively finds all
.md
files in the rendered site - Recreates the directory structure in
_repo-md/
- Moves files while preserving relative paths
- Provides organized markdown output separate from HTML site
Purpose: Converts PDF files to SVG format (manual use)
- Input: PDF files in specified directory
- Output: SVG files with naming convention
- Technology: Uses
pdf2svg
command-line tool - Usage: Manual execution for converting diagrams or figures
- Julia - For running computational content
- Python - For helper scripts and Quarto
- Quarto - For building the website
- Node.js - For Playwright browser automation
-
Clone the repository:
git clone https://github.com/beyondsimulations/Applied-Optimization.git cd Applied-Optimization
-
Install Julia dependencies:
julia --project=. -e 'using Pkg; Pkg.instantiate()'
-
Install Python dependencies:
pip install pipenv pipenv install pipenv shell
-
Install Playwright browsers:
playwright install chromium
To build the complete website with all post-processing:
quarto render
This will:
- Render all
.qmd
files to HTML - Execute the post-render helper scripts
- Generate PDFs, Julia files, and organized markdown
- Create the complete website in
_site/
For development with live preview:
quarto preview
Note: Post-render scripts only run on full renders, not during preview mode.
- Create a new
.qmd
file inlectures/
following the naming convention:lecture-XX-topic.qmd
- For presentations, create a corresponding
lecture-XX-presentation.html
file - Run
quarto render
to process and generate PDFs automatically
- Create tutorial files in
tutorials/
following the pattern:tutorial-XX-YY-topic.qmd
- Include any data files in
tutorials/data/
- The build process will automatically generate Julia percent format versions
- All computational content is executed during rendering
- Julia environment is managed through
Project.toml
- Code execution is cached by Quarto for faster subsequent builds
- Fork the repository
- Create content following the established naming conventions
- Test your changes with
quarto render
- Submit a pull request
This project is licensed under the terms specified in the LICENSE file.
- Course Website: https://beyondsimulations.github.io/Applied-Optimization
- Source Repository: https://github.com/beyondsimulations/Applied-Optimization
- Quarto Documentation: https://quarto.org/
- Julia Language: https://julialang.org/