BioDynaMo  v1.05.120-25dc9790
optimization_param.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 //
3 // Copyright (C) 2021 CERN & University of Surrey for the benefit of the
4 // BioDynaMo collaboration. All Rights Reserved.
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // See the LICENSE file distributed with this work for details.
10 // See the NOTICE file distributed with this work for additional information
11 // regarding copyright ownership.
12 //
13 // -----------------------------------------------------------------------------
14 
15 #ifndef CORE_MULTI_SIMULATION_OPTIMIZATION_PARAM_H_
16 #define CORE_MULTI_SIMULATION_OPTIMIZATION_PARAM_H_
17 
19 #include "core/param/param.h"
20 #include "core/param/param_group.h"
21 
22 namespace bdm {
23 
24 struct OptimizationParam : public ParamGroup {
26 
28  this->params.resize(other.params.size());
29  int i = 0;
30  for (auto* param : other.params) {
31  this->params[i] = param->GetCopy();
32  i++;
33  }
34  this->algorithm = other.algorithm;
35  this->repetition = other.repetition;
36  }
37 
38  std::string algorithm;
39  std::vector<OptimizationParamType*> params;
40  // Number of times to repeat an experiment
41  size_t repetition = 1;
42  // Maximum number of optimization iterations
43  size_t max_iterations = 100;
44 };
45 
46 } // namespace bdm
47 
48 #endif // CORE_MULTI_SIMULATION_OPTIMIZATION_PARAM_H_
bdm::OptimizationParam::algorithm
std::string algorithm
Definition: optimization_param.h:38
optimization_param_type.h
bdm
Definition: agent.cc:39
param_group.h
bdm::OptimizationParam::repetition
size_t repetition
Definition: optimization_param.h:41
bdm::OptimizationParam::OptimizationParam
OptimizationParam(const OptimizationParam &other)
Definition: optimization_param.h:27
bdm::OptimizationParam::max_iterations
size_t max_iterations
Definition: optimization_param.h:43
bdm::OptimizationParam
Definition: optimization_param.h:24
bdm::ParamGroup
Interface for parameter groups.
Definition: param_group.h:45
bdm::OptimizationParam::params
std::vector< OptimizationParamType * > params
Definition: optimization_param.h:39
bdm::OptimizationParam::BDM_PARAM_GROUP_HEADER
BDM_PARAM_GROUP_HEADER(OptimizationParam, 1)
param.h