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
.qmdformat - 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
.qmdfiles 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.pyThe helpers/ directory contains automation scripts that run after each build:
Purpose: Converts Jupyter notebooks to Julia percent format
- Input: All
.ipynbfiles in_site/tutorials/ - Output: Corresponding
.jlfiles 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 (
.jlfiles with# %%cell separators) - Saves alongside original notebooks
Purpose: Extracts and organizes rendered markdown files
- Input: All
.mdfiles 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
.mdfiles 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
pdf2svgcommand-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
-
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:
uv sync
To build the complete website with all post-processing:
quarto renderThis will:
- Render all
.qmdfiles 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 previewNote: Post-render scripts only run on full renders, not during preview mode.
- Create a new
.qmdfile inlectures/following the naming convention:lecture-XX-topic.qmd - For presentations, create a corresponding
lecture-XX-presentation.htmlfile - Run
quarto renderto 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/