OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <FixedPisaNsga2.h>
Public Types | |
typedef std::vector< Individual > | SolutionState_t |
type used in solution state exchange with other optimizers More... | |
typedef Individual | Individual_t |
type of our variator More... | |
typedef Variator< Individual_t, CrossoverOperator, MutationOperator > | Variator_t |
typedef Population< Individual_t > | Population_t |
using | individual = boost::shared_ptr< typename FixedPisaNsga2::Individual_t > |
alias for usage in template More... | |
Public Types inherited from Optimizer | |
typedef std::vector< std::pair< double, double > > | bounds_t |
type of bounds for design variables More... | |
Public Member Functions | |
FixedPisaNsga2 (Expressions::Named_t objectives, Expressions::Named_t constraints, DVarContainer_t dvars, size_t dim, Comm::Bundle_t comms, CmdArguments_t args, std::vector< double > hypervolRef, int nrWorkerGroups) | |
~FixedPisaNsga2 () | |
virtual void | initialize () |
Starting selection algorithm and variator PISA state machine. More... | |
Public Member Functions inherited from Optimizer | |
Optimizer (MPI_Comm comm) | |
virtual | ~Optimizer () |
Protected Member Functions | |
void | writeVariatorCfg () |
Write the variator config file. More... | |
void | dispatch_forward_solves () |
virtual bool | onMessage (MPI_Status status, size_t length) |
implementing poller hooks More... | |
virtual void | postPoll () |
executed after handling (if any) new request More... | |
virtual void | setupPoll () |
executed before starting polling loop More... | |
virtual void | prePoll () |
executed before checking for new request More... | |
virtual void | onStop () |
enable implementation to react to STOP tag More... | |
Protected Member Functions inherited from Poller | |
virtual void | run () |
Poller (MPI_Comm comm, double delay=0.1) | |
virtual | ~Poller () |
Private Types | |
enum | PisaState_t { Initialize = 0 , InitializeSelector = 1 , Variate = 2 , Select = 3 , Stop = 4 , VariatorStopped = 5 , VariatorTerminate = 6 } |
all PISA states More... | |
Private Member Functions | |
std::string | getStateString (PisaState_t) const |
void | startSelector (std::string filename_base) |
void | runStateMachine () |
executes one loop of the PISA state machine More... | |
void | toSelectorAndCommit () |
passes finished individuals to the selector More... | |
void | exchangeSolutionStates () |
if necessary exchange solution state with other optimizers More... | |
void | selection () |
void | mergeOffspring () |
void | calcFitnesses () |
void | calcDistances () |
void | environmentalSelection () |
void | matingSelection () |
int | dominates (individual ind_a, individual ind_b) |
bool | checkParetoFront (unsigned int id) |
check if individual in pareto front and add if not More... | |
void | dumpPopulation (boost::shared_ptr< Population_t >) |
void | dumpPopulationToFile (boost::shared_ptr< Population_t >, std::ostringstream &filename, bool dump_offspring) |
void | dumpPopulationToJSON (boost::shared_ptr< Population_t >, std::ostringstream &filename, bool dump_offspring) |
void | dumpIndividualToFile (int id, individual &ind, std::ofstream &file, const size_t numDigits) |
void | dumpIndividualToJSON (int id, individual &ind, boost::property_tree::ptree &tree) |
int | irand (int range) |
Private Attributes | |
int | seed |
const int | tournament_m = 1 |
PisaState_t | curState_m |
the current state of the state machine More... | |
boost::scoped_ptr< Statistics< size_t > > | statistics_ |
collect some statistics of rejected and accepted individuals More... | |
boost::scoped_ptr< Variator_t > | variator_m |
std::vector< unsigned int > | pp_all |
IDs of population. More... | |
std::vector< unsigned int > | parent_queue_ |
IDs that will make new offspring. More... | |
std::set< unsigned int > | to_selector_ |
Successfully run IDs to go into population. More... | |
std::vector< int > | copies |
number of individuals in the n-th front More... | |
std::vector< double > | dist |
std::vector< std::vector< int > > | front |
individuals in each front More... | |
std::map< size_t, double > | fitness_ |
map between id and fitness (sum of front number and dist) More... | |
Comm::Bundle_t | comms_ |
communicator bundle for the optimizer More... | |
std::deque< unsigned int > | finishedBuffer_m |
buffer holding all finished job id's More... | |
std::map< size_t, individual > | jobmapping_m |
mapping from unique job ID to individual More... | |
boost::shared_ptr< Population_t > | paretoFront_m |
population of pareto-front (for final output) More... | |
bool | initialized_m |
indicating if initial population has been created More... | |
bounds_t | dVarBounds_m |
bounds on each specified gene More... | |
Expressions::Named_t | objectives_m |
objectives More... | |
Expressions::Named_t | constraints_m |
constraints More... | |
DVarContainer_t | dvars_m |
design variables More... | |
CmdArguments_t | args_m |
command line arguments specified by the user More... | |
size_t | alpha_m |
size of initial population More... | |
bool | initialOptimization_m |
initial population optimization flag (increases initial population) More... | |
bool | birthControl_m |
enforce strict population size More... | |
std::string | file_start_m |
population file to be started from More... | |
size_t | lambda_m |
number of parents the selector chooses More... | |
size_t | dim_m |
number of objectives More... | |
size_t | act_gen = 1 |
current generation More... | |
size_t | maxGenerations_m |
maximal generation (stopping criterion) More... | |
int | num_workergroups_m |
number of individuals running More... | |
std::string | resultFile_m |
result file name More... | |
std::string | resultDir_m |
int | dump_freq_m |
bool | dump_offspring_m |
dump offspring / parents flag More... | |
bool | dump_dat_m |
dump old data format More... | |
double | hvol_eps_ |
convergence accuracy if maxGenerations not set More... | |
double | expected_hvol_ |
double | current_hvol_ |
double | conv_hvol_progress_ |
double | hvol_progress_ |
std::vector< double > | hvol_ref_m |
hypervolume reference point More... | |
std::string | file_param_descr_ |
file header for result files contains this parameter description More... | |
boost::chrono::system_clock::time_point | run_clock_start_ |
boost::chrono::system_clock::time_point | last_clock_ |
boost::scoped_ptr< Trace > | job_trace_ |
boost::scoped_ptr< Trace > | progress_ |
size_t | exchangeSolStateFreq_m |
how often do we exchange solutions with other optimizers More... | |
Additional Inherited Members | |
Protected Attributes inherited from Poller | |
MPI_Comm | comm_m |
communicator the poller listens to requests More... | |
bool | is_running_ |
double | last_polled_ |
time of last MPI_Test More... | |
double | poll_delay_ |
delay in seconds between polls More... | |
Definition at line 69 of file FixedPisaNsga2.h.
using FixedPisaNsga2< CrossoverOperator, MutationOperator >::individual = boost::shared_ptr<typename FixedPisaNsga2::Individual_t> |
alias for usage in template
Definition at line 106 of file FixedPisaNsga2.h.
typedef Individual FixedPisaNsga2< CrossoverOperator, MutationOperator >::Individual_t |
type of our variator
Definition at line 101 of file FixedPisaNsga2.h.
typedef Population< Individual_t > FixedPisaNsga2< CrossoverOperator, MutationOperator >::Population_t |
Definition at line 104 of file FixedPisaNsga2.h.
typedef std::vector< Individual > FixedPisaNsga2< CrossoverOperator, MutationOperator >::SolutionState_t |
type used in solution state exchange with other optimizers
Definition at line 99 of file FixedPisaNsga2.h.
typedef Variator< Individual_t, CrossoverOperator, MutationOperator > FixedPisaNsga2< CrossoverOperator, MutationOperator >::Variator_t |
Definition at line 103 of file FixedPisaNsga2.h.
|
private |
all PISA states
Enumerator | |
---|---|
Initialize | |
InitializeSelector | |
Variate | |
Select | |
Stop | |
VariatorStopped | |
VariatorTerminate |
Definition at line 133 of file FixedPisaNsga2.h.
FixedPisaNsga2< CrossoverOperator, MutationOperator >::FixedPisaNsga2 | ( | Expressions::Named_t | objectives, |
Expressions::Named_t | constraints, | ||
DVarContainer_t | dvars, | ||
size_t | dim, | ||
Comm::Bundle_t | comms, | ||
CmdArguments_t | args, | ||
std::vector< double > | hypervolRef, | ||
int | nrWorkerGroups | ||
) |
Retrieves all (for the optimizer) relevant arguments specified on the command line, initializes the variator and sets up statistics and debug traces.
[in] | objectives | of optimization problem |
[in] | constraints | of optimization problem |
[in] | dvars | of optimization problem |
[in] | dim | number of objectives |
[in] | comms | available to the optimizer |
[in] | args | the user passed on the command line |
[in] | hypervolRef | hypervolume reference point |
FixedPisaNsga2< CrossoverOperator, MutationOperator >::~FixedPisaNsga2 | ( | ) |
|
private |
|
private |
|
private |
check if individual in pareto front and add if not
|
protected |
helper sending evaluation requests to the pilot
|
private |
|
private |
|
private |
|
private |
Dumps index, objective values and bit string of all individuals in global_population.
|
private |
|
private |
|
private |
|
private |
if necessary exchange solution state with other optimizers
|
private |
|
virtual |
Starting selection algorithm and variator PISA state machine.
Implements Optimizer.
|
inlineprivate |
Get a random integer between [0, range]
[in] | range | of random number |
Definition at line 298 of file FixedPisaNsga2.h.
|
private |
|
private |
|
protectedvirtual |
implementing poller hooks
Implements Optimizer.
|
inlineprotectedvirtual |
enable implementation to react to STOP tag
Implements Optimizer.
Definition at line 124 of file FixedPisaNsga2.h.
|
protectedvirtual |
executed after handling (if any) new request
Implements Optimizer.
|
inlineprotectedvirtual |
executed before checking for new request
Implements Optimizer.
Definition at line 118 of file FixedPisaNsga2.h.
|
private |
executes one loop of the PISA state machine
|
private |
|
inlineprotectedvirtual |
executed before starting polling loop
Implements Optimizer.
Definition at line 117 of file FixedPisaNsga2.h.
|
private |
|
private |
passes finished individuals to the selector
|
protected |
Write the variator config file.
|
private |
current generation
Definition at line 216 of file FixedPisaNsga2.h.
|
private |
size of initial population
Definition at line 201 of file FixedPisaNsga2.h.
|
private |
command line arguments specified by the user
Definition at line 198 of file FixedPisaNsga2.h.
|
private |
enforce strict population size
Definition at line 205 of file FixedPisaNsga2.h.
|
private |
communicator bundle for the optimizer
Definition at line 174 of file FixedPisaNsga2.h.
|
private |
constraints
Definition at line 193 of file FixedPisaNsga2.h.
|
private |
Definition at line 237 of file FixedPisaNsga2.h.
|
private |
number of individuals in the n-th front
Definition at line 168 of file FixedPisaNsga2.h.
|
private |
Definition at line 236 of file FixedPisaNsga2.h.
|
private |
the current state of the state machine
Definition at line 155 of file FixedPisaNsga2.h.
|
private |
number of objectives
Definition at line 214 of file FixedPisaNsga2.h.
|
private |
Definition at line 169 of file FixedPisaNsga2.h.
|
private |
dump old data format
Definition at line 232 of file FixedPisaNsga2.h.
|
private |
Definition at line 228 of file FixedPisaNsga2.h.
|
private |
dump offspring / parents flag
Definition at line 230 of file FixedPisaNsga2.h.
|
private |
bounds on each specified gene
Definition at line 189 of file FixedPisaNsga2.h.
|
private |
design variables
Definition at line 195 of file FixedPisaNsga2.h.
|
private |
how often do we exchange solutions with other optimizers
Definition at line 264 of file FixedPisaNsga2.h.
|
private |
Definition at line 235 of file FixedPisaNsga2.h.
|
private |
file header for result files contains this parameter description
Definition at line 244 of file FixedPisaNsga2.h.
|
private |
population file to be started from
Definition at line 207 of file FixedPisaNsga2.h.
|
private |
buffer holding all finished job id's
Definition at line 177 of file FixedPisaNsga2.h.
|
private |
map between id and fitness (sum of front number and dist)
Definition at line 171 of file FixedPisaNsga2.h.
|
private |
individuals in each front
Definition at line 170 of file FixedPisaNsga2.h.
|
private |
convergence accuracy if maxGenerations not set
Definition at line 234 of file FixedPisaNsga2.h.
|
private |
Definition at line 238 of file FixedPisaNsga2.h.
|
private |
hypervolume reference point
Definition at line 241 of file FixedPisaNsga2.h.
|
private |
indicating if initial population has been created
Definition at line 186 of file FixedPisaNsga2.h.
|
private |
initial population optimization flag (increases initial population)
Definition at line 203 of file FixedPisaNsga2.h.
|
private |
Definition at line 250 of file FixedPisaNsga2.h.
|
private |
mapping from unique job ID to individual
Definition at line 180 of file FixedPisaNsga2.h.
|
private |
number of parents the selector chooses
number of children the variator produces
Definition at line 212 of file FixedPisaNsga2.h.
|
private |
Definition at line 247 of file FixedPisaNsga2.h.
|
private |
maximal generation (stopping criterion)
Definition at line 218 of file FixedPisaNsga2.h.
|
private |
number of individuals running
Definition at line 220 of file FixedPisaNsga2.h.
|
private |
objectives
Definition at line 191 of file FixedPisaNsga2.h.
|
private |
IDs that will make new offspring.
Definition at line 163 of file FixedPisaNsga2.h.
|
private |
population of pareto-front (for final output)
Definition at line 183 of file FixedPisaNsga2.h.
|
private |
IDs of population.
Definition at line 162 of file FixedPisaNsga2.h.
|
private |
Definition at line 251 of file FixedPisaNsga2.h.
|
private |
Definition at line 224 of file FixedPisaNsga2.h.
|
private |
result file name
Definition at line 223 of file FixedPisaNsga2.h.
|
private |
Definition at line 246 of file FixedPisaNsga2.h.
|
private |
Definition at line 151 of file FixedPisaNsga2.h.
|
private |
collect some statistics of rejected and accepted individuals
Definition at line 158 of file FixedPisaNsga2.h.
|
private |
Successfully run IDs to go into population.
Definition at line 165 of file FixedPisaNsga2.h.
|
private |
Definition at line 152 of file FixedPisaNsga2.h.
|
private |
Definition at line 160 of file FixedPisaNsga2.h.