summaryrefslogtreecommitdiff
path: root/src/main/Simulator/Graph_model.h
blob: 47d539ea662999d046f29ff608ac119360cf2d79 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/* Simulation code for Graph generated by the OpenModelica Compiler v1.12.0 (64-bit). */
#if !defined(Graph__MODEL_H)
#define Graph__MODEL_H
#include "openmodelica.h"
#include "openmodelica_func.h"
#include "simulation_data.h"
#include "simulation/simulation_info_json.h"
#include "simulation/simulation_runtime.h"
#include "util/omc_error.h"
#include "simulation/solver/model_help.h"
#include "simulation/solver/delay.h"
#include "simulation/solver/linearSystem.h"
#include "simulation/solver/nonlinearSystem.h"
#include "simulation/solver/mixedSystem.h"

#include <string.h>

#include "Graph_functions.h"

#define Simulator_Files_ThermodynamicFunctions_BIPNRTL_index 0
#define Simulator_Files_ThermodynamicFunctions_Dens_index 1
#define Simulator_Files_ThermodynamicFunctions_Psat_index 2

extern void Graph_callExternalObjectDestructors(DATA *_data, threadData_t *threadData);
#if !defined(OMC_NUM_NONLINEAR_SYSTEMS) || OMC_NUM_NONLINEAR_SYSTEMS>0
extern void Graph_initialNonLinearSystem(int nNonLinearSystems, NONLINEAR_SYSTEM_DATA *data);
#endif
#if !defined(OMC_NUM_LINEAR_SYSTEMS) || OMC_NUM_LINEAR_SYSTEMS>0
#endif
#if !defined(OMC_NUM_MIXED_SYSTEMS) || OMC_NUM_MIXED_SYSTEMS>0
#endif
#if !defined(OMC_NO_STATESELECTION)
extern void Graph_initializeStateSets(int nStateSets, STATE_SET_DATA* statesetData, DATA *data);
#endif
extern int Graph_functionAlgebraics(DATA *data, threadData_t *threadData);
extern int Graph_function_storeDelayed(DATA *data, threadData_t *threadData);
extern int Graph_updateBoundVariableAttributes(DATA *data, threadData_t *threadData);
extern int Graph_functionInitialEquations(DATA *data, threadData_t *threadData);
extern int Graph_functionInitialEquations_lambda0(DATA *data, threadData_t *threadData);
extern int Graph_functionRemovedInitialEquations(DATA *data, threadData_t *threadData);
extern int Graph_updateBoundParameters(DATA *data, threadData_t *threadData);
extern int Graph_checkForAsserts(DATA *data, threadData_t *threadData);
extern int Graph_function_ZeroCrossingsEquations(DATA *data, threadData_t *threadData);
extern int Graph_function_ZeroCrossings(DATA *data, threadData_t *threadData, double* gout);
extern int Graph_function_updateRelations(DATA *data, threadData_t *threadData, int evalZeroCross);
extern int Graph_checkForDiscreteChanges(DATA *data, threadData_t *threadData);
extern const char* Graph_zeroCrossingDescription(int i, int **out_EquationIndexes);
extern const char* Graph_relationDescription(int i);
extern void Graph_function_initSample(DATA *data, threadData_t *threadData);
extern int Graph_initialAnalyticJacobianG(void* data, threadData_t *threadData);
extern int Graph_initialAnalyticJacobianA(void* data, threadData_t *threadData);
extern int Graph_initialAnalyticJacobianB(void* data, threadData_t *threadData);
extern int Graph_initialAnalyticJacobianC(void* data, threadData_t *threadData);
extern int Graph_initialAnalyticJacobianD(void* data, threadData_t *threadData);
extern int Graph_functionJacG_column(void* data, threadData_t *threadData);
extern int Graph_functionJacA_column(void* data, threadData_t *threadData);
extern int Graph_functionJacB_column(void* data, threadData_t *threadData);
extern int Graph_functionJacC_column(void* data, threadData_t *threadData);
extern int Graph_functionJacD_column(void* data, threadData_t *threadData);
extern const char* Graph_linear_model_frame(void);
extern const char* Graph_linear_model_datarecovery_frame(void);
extern int Graph_mayer(DATA* data, modelica_real** res, short *);
extern int Graph_lagrange(DATA* data, modelica_real** res, short *, short *);
extern int Graph_pickUpBoundsForInputsInOptimization(DATA* data, modelica_real* min, modelica_real* max, modelica_real*nominal, modelica_boolean *useNominal, char ** name, modelica_real * start, modelica_real * startTimeOpt);
extern int Graph_setInputData(DATA *data, const modelica_boolean file);
extern int Graph_getTimeGrid(DATA *data, modelica_integer * nsi, modelica_real**t);
extern void Graph_function_initSynchronous(DATA * data, threadData_t *threadData);
extern void Graph_function_updateSynchronous(DATA * data, threadData_t *threadData, long i);
extern int Graph_function_equationsSynchronous(DATA * data, threadData_t *threadData, long i);
extern void Graph_read_input_fmu(MODEL_DATA* modelData, SIMULATION_INFO* simulationData);
extern void Graph_function_savePreSynchronous(DATA *data, threadData_t *threadData);
extern int Graph_inputNames(DATA* data, char ** names);
extern int Graph_initializeDAEmodeData(DATA *data, DAEMODE_DATA*);
extern int Graph_functionLocalKnownVars(DATA*, threadData_t*);
extern int Graph_symbolicInlineSystem(DATA*, threadData_t*);

#include "Graph_literals.h"




#if defined(HPCOM) && !defined(_OPENMP)
  #error "HPCOM requires OpenMP or the results are wrong"
#endif
#if defined(_OPENMP)
  #include <omp.h>
#else
  /* dummy omp defines */
  #define omp_get_max_threads() 1
#endif

#endif