Tutorials
This section contains step-by-step tutorials that guide you through complete
working examples. Each tutorial builds on concepts from the Usage
documentation and demonstrates practical applications of ropt.
Rosenbrock Function Tutorials
These tutorials demonstrate optimization of the multi-dimensional Rosenbrock function, progressing from a simple deterministic case to stochastic optimization with different implementation approaches:
-
Deterministic Optimization — The simplest example: optimizing the classic Rosenbrock function with fixed parameters. Start here to understand the basics.
-
Ensemble-based Optimization — Introduces uncertainty by sampling parameters across multiple realizations. Uses
BasicOptimizerwith a batch evaluation callback. -
Using FunctionEvaluator — Using
FunctionEvaluatorwith a per-evaluation function callback. This approach is simpler to write when you don't need to handle batches. -
Using the Workflow Framework — Using the workflow framework directly with
OptimizationStep. This approach offers more control and flexibility for complex workflows. -
Constrained Optimization — Adding linear and nonlinear constraints to the optimization problem.
Prerequisites
Before starting these tutorials, you should be familiar with:
- Installation — How to install
ropt - Background — Core concepts of ensemble-based optimization
- Quickstart — A minimal working example
Each tutorial provides complete, runnable code that you can copy and experiment with. The full source code for all examples is available in the examples directory of the repository.