Optimization#
π Optimization API Reference
Given that the main purpose of the SigmaEpsilon ecosystem is to facilitate structural optimization, this submodule needs no further elaboration, as having a capable optimization toolkit is essential for the project. The overarching approach is to utilize third-party solutions whenever feasible, though we also provide essential solutions when necessary or fill in the gaps wherever required.
Note
Most of the classes for optimization rely on other classes like Function or Relation. Before you proceed forward, it might be a good idea to check them out first here.
Linear Programming (LP)#
π Linear Programming API Reference
The library offers a solver for a wide range of linear optimization problems, including continuous, integer and mixed-integer problems, built around SciPyβs linprog and SymPy. See Linear Programming (LP) for the basic API, a 2d example visualized with Matplotlib, and mixed-integer programs.
Nonlinear Programming (NLP)#
π Nonlinear Programming API Reference
Nonlinear programming deals with problems where the objective function, the constraints, or both are nonlinear. The library provides a small family of genetic algorithms (GAs) for this purpose:
Genetic Algorithms β an introduction to genetic algorithms in general, and a full walkthrough of the Binary Genetic Algorithm (BGA).
Real-Valued and Integer Genetic Algorithms β the Real-Valued (RGA) and Integer (IGA) genetic algorithms.
Selection Strategies and Population Diversity β pluggable selection strategies and monitoring population diversity.
Performance and Advanced Usage β vectorized and parallel objective evaluation, choosing a representation, and posing objectives symbolically.
Building a Custom Genetic Algorithm β a full, worked example of subclassing the framework for a custom representation.
Ant Colony Optimization (ACO)#
π Ant Colony Optimization API Reference
Ant Colony Optimization (ACO) is another nature-inspired metaheuristic, this time based on the pheromone-trail-following behavior of foraging ants. Unlike the GA family, which evolves a population of candidate solutions directly, ACO builds solutions incrementally (step by step) and steers the construction process with a shared memory (the βpheromonesβ) that gets reinforced along good solutions and decays over time. See Ant Colony Optimization (ACO) for how the continuous (ACOR) and combinatorial (Ant System / TSP) variants work, when to reach for them instead of a GA or linprog, and worked examples of both.