OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Simulation.h
Go to the documentation of this file.
1//
2// Class Simulation
3// Abstract class every simulation has to implement to be able to
4// work with the optimization pilot.
5//
6// To be supported the simulation code has to be called as a library taking
7// as an argument an MPI communicator specifying on which processors the
8// simulation runs.
9//
10// TODO:
11// - formulate the 'simulation' part as a pipeline.. workers can simply put
12// together their own pipelines situation-dependent.
13//
14// Copyright (c) 2010 - 2013, Yves Ineichen, ETH Zürich
15// All rights reserved
16//
17// Implemented as part of the PhD thesis
18// "Toward massively parallel multi-objective optimization with application to
19// particle accelerators" (https://doi.org/10.3929/ethz-a-009792359)
20//
21// This file is part of OPAL.
22//
23// OPAL is free software: you can redistribute it and/or modify
24// it under the terms of the GNU General Public License as published by
25// the Free Software Foundation, either version 3 of the License, or
26// (at your option) any later version.
27//
28// You should have received a copy of the GNU General Public License
29// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
30//
31#ifndef __SIMULATION_H__
32#define __SIMULATION_H__
33
34#include "Util/Types.h"
35#include "Util/CmdArguments.h"
36
38
39public:
40
42 : args_(args)
43 {}
44
46 {}
47
49
57 virtual void run() = 0;
58
65 virtual void collectResults() = 0;
66
71
72private:
74
75};
76
77#endif
std::map< std::string, reqVarInfo_t > reqVarContainer_t
Definition: Types.h:79
boost::shared_ptr< CmdArguments > CmdArguments_t
Definition: CmdArguments.h:176
Simulation(CmdArguments_t args)
Definition: Simulation.h:41
virtual void collectResults()=0
CmdArguments_t args_
Definition: Simulation.h:73
CmdArguments_t getArgs()
Definition: Simulation.h:48
virtual void run()=0
virtual reqVarContainer_t getResults()=0