OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
StepSizeConfiguration.h
Go to the documentation of this file.
1 #ifndef _OMS_STEP_SIZE_CONFIGURATION_H_
2 #define _OMS_STEP_SIZE_CONFIGURATION_H_
3 
4 #include "ComRef.h"
5 #include "Types.h"
6 #include <vector>
7 
8 namespace oms
9 {
11  {
12  //auxiliary data structures
13  struct StaticBound
14  {
15  double lower;
16  double upper;
17  double stepSize;
18  };
19 
20  struct DynamicBound
21  {
22  const ComRef lower;
23  const ComRef upper;
24  double stepSize;
25  };
26 
27  public:
30 
31  // data structure class - only getters and setters
34  oms_status_enu_t addStaticValueIndicator(const ComRef& signal, double lowerBound, double upperBound, double stepSize);
36  std::vector<ComRef> getEventIndicators() {return eventIndicators;}
37  std::vector<ComRef> getTimeIndicators() {return timeIndicators;}
38  std::vector<std::pair<const ComRef,std::vector<DynamicBound>>> getDynamicThresholds(){return dynamicIntervals;}
39  std::vector<std::pair<const ComRef,std::vector<StaticBound>>> getStaticThresholds() {return staticIntervals;}
40 
41  private:
42  std::vector<ComRef> eventIndicators;
43  std::vector<ComRef> timeIndicators;
44  std::vector<std::pair<const ComRef,std::vector<StaticBound>>> staticIntervals;
45  std::vector<std::pair<const ComRef,std::vector<DynamicBound>>> dynamicIntervals;
46  };
47 }
48 
49 #endif
Definition: StepSizeConfiguration.h:20
const ComRef lower
Definition: StepSizeConfiguration.h:22
double stepSize
Definition: StepSizeConfiguration.h:24
oms_status_enu_t addStaticValueIndicator(const ComRef &signal, double lowerBound, double upperBound, double stepSize)
Definition: StepSizeConfiguration.cpp:15
double stepSize
Definition: StepSizeConfiguration.h:17
const ComRef upper
Definition: StepSizeConfiguration.h:23
oms_status_enu_t
Definition: Types.h:43
double upper
Definition: StepSizeConfiguration.h:16
~StepSizeConfiguration()
Definition: StepSizeConfiguration.h:29
StepSizeConfiguration()
Definition: StepSizeConfiguration.h:28
oms_status_enu_t addDynamicValueIndicator(const ComRef &signal, const ComRef &lower, const ComRef &upper, double stepSize)
Definition: StepSizeConfiguration.cpp:41
ComRef - component reference.
Definition: ComRef.h:46
std::vector< std::pair< const ComRef, std::vector< DynamicBound > > > getDynamicThresholds()
Definition: StepSizeConfiguration.h:38
std::vector< std::pair< const ComRef, std::vector< StaticBound > > > staticIntervals
Definition: StepSizeConfiguration.h:44
double lower
Definition: StepSizeConfiguration.h:15
Definition: AlgLoop.h:44
Definition: StepSizeConfiguration.h:10
Definition: StepSizeConfiguration.h:13
std::vector< ComRef > getEventIndicators()
Definition: StepSizeConfiguration.h:36
const char * signal
Definition: Tags.cpp:38
std::vector< std::pair< const ComRef, std::vector< StaticBound > > > getStaticThresholds()
Definition: StepSizeConfiguration.h:39
std::vector< ComRef > timeIndicators
Definition: StepSizeConfiguration.h:43
oms_status_enu_t addTimeIndicator(const ComRef &signal)
Definition: StepSizeConfiguration.cpp:9
std::vector< ComRef > getTimeIndicators()
Definition: StepSizeConfiguration.h:37
std::vector< std::pair< const ComRef, std::vector< DynamicBound > > > dynamicIntervals
Definition: StepSizeConfiguration.h:45
std::vector< ComRef > eventIndicators
Definition: StepSizeConfiguration.h:42
oms_status_enu_t addEventIndicator(const ComRef &signal)
Definition: StepSizeConfiguration.cpp:3