-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathosp_config_parser.hpp
51 lines (39 loc) · 1.28 KB
/
osp_config_parser.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* \file
*
* \copyright
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#ifndef LIBCOSIM_OSP_CONFIG_PARSER_HPP
#define LIBCOSIM_OSP_CONFIG_PARSER_HPP
#include <cosim/algorithm.hpp>
#include <cosim/model_description.hpp>
#include <cosim/orchestration.hpp>
#include <cosim/system_structure.hpp>
#include <cosim/time.hpp>
namespace cosim
{
/// The information contained in an OSP-IS system structure file.
struct osp_config
{
/// The system structure
cosim::system_structure system_structure;
// The algorithm
std::variant<cosim::fixed_step_algorithm_params, cosim::ecco_algorithm_params> algorithm_configuration;
/// The default start time for a simulation
time_point start_time;
/// The optional end time for a simulation
std::optional<time_point> end_time = std::nullopt;
/// A set of default initial values
variable_value_map initial_values;
};
/**
* Loads an OSP-IS system structure file.
*/
osp_config load_osp_config(
const cosim::filesystem::path& configPath,
cosim::model_uri_resolver& resolver);
} // namespace cosim
#endif // LIBCOSIM_OSP_CONFIG_PARSER_HPP