Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
MathOpt::PSOConfig Struct Reference

Configuration for Particle Swarm Optimization. More...

#include <MathOpt_PSO.hxx>

Inheritance diagram for MathOpt::PSOConfig:
Inheritance graph
[legend]

Public Member Functions

 PSOConfig ()
 Default constructor.
 
 PSOConfig (int theNbParticles, int theMaxIter=100, double theTolerance=1.0e-8)
 Constructor with parameters.
 
- Public Member Functions inherited from MathUtils::NDimConfig
 NDimConfig ()=default
 Default constructor.
 
 NDimConfig (double theTolerance, int theMaxIter=100, bool theUseBounds=false)
 Constructor with tolerance.
 
- Public Member Functions inherited from MathUtils::Config
 Config ()=default
 Default constructor with standard tolerances.
 
 Config (double theTolerance, int theMaxIter=100)
 Constructor with custom tolerance (sets all tolerances to same value).
 

Data Fields

int NbParticles = 40
 Number of particles in the swarm.
 
double Omega = 0.7
 Inertia weight (velocity decay)
 
double PhiPersonal = 1.5
 Personal best attraction coefficient.
 
double PhiGlobal = 1.5
 Global best attraction coefficient.
 
double VelocityClamp = 0.5
 Max velocity as fraction of search space.
 
unsigned int Seed = 6
 Random seed for reproducibility.
 
PSOInitMode InitMode = PSOInitMode::RandomOnly
 
PSOBoundaryMode BoundaryMode = PSOBoundaryMode::Clamp
 
PSOInertiaSchedule InertiaSchedule = PSOInertiaSchedule::Constant
 
double OmegaMin = 0.4
 Min inertia for LinearDecay.
 
int MinIterations = 0
 Minimum iterations before convergence.
 
std::optional< doubleTargetValue
 Early stop if best <= target (nullopt = disabled)
 
double NoImproveTol = 0.0
 Stagnation tolerance (0 = use Tolerance)
 
int NoImproveIters = 10
 Stagnation iteration threshold.
 
double RestartFraction = 0.0
 Fraction of particles to reinitialize (0 = no restarts)
 
int MaxRestarts = 0
 Maximum restart count (0 = unlimited when fraction > 0)
 
int PolishBudgetPerDim = 50
 Max polishing evals per dimension (0 = no polishing)
 
- Data Fields inherited from MathUtils::NDimConfig
bool UseBounds = false
 Whether to enforce bounds during optimization.
 
- Data Fields inherited from MathUtils::Config
int MaxIterations = 100
 Maximum number of iterations allowed.
 
double Tolerance = 1.0e-10
 General convergence tolerance.
 
double XTolerance = 1.0e-10
 Tolerance for solution change |x_{n+1} - x_n|.
 
double FTolerance = 1.0e-10
 Tolerance for function value |f(x)|.
 
double StepMin = std::numeric_limits<double>::epsilon()
 Minimum step size before declaring convergence or failure.
 

Detailed Description

Configuration for Particle Swarm Optimization.

Constructor & Destructor Documentation

◆ PSOConfig() [1/2]

MathOpt::PSOConfig::PSOConfig ( )
inline

Default constructor.

◆ PSOConfig() [2/2]

MathOpt::PSOConfig::PSOConfig ( int theNbParticles,
int theMaxIter = 100,
double theTolerance = 1.0e-8 )
inline

Constructor with parameters.

Field Documentation

◆ BoundaryMode

PSOBoundaryMode MathOpt::PSOConfig::BoundaryMode = PSOBoundaryMode::Clamp

◆ InertiaSchedule

PSOInertiaSchedule MathOpt::PSOConfig::InertiaSchedule = PSOInertiaSchedule::Constant

◆ InitMode

PSOInitMode MathOpt::PSOConfig::InitMode = PSOInitMode::RandomOnly

◆ MaxRestarts

int MathOpt::PSOConfig::MaxRestarts = 0

Maximum restart count (0 = unlimited when fraction > 0)

◆ MinIterations

int MathOpt::PSOConfig::MinIterations = 0

Minimum iterations before convergence.

◆ NbParticles

int MathOpt::PSOConfig::NbParticles = 40

Number of particles in the swarm.

◆ NoImproveIters

int MathOpt::PSOConfig::NoImproveIters = 10

Stagnation iteration threshold.

◆ NoImproveTol

double MathOpt::PSOConfig::NoImproveTol = 0.0

Stagnation tolerance (0 = use Tolerance)

◆ Omega

double MathOpt::PSOConfig::Omega = 0.7

Inertia weight (velocity decay)

◆ OmegaMin

double MathOpt::PSOConfig::OmegaMin = 0.4

Min inertia for LinearDecay.

◆ PhiGlobal

double MathOpt::PSOConfig::PhiGlobal = 1.5

Global best attraction coefficient.

◆ PhiPersonal

double MathOpt::PSOConfig::PhiPersonal = 1.5

Personal best attraction coefficient.

◆ PolishBudgetPerDim

int MathOpt::PSOConfig::PolishBudgetPerDim = 50

Max polishing evals per dimension (0 = no polishing)

◆ RestartFraction

double MathOpt::PSOConfig::RestartFraction = 0.0

Fraction of particles to reinitialize (0 = no restarts)

◆ Seed

unsigned int MathOpt::PSOConfig::Seed = 6

Random seed for reproducibility.

◆ TargetValue

std::optional<double> MathOpt::PSOConfig::TargetValue

Early stop if best <= target (nullopt = disabled)

◆ VelocityClamp

double MathOpt::PSOConfig::VelocityClamp = 0.5

Max velocity as fraction of search space.


The documentation for this struct was generated from the following file: