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 "OMSimulator/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
32  oms_status_enu_t addDynamicValueIndicator(const ComRef& signal,const ComRef& lower,const ComRef& upper,double stepSize);
33  oms_status_enu_t addEventIndicator(const ComRef& signal);
34  oms_status_enu_t addStaticValueIndicator(const ComRef& signal, double lowerBound, double upperBound, double stepSize);
35  oms_status_enu_t addTimeIndicator(const ComRef& signal);
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
ComRef - component reference.
Definition: ComRef.h:47
Definition: StepSizeConfiguration.h:11
oms_status_enu_t addStaticValueIndicator(const ComRef &signal, double lowerBound, double upperBound, double stepSize)
Definition: StepSizeConfiguration.cpp:15
oms_status_enu_t addEventIndicator(const ComRef &signal)
Definition: StepSizeConfiguration.cpp:3
StepSizeConfiguration()
Definition: StepSizeConfiguration.h:28
std::vector< ComRef > getTimeIndicators()
Definition: StepSizeConfiguration.h:37
std::vector< std::pair< const ComRef, std::vector< StaticBound > > > staticIntervals
Definition: StepSizeConfiguration.h:44
std::vector< ComRef > timeIndicators
Definition: StepSizeConfiguration.h:43
std::vector< std::pair< const ComRef, std::vector< DynamicBound > > > dynamicIntervals
Definition: StepSizeConfiguration.h:45
std::vector< std::pair< const ComRef, std::vector< StaticBound > > > getStaticThresholds()
Definition: StepSizeConfiguration.h:39
~StepSizeConfiguration()
Definition: StepSizeConfiguration.h:29
oms_status_enu_t addTimeIndicator(const ComRef &signal)
Definition: StepSizeConfiguration.cpp:9
std::vector< ComRef > getEventIndicators()
Definition: StepSizeConfiguration.h:36
oms_status_enu_t addDynamicValueIndicator(const ComRef &signal, const ComRef &lower, const ComRef &upper, double stepSize)
Definition: StepSizeConfiguration.cpp:41
std::vector< std::pair< const ComRef, std::vector< DynamicBound > > > getDynamicThresholds()
Definition: StepSizeConfiguration.h:38
std::vector< ComRef > eventIndicators
Definition: StepSizeConfiguration.h:42
const char * signal
Definition: Tags.cpp:38
Definition: AlgLoop.h:45
Definition: StepSizeConfiguration.h:21
const ComRef lower
Definition: StepSizeConfiguration.h:22
const ComRef upper
Definition: StepSizeConfiguration.h:23
double stepSize
Definition: StepSizeConfiguration.h:24
Definition: StepSizeConfiguration.h:14
double lower
Definition: StepSizeConfiguration.h:15
double upper
Definition: StepSizeConfiguration.h:16
double stepSize
Definition: StepSizeConfiguration.h:17