forked from modelica/Reference-FMUs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFMISimulation.h
53 lines (42 loc) · 1.31 KB
/
FMISimulation.h
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
52
53
#pragma once
#include "FMIModelDescription.h"
#include "FMISolver.h"
#include "FMIRecorder.h"
#include "FMIStaticInput.h"
typedef struct FMISimulationSettings FMISimulationSettings;
typedef bool (*FMIStepFinished)(const FMISimulationSettings* settings, double time);
typedef struct FMISimulationSettings {
// Common
FMIInstance* S;
const FMIModelDescription* modelDescription;
const char* unzipdir;
FMIRecorder* initialRecorder;
FMIRecorder* recorder;
FMIStaticInput* input;
FMIInterfaceType interfaceType;
size_t nStartValues;
const FMIModelVariable** startVariables;
const char** startValues;
double tolerance;
double startTime;
double stopTime;
double outputInterval;
const char* initialFMUStateFile;
const char* finalFMUStateFile;
bool visible;
bool loggingOn;
// Co-Simulation
bool earlyReturnAllowed;
bool eventModeUsed;
bool recordIntermediateValues;
// Model Exchange
SolverCreate solverCreate;
SolverFree solverFree;
SolverStep solverStep;
SolverReset solverReset;
// Callbacks
void* userData;
FMIStepFinished stepFinished;
} FMISimulationSettings;
FMIStatus FMIApplyStartValues(FMIInstance* S, const FMISimulationSettings* settings);
FMIStatus FMISimulate(const FMISimulationSettings* settings);