OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
OptimizeCmd.h
Go to the documentation of this file.
1#ifndef OPAL_OptimizeCmd_HH
2#define OPAL_OptimizeCmd_HH
3
5
6#include "Util/CmdArguments.h"
7#include "Optimize/DVar.h"
9
10#include <string>
11
12// Class OptimizeCmd
13// ------------------------------------------------------------------------
15
16class OptimizeCmd: public Action {
17
18public:
19
22
23 virtual ~OptimizeCmd();
24
26 virtual OptimizeCmd *clone(const std::string &name);
27
29 virtual void execute();
30
31private:
32
33 // Not implemented.
34 OptimizeCmd(const OptimizeCmd &) = delete;
35 void operator=(const OptimizeCmd &) = delete;
36
37 // Clone constructor.
38 OptimizeCmd(const std::string &name, OptimizeCmd *parent);
39
40 void stashEnvironment();
41 void popEnvironment();
42
43 enum CrossOver {
44 Blend = 0,
48 };
49
50 CrossOver crossoverSelection(std::string crossover);
51
52 enum Mutation {
54 OneBit = 20
55 };
56
57 Mutation mutationSelection(std::string mutation);
58
59 void run(const CmdArguments_t& args,
60 const functionDictionary_t& funcs,
61 const DVarContainer_t& dvars,
62 const Expressions::Named_t& objectives,
63 const Expressions::Named_t& constraints);
64};
65
66#endif
std::map< std::string, DVar_t > DVarContainer_t
Definition: Types.h:92
boost::shared_ptr< CmdArguments > CmdArguments_t
Definition: CmdArguments.h:176
const std::string name
std::map< std::string, client::function::type > functionDictionary_t
Definition: Expression.h:56
std::map< std::string, Expressions::Expr_t * > Named_t
type of an expressions with a name
Definition: Expression.h:74
The base class for all OPAL actions.
Definition: Action.h:30
The OPTIMIZE command.
Definition: OptimizeCmd.h:16
virtual ~OptimizeCmd()
virtual OptimizeCmd * clone(const std::string &name)
Make clone.
CrossOver crossoverSelection(std::string crossover)
void popEnvironment()
Mutation mutationSelection(std::string mutation)
void operator=(const OptimizeCmd &)=delete
void run(const CmdArguments_t &args, const functionDictionary_t &funcs, const DVarContainer_t &dvars, const Expressions::Named_t &objectives, const Expressions::Named_t &constraints)
void stashEnvironment()
virtual void execute()
Execute the command.
OptimizeCmd()
Exemplar constructor.
OptimizeCmd(const OptimizeCmd &)=delete