/* Simulation code for Sum generated by the OpenModelica Compiler OpenModelica 1.12.0. */
#if !defined(Sum__MODEL_H)
#define Sum__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 "Sum_functions.h"


extern void Sum_callExternalObjectDestructors(DATA *_data, threadData_t *threadData);
#if !defined(OMC_NUM_NONLINEAR_SYSTEMS) || OMC_NUM_NONLINEAR_SYSTEMS>0
#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 Sum_initializeStateSets(int nStateSets, STATE_SET_DATA* statesetData, DATA *data);
#endif
extern int Sum_functionAlgebraics(DATA *data, threadData_t *threadData);
extern int Sum_function_storeDelayed(DATA *data, threadData_t *threadData);
extern int Sum_updateBoundVariableAttributes(DATA *data, threadData_t *threadData);
extern int Sum_functionInitialEquations(DATA *data, threadData_t *threadData);
extern int Sum_functionInitialEquations_lambda0(DATA *data, threadData_t *threadData);
extern int Sum_functionRemovedInitialEquations(DATA *data, threadData_t *threadData);
extern int Sum_updateBoundParameters(DATA *data, threadData_t *threadData);
extern int Sum_checkForAsserts(DATA *data, threadData_t *threadData);
extern int Sum_function_ZeroCrossingsEquations(DATA *data, threadData_t *threadData);
extern int Sum_function_ZeroCrossings(DATA *data, threadData_t *threadData, double* gout);
extern int Sum_function_updateRelations(DATA *data, threadData_t *threadData, int evalZeroCross);
extern int Sum_checkForDiscreteChanges(DATA *data, threadData_t *threadData);
extern const char* Sum_zeroCrossingDescription(int i, int **out_EquationIndexes);
extern const char* Sum_relationDescription(int i);
extern void Sum_function_initSample(DATA *data, threadData_t *threadData);
extern int Sum_initialAnalyticJacobianG(void* data, threadData_t *threadData);
extern int Sum_initialAnalyticJacobianA(void* data, threadData_t *threadData);
extern int Sum_initialAnalyticJacobianB(void* data, threadData_t *threadData);
extern int Sum_initialAnalyticJacobianC(void* data, threadData_t *threadData);
extern int Sum_initialAnalyticJacobianD(void* data, threadData_t *threadData);
extern int Sum_functionJacG_column(void* data, threadData_t *threadData);
extern int Sum_functionJacA_column(void* data, threadData_t *threadData);
extern int Sum_functionJacB_column(void* data, threadData_t *threadData);
extern int Sum_functionJacC_column(void* data, threadData_t *threadData);
extern int Sum_functionJacD_column(void* data, threadData_t *threadData);
extern const char* Sum_linear_model_frame(void);
extern const char* Sum_linear_model_datarecovery_frame(void);
extern int Sum_mayer(DATA* data, modelica_real** res, short *);
extern int Sum_lagrange(DATA* data, modelica_real** res, short *, short *);
extern int Sum_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 Sum_setInputData(DATA *data, const modelica_boolean file);
extern int Sum_getTimeGrid(DATA *data, modelica_integer * nsi, modelica_real**t);
extern void Sum_function_initSynchronous(DATA * data, threadData_t *threadData);
extern void Sum_function_updateSynchronous(DATA * data, threadData_t *threadData, long i);
extern int Sum_function_equationsSynchronous(DATA * data, threadData_t *threadData, long i);
extern void Sum_read_input_fmu(MODEL_DATA* modelData, SIMULATION_INFO* simulationData);
extern void Sum_function_savePreSynchronous(DATA *data, threadData_t *threadData);
extern int Sum_inputNames(DATA* data, char ** names);
extern int Sum_initializeDAEmodeData(DATA *data, DAEMODE_DATA*);
extern int Sum_functionLocalKnownVars(DATA*, threadData_t*);
extern int Sum_symbolicInlineSystem(DATA*, threadData_t*);

#include "Sum_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

