OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Types.h
Go to the documentation of this file.
1//
2// File Types
3//
4// Copyright (c) 2010 - 2013, Yves Ineichen, ETH Zürich
5// All rights reserved
6//
7// Implemented as part of the PhD thesis
8// "Toward massively parallel multi-objective optimization with application to
9// particle accelerators" (https://doi.org/10.3929/ethz-a-009792359)
10//
11// This file is part of OPAL.
12//
13// OPAL is free software: you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation, either version 3 of the License, or
16// (at your option) any later version.
17//
18// You should have received a copy of the GNU General Public License
19// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20//
21#ifndef __TYPES_H__
22#define __TYPES_H__
23
24#include <map>
25#include <utility>
26#include <vector>
27
28#include "boost/tuple/tuple.hpp"
29
31
32//FIXME: add namespaces
33
36
37
38// Variables
39
40// information the optimizer can request: either wants a derivative or a
41// function evaluation.
44
45typedef std::pair<std::string, double> namedVariable_t;
46typedef std::map<std::string, double> namedVariableCollection_t;
47
50
53//typedef boost::variant< double, boost::tuple<double, double, double> >
54 //reqVarValue_t;
55
56//FIXME: do we need InfoType_t ?
65typedef struct reqVarInfo {
67 std::vector<double> value;
69
70 template<class Archive>
71 void serialize(Archive & ar, const unsigned int /*version*/) {
72 ar & type;
73 ar & value;
74 ar & is_valid;
75 }
77
78typedef std::pair<std::string, reqVarInfo_t> namedReqVar_t;
79typedef std::map<std::string, reqVarInfo_t> reqVarContainer_t;
80
81
82
84typedef boost::tuple<std::string, double, double> DVar_t;
89};
90
91typedef std::pair<std::string, DVar_t> namedDVar_t;
92typedef std::map<std::string, DVar_t> DVarContainer_t;
93
94#endif
std::map< std::string, double > namedVariableCollection_t
Definition: Types.h:46
Position_t
Definition: Types.h:43
@ POSITION
Definition: Types.h:43
@ TIME
Definition: Types.h:43
boost::tuple< std::string, double, double > DVar_t
type of design variables
Definition: Types.h:84
std::map< std::string, DVar_t > DVarContainer_t
Definition: Types.h:92
namedVariableCollection_t variableDictionary_t
Definition: Types.h:49
InfoType_t
Definition: Types.h:42
@ EVALUATE
Definition: Types.h:42
@ DERIVATE
Definition: Types.h:42
Role_t
roles a processor can attain
Definition: Types.h:35
@ POLLER
Definition: Types.h:35
@ UNASSIGNED
Definition: Types.h:35
@ OPTIMIZER
Definition: Types.h:35
@ WORKER
Definition: Types.h:35
std::pair< std::string, double > namedVariable_t
Definition: Types.h:45
std::map< std::string, reqVarInfo_t > reqVarContainer_t
Definition: Types.h:79
DVar_tIdx
Definition: Types.h:85
@ LOWER_BOUND
Definition: Types.h:87
@ UPPER_BOUND
Definition: Types.h:88
@ VAR_NAME
Definition: Types.h:86
struct reqVarInfo reqVarInfo_t
namedVariableCollection_t Param_t
Definition: Types.h:48
std::pair< std::string, DVar_t > namedDVar_t
Definition: Types.h:91
std::pair< std::string, reqVarInfo_t > namedReqVar_t
Definition: Types.h:78
std::vector< double > value
Definition: Types.h:67
InfoType_t type
Definition: Types.h:66
bool is_valid
Definition: Types.h:68
void serialize(Archive &ar, const unsigned int)
Definition: Types.h:71