Cláudio Gomes 7 years ago
parent
commit
04945806f4
100 changed files with 0 additions and 35931 deletions
  1. 0 0
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/binaries/win32/PW_PowerSystem_FMU.libs
  2. 0 20
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/build.bat
  3. 0 4113
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/modelDescription.xml
  4. 0 65
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/Makefile
  5. 0 62
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/Makefile.in
  6. 0 1359
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem.c
  7. 0 2
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem.makefile
  8. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem.o
  9. 0 26
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_01exo.c
  10. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_01exo.o
  11. 0 12
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_02nls.c
  12. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_02nls.o
  13. 0 492
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_03lsy.c
  14. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_03lsy.o
  15. 0 16
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_04set.c
  16. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_04set.o
  17. 0 107
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_05evt.c
  18. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_05evt.o
  19. 0 1630
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_06inz.c
  20. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_06inz.o
  21. 0 19
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_07dly.c
  22. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_07dly.o
  23. 0 3261
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_08bnd.c
  24. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_08bnd.o
  25. 0 123
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_09alg.c
  26. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_09alg.o
  27. 0 20
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_10asr.c
  28. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_10asr.o
  29. 0 10
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_11mix.c
  30. 0 0
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_11mix.h
  31. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_11mix.o
  32. 0 814
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_12jac.c
  33. 0 210
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_12jac.h
  34. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_12jac.o
  35. 0 14
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_13opt.c
  36. 0 11
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_13opt.h
  37. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_13opt.o
  38. 0 44
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_14lnz.c
  39. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_14lnz.o
  40. 0 59
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_15syn.c
  41. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_15syn.o
  42. 0 9
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_16dae.c
  43. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_16dae.o
  44. 0 1792
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_FMU.c
  45. 0 0
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_FMU.libs
  46. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_FMU.o
  47. 0 248
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_functions.c
  48. 0 195
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_functions.h
  49. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_functions.o
  50. 0 0
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_includes.h
  51. 0 1
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_info.c
  52. 0 3822
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_init_fmu.c
  53. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_init_fmu.o
  54. 0 26
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_literals.h
  55. 0 102
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_model.h
  56. 0 92
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_records.c
  57. BIN
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_records.o
  58. 0 242
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/configure.ac
  59. 0 183
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/Makefile.objs
  60. 0 113
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ModelicaUtilities.h
  61. 0 910
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/OCLRuntimeUtil.cl
  62. 0 116
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/omc_ocl_common_header.h
  63. 0 195
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/omc_ocl_interface.h
  64. 0 106
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/omc_ocl_memory_ops.h
  65. 0 158
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/blaswrap.h
  66. 0 160
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/blaswrap.h
  67. 0 7262
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/clapack.h
  68. 0 370
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/cminpack.h
  69. 0 389
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgemm.c
  70. 0 194
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dger.c
  71. 0 138
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgesv.c
  72. 0 194
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgetf2.c
  73. 0 219
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgetrf.c
  74. 0 186
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgetrs.c
  75. 0 1006
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dlamch.c
  76. 0 158
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dlaswp.c
  77. 0 253
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dogleg_.c
  78. 0 207
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dpmpar_.c
  79. 0 96
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dscal.c
  80. 0 114
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dswap.c
  81. 0 490
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dtrsm.c
  82. 0 196
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/enorm_.c
  83. 0 225
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/f2c.h
  84. 0 612
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/hybrj_.c
  85. 0 19
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/i_nint.c
  86. 0 93
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/idamax.c
  87. 0 166
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/ieeeck.c
  88. 0 654
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/ilaenv.c
  89. 0 282
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/iparmq.c
  90. 0 117
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/lsame.c
  91. 0 301
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/minpack.h
  92. 0 41
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/pow_di.c
  93. 0 145
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/qform_.c
  94. 0 245
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/qrfac_.c
  95. 0 145
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/r1mpyq_.c
  96. 0 283
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/r1updt_.c
  97. 0 50
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/s_cmp.c
  98. 0 57
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/s_copy.c
  99. 0 65
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/xerbla.c
  100. 0 0
      SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/fmi1/fmiModelFunctions.h

+ 0 - 0
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/binaries/win32/PW_PowerSystem_FMU.libs


+ 0 - 20
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/build.bat

@@ -1,20 +0,0 @@
-@echo off
-
-mode 230,1000
-
-setlocal
-
-set PATH=%PATH%;C:\MinGW\msys\1.0\bin
-
-pushd sources
-
-make clean
-
-make
-
-popd
-
-if "%1"=="nopause" goto skip
-	pause
-:skip
-

File diff suppressed because it is too large
+ 0 - 4113
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/modelDescription.xml


File diff suppressed because it is too large
+ 0 - 65
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/Makefile


+ 0 - 62
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/Makefile.in

@@ -1,62 +0,0 @@
-# Makefile generated by OpenModelica
-CC=@CC@
-AR=@AR@
-CFLAGS=@CFLAGS@
-LD=$(CC) -shared
-LDFLAGS=@LDFLAGS@ @LIBS@
-DLLEXT=@DLLEXT@
-NEED_RUNTIME=@NEED_RUNTIME@
-NEED_DGESV=@NEED_DGESV@
-FMIPLATFORM=@FMIPLATFORM@
-# Note: Simulation of the fmu with dymola does not work with -finline-small-functions (enabled by most optimization levels)
-CPPFLAGS=@CPPFLAGS@
-OMC_NUM_LINEAR_SYSTEMS=6
-OMC_NUM_NONLINEAR_SYSTEMS=0
-OMC_NUM_MIXED_SYSTEMS=0
-OMC_NDELAY_EXPRESSIONS=0
-OMC_NVAR_STRING=0
-
-override CPPFLAGS += -Iinclude/ -Iinclude/fmi2 -I.    -DOMC_MODEL_PREFIX=PW_PowerSystem -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=6 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0
-
-MAINFILE=PW_PowerSystem_FMU.c
-MAINOBJ=PW_PowerSystem_FMU.o
-CFILES=PW_PowerSystem.c PW_PowerSystem_functions.c PW_PowerSystem_records.c \
-PW_PowerSystem_01exo.c PW_PowerSystem_02nls.c PW_PowerSystem_03lsy.c PW_PowerSystem_04set.c PW_PowerSystem_05evt.c PW_PowerSystem_06inz.c PW_PowerSystem_07dly.c \
-PW_PowerSystem_08bnd.c PW_PowerSystem_09alg.c PW_PowerSystem_10asr.c PW_PowerSystem_11mix.c PW_PowerSystem_12jac.c PW_PowerSystem_13opt.c PW_PowerSystem_14lnz.c \
-PW_PowerSystem_15syn.c PW_PowerSystem_16dae.c PW_PowerSystem_init_fmu.c
-OFILES=$(CFILES:.c=.o)
-GENERATEDFILES=$(MAINFILE) PW_PowerSystem_FMU.makefile PW_PowerSystem_literals.h PW_PowerSystem_model.h PW_PowerSystem_includes.h PW_PowerSystem_functions.h  PW_PowerSystem_11mix.h PW_PowerSystem_12jac.h PW_PowerSystem_13opt.h PW_PowerSystem_init_fmu.c PW_PowerSystem_info.c $(CFILES) PW_PowerSystem_FMU.libs
-
-# FIXME: before you push into master...
-RUNTIMEDIR=include
-OMC_MINIMAL_RUNTIME=1
-OMC_FMI_RUNTIME=1
-include $(RUNTIMEDIR)/Makefile.objs
-ifneq ($(NEED_RUNTIME),)
-RUNTIMEFILES=$(FMI_ME_OBJS:%=$(RUNTIMEDIR)/%.o)
-endif
-
-PHONY: PW_PowerSystem_FMU
-PW_PowerSystem_FMU: $(MAINOBJ) PW_PowerSystem_functions.h PW_PowerSystem_literals.h $(OFILES) $(RUNTIMEFILES)
-	$(CXX) -shared -I. -o PW_PowerSystem$(DLLEXT) $(MAINOBJ) $(RUNTIMEFILES) $(OFILES) $(CPPFLAGS) -L"C:/Users/clagms/Source Control/Git_HybridCosimulation/ModelicaModels"   $(CFLAGS) $(LDFLAGS) -llis -Wl,--kill-at
-	mkdir.exe -p ../binaries/win32
-	dlltool -d PW_PowerSystem.def --dllname PW_PowerSystem$(DLLEXT) --output-lib PW_PowerSystem.lib --kill-at
-	cp PW_PowerSystem$(DLLEXT) PW_PowerSystem.lib PW_PowerSystem_FMU.libs ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libsundials_*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libopenblas.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libexpat*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libgfortran*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libquadmath*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libwinpthread*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/zlib*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libszip*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libhdf5*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libsystre*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libtre*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libintl*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libiconv*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libgcc_s_*.dll ../binaries/win32/
-	cp C:/OpenModelica1.12.0-dev-32bit//bin/libstdc*.dll ../binaries/win32/
-	rm -f PW_PowerSystem.def PW_PowerSystem.o PW_PowerSystem$(DLLEXT) $(OFILES) $(RUNTIMEFILES)
-	cd .. && rm -f ../PW_PowerSystem.fmu && zip -r ../PW_PowerSystem.fmu *
-

File diff suppressed because it is too large
+ 0 - 1359
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem.c


+ 0 - 2
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem.makefile

@@ -1,2 +0,0 @@
-# Dummy file so OMDEV Compile.bat works
-include Makefile

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem.o


+ 0 - 26
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_01exo.c

@@ -1,26 +0,0 @@
-/* External objects file */
-#include "PW_PowerSystem_model.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Has to be performed after _init.xml file has been read */
-void PW_PowerSystem_callExternalObjectConstructors(DATA *data, threadData_t *threadData)
-{
-  /* data->simulationInfo->extObjs = NULL; */
-  infoStreamPrint(LOG_DEBUG, 0, "call external Object Constructors");
-  infoStreamPrint(LOG_DEBUG, 0, "call external Object Constructors finished");
-}
-
-void PW_PowerSystem_callExternalObjectDestructors(DATA *data, threadData_t *threadData)
-{
-  if(data->simulationInfo->extObjs)
-  {
-    free(data->simulationInfo->extObjs);
-    data->simulationInfo->extObjs = 0;
-  }
-}
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_01exo.o


+ 0 - 12
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_02nls.c

@@ -1,12 +0,0 @@
-/* Non Linear Systems */
-#include "PW_PowerSystem_model.h"
-#include "PW_PowerSystem_12jac.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_02nls.o


+ 0 - 492
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_03lsy.c

@@ -1,492 +0,0 @@
-/* Linear Systems */
-#include "PW_PowerSystem_model.h"
-#include "PW_PowerSystem_12jac.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* initial linear systems */
-
-/*
- equation index: 37
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n2._i = (-idealCommutingSwitch2.s2) * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Goff)
- */
-void PW_PowerSystem_eqFunction_37(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,37};
-  data->localData[0]->realVars[22] /* idealCommutingSwitch2._n2._i variable */ = ((-data->localData[0]->realVars[25] /* idealCommutingSwitch2._s2 variable */)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */));
-  TRACE_POP
-}
-/*
- equation index: 38
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n1._i = (-idealCommutingSwitch2.s1) * (if convertToBoolean.y then idealCommutingSwitch2.Goff else 1.0)
- */
-void PW_PowerSystem_eqFunction_38(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,38};
-  data->localData[0]->realVars[21] /* idealCommutingSwitch2._n1._i variable */ = ((-data->localData[0]->realVars[24] /* idealCommutingSwitch2._s1 variable */)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */:1.0));
-  TRACE_POP
-}
-/*
- equation index: 39
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._p._v = idealCommutingSwitch2.s1 * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Ron) + up_voltage.V
- */
-void PW_PowerSystem_eqFunction_39(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,39};
-  data->localData[0]->realVars[23] /* idealCommutingSwitch2._p._v variable */ = (data->localData[0]->realVars[24] /* idealCommutingSwitch2._s1 variable */) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */)) + data->simulationInfo->realParameter[103] /* up_voltage._V PARAM */;
-  TRACE_POP
-}
-
-void residualFunc47(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
-  TRACE_PUSH
-  DATA *data = (DATA*) ((void**)dataIn[0]);
-  threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
-  const int equationIndexes[2] = {1,47};
-  data->localData[0]->realVars[24] /* idealCommutingSwitch2._s1 variable */ = xloc[0];
-  data->localData[0]->realVars[25] /* idealCommutingSwitch2._s2 variable */ = xloc[1];
-  PW_PowerSystem_eqFunction_37(data, threadData);
-
-  PW_PowerSystem_eqFunction_38(data, threadData);
-
-  PW_PowerSystem_eqFunction_39(data, threadData);
-  res[0] = (data->localData[0]->realVars[25] /* idealCommutingSwitch2._s2 variable */) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */:1.0)) - data->localData[0]->realVars[23] /* idealCommutingSwitch2._p._v variable */;
-
-  res[1] = data->localData[0]->realVars[21] /* idealCommutingSwitch2._n1._i variable */ + data->localData[0]->realVars[22] /* idealCommutingSwitch2._n2._i variable */ + data->localData[0]->realVars[2] /* motor._la._i STATE(1) */;
-  TRACE_POP
-}
-void initializeStaticLSData47(void *inData, threadData_t *threadData, void *systemData)
-{
-  DATA* data = (DATA*) inData;
-  LINEAR_SYSTEM_DATA* linearSystemData = (LINEAR_SYSTEM_DATA*) systemData;
-  int i=0;
-  /* static ls data for idealCommutingSwitch2.s1 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[24].attribute /* idealCommutingSwitch2._s1 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[24].attribute /* idealCommutingSwitch2._s1 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[24].attribute /* idealCommutingSwitch2._s1 */.max;
-  /* static ls data for idealCommutingSwitch2.s2 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[25].attribute /* idealCommutingSwitch2._s2 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[25].attribute /* idealCommutingSwitch2._s2 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[25].attribute /* idealCommutingSwitch2._s2 */.max;
-}
-
-
-/*
- equation index: 67
- type: SIMPLE_ASSIGN
- idealCommutingSwitch1._n2._i = (-idealCommutingSwitch1.s2) * (if greaterThreshold1.y then 1.0 else idealCommutingSwitch1.Goff)
- */
-void PW_PowerSystem_eqFunction_67(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,67};
-  data->localData[0]->realVars[17] /* idealCommutingSwitch1._n2._i variable */ = ((-data->localData[0]->realVars[19] /* idealCommutingSwitch1._s2 variable */)) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */));
-  TRACE_POP
-}
-/*
- equation index: 68
- type: SIMPLE_ASSIGN
- arm_sensor._p._v = idealCommutingSwitch1.s2 * (if greaterThreshold1.y then idealCommutingSwitch1.Ron else 1.0)
- */
-void PW_PowerSystem_eqFunction_68(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,68};
-  data->localData[0]->realVars[13] /* arm_sensor._p._v variable */ = (data->localData[0]->realVars[19] /* idealCommutingSwitch1._s2 variable */) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */:1.0));
-  TRACE_POP
-}
-/*
- equation index: 69
- type: SIMPLE_ASSIGN
- idealCommutingSwitch1._n1._i = (-arm_current) - idealCommutingSwitch1.n2.i
- */
-void PW_PowerSystem_eqFunction_69(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,69};
-  data->localData[0]->realVars[16] /* idealCommutingSwitch1._n1._i variable */ = (-data->localData[0]->realVars[12] /* arm_current variable */) - data->localData[0]->realVars[17] /* idealCommutingSwitch1._n2._i variable */;
-  TRACE_POP
-}
-
-void residualFunc76(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
-  TRACE_PUSH
-  DATA *data = (DATA*) ((void**)dataIn[0]);
-  threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
-  const int equationIndexes[2] = {1,76};
-  data->localData[0]->realVars[19] /* idealCommutingSwitch1._s2 variable */ = xloc[0];
-  data->localData[0]->realVars[18] /* idealCommutingSwitch1._s1 variable */ = xloc[1];
-  PW_PowerSystem_eqFunction_67(data, threadData);
-
-  PW_PowerSystem_eqFunction_68(data, threadData);
-
-  PW_PowerSystem_eqFunction_69(data, threadData);
-  res[0] = ((-data->localData[0]->realVars[18] /* idealCommutingSwitch1._s1 variable */)) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */:1.0)) - data->localData[0]->realVars[16] /* idealCommutingSwitch1._n1._i variable */;
-
-  res[1] = data->localData[0]->realVars[13] /* arm_sensor._p._v variable */ + (-data->simulationInfo->realParameter[103] /* up_voltage._V PARAM */) - ((data->localData[0]->realVars[18] /* idealCommutingSwitch1._s1 variable */) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */)));
-  TRACE_POP
-}
-void initializeStaticLSData76(void *inData, threadData_t *threadData, void *systemData)
-{
-  DATA* data = (DATA*) inData;
-  LINEAR_SYSTEM_DATA* linearSystemData = (LINEAR_SYSTEM_DATA*) systemData;
-  int i=0;
-  /* static ls data for idealCommutingSwitch1.s2 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[19].attribute /* idealCommutingSwitch1._s2 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[19].attribute /* idealCommutingSwitch1._s2 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[19].attribute /* idealCommutingSwitch1._s2 */.max;
-  /* static ls data for idealCommutingSwitch1.s1 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[18].attribute /* idealCommutingSwitch1._s1 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[18].attribute /* idealCommutingSwitch1._s1 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[18].attribute /* idealCommutingSwitch1._s1 */.max;
-}
-
-
-/*
- equation index: 91
- type: SIMPLE_ASSIGN
- motor._lesigma._v = motor.lesigma.p.v - motor.airGapDC.vei
- */
-void PW_PowerSystem_eqFunction_91(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,91};
-  data->localData[0]->realVars[67] /* motor._lesigma._v variable */ = data->localData[0]->realVars[66] /* motor._lesigma._p._v variable */ - data->localData[0]->realVars[29] /* motor._airGapDC._vei variable */;
-  TRACE_POP
-}
-/*
- equation index: 92
- type: SIMPLE_ASSIGN
- der(motor._lesigma._i) = 0.3125 * motor.airGapDC.vei
- */
-void PW_PowerSystem_eqFunction_92(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,92};
-  data->localData[0]->realVars[9] /* der(motor._lesigma._i) DUMMY_DER */ = (0.3125) * (data->localData[0]->realVars[29] /* motor._airGapDC._vei variable */);
-  TRACE_POP
-}
-
-void residualFunc96(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
-  TRACE_PUSH
-  DATA *data = (DATA*) ((void**)dataIn[0]);
-  threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
-  const int equationIndexes[2] = {1,96};
-  data->localData[0]->realVars[29] /* motor._airGapDC._vei variable */ = xloc[0];
-  PW_PowerSystem_eqFunction_91(data, threadData);
-
-  PW_PowerSystem_eqFunction_92(data, threadData);
-  res[0] = (0.8) * (data->localData[0]->realVars[9] /* der(motor._lesigma._i) DUMMY_DER */) - data->localData[0]->realVars[67] /* motor._lesigma._v variable */;
-  TRACE_POP
-}
-void initializeStaticLSData96(void *inData, threadData_t *threadData, void *systemData)
-{
-  DATA* data = (DATA*) inData;
-  LINEAR_SYSTEM_DATA* linearSystemData = (LINEAR_SYSTEM_DATA*) systemData;
-  int i=0;
-  /* static ls data for motor.airGapDC.vei */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[29].attribute /* motor._airGapDC._vei */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[29].attribute /* motor._airGapDC._vei */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[29].attribute /* motor._airGapDC._vei */.max;
-}
-/* initial_lambda0 linear systems */
-/* parameter linear systems */
-/* model linear systems */
-
-/*
- equation index: 126
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n1._i = (-idealCommutingSwitch2.s1) * (if convertToBoolean.y then idealCommutingSwitch2.Goff else 1.0)
- */
-void PW_PowerSystem_eqFunction_126(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,126};
-  data->localData[0]->realVars[21] /* idealCommutingSwitch2._n1._i variable */ = ((-data->localData[0]->realVars[24] /* idealCommutingSwitch2._s1 variable */)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */:1.0));
-  TRACE_POP
-}
-/*
- equation index: 127
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._p._v = idealCommutingSwitch2.s1 * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Ron) + up_voltage.V
- */
-void PW_PowerSystem_eqFunction_127(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,127};
-  data->localData[0]->realVars[23] /* idealCommutingSwitch2._p._v variable */ = (data->localData[0]->realVars[24] /* idealCommutingSwitch2._s1 variable */) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */)) + data->simulationInfo->realParameter[103] /* up_voltage._V PARAM */;
-  TRACE_POP
-}
-/*
- equation index: 128
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n2._i = (-idealCommutingSwitch2.s2) * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Goff)
- */
-void PW_PowerSystem_eqFunction_128(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,128};
-  data->localData[0]->realVars[22] /* idealCommutingSwitch2._n2._i variable */ = ((-data->localData[0]->realVars[25] /* idealCommutingSwitch2._s2 variable */)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */));
-  TRACE_POP
-}
-
-void residualFunc136(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
-  TRACE_PUSH
-  DATA *data = (DATA*) ((void**)dataIn[0]);
-  threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
-  const int equationIndexes[2] = {1,136};
-  data->localData[0]->realVars[24] /* idealCommutingSwitch2._s1 variable */ = xloc[0];
-  data->localData[0]->realVars[25] /* idealCommutingSwitch2._s2 variable */ = xloc[1];
-  PW_PowerSystem_eqFunction_126(data, threadData);
-
-  PW_PowerSystem_eqFunction_127(data, threadData);
-
-  PW_PowerSystem_eqFunction_128(data, threadData);
-  res[0] = data->localData[0]->realVars[21] /* idealCommutingSwitch2._n1._i variable */ + data->localData[0]->realVars[22] /* idealCommutingSwitch2._n2._i variable */ + data->localData[0]->realVars[2] /* motor._la._i STATE(1) */;
-
-  res[1] = (data->localData[0]->realVars[25] /* idealCommutingSwitch2._s2 variable */) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */:1.0)) - data->localData[0]->realVars[23] /* idealCommutingSwitch2._p._v variable */;
-  TRACE_POP
-}
-void initializeStaticLSData136(void *inData, threadData_t *threadData, void *systemData)
-{
-  DATA* data = (DATA*) inData;
-  LINEAR_SYSTEM_DATA* linearSystemData = (LINEAR_SYSTEM_DATA*) systemData;
-  int i=0;
-  /* static ls data for idealCommutingSwitch2.s1 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[24].attribute /* idealCommutingSwitch2._s1 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[24].attribute /* idealCommutingSwitch2._s1 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[24].attribute /* idealCommutingSwitch2._s1 */.max;
-  /* static ls data for idealCommutingSwitch2.s2 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[25].attribute /* idealCommutingSwitch2._s2 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[25].attribute /* idealCommutingSwitch2._s2 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[25].attribute /* idealCommutingSwitch2._s2 */.max;
-}
-
-
-/*
- equation index: 157
- type: SIMPLE_ASSIGN
- idealCommutingSwitch1._n2._i = (-idealCommutingSwitch1.s2) * (if greaterThreshold1.y then 1.0 else idealCommutingSwitch1.Goff)
- */
-void PW_PowerSystem_eqFunction_157(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,157};
-  data->localData[0]->realVars[17] /* idealCommutingSwitch1._n2._i variable */ = ((-data->localData[0]->realVars[19] /* idealCommutingSwitch1._s2 variable */)) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */));
-  TRACE_POP
-}
-/*
- equation index: 158
- type: SIMPLE_ASSIGN
- arm_sensor._p._v = idealCommutingSwitch1.s2 * (if greaterThreshold1.y then idealCommutingSwitch1.Ron else 1.0)
- */
-void PW_PowerSystem_eqFunction_158(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,158};
-  data->localData[0]->realVars[13] /* arm_sensor._p._v variable */ = (data->localData[0]->realVars[19] /* idealCommutingSwitch1._s2 variable */) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */:1.0));
-  TRACE_POP
-}
-/*
- equation index: 159
- type: SIMPLE_ASSIGN
- idealCommutingSwitch1._n1._i = (-arm_current) - idealCommutingSwitch1.n2.i
- */
-void PW_PowerSystem_eqFunction_159(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,159};
-  data->localData[0]->realVars[16] /* idealCommutingSwitch1._n1._i variable */ = (-data->localData[0]->realVars[12] /* arm_current variable */) - data->localData[0]->realVars[17] /* idealCommutingSwitch1._n2._i variable */;
-  TRACE_POP
-}
-
-void residualFunc166(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
-  TRACE_PUSH
-  DATA *data = (DATA*) ((void**)dataIn[0]);
-  threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
-  const int equationIndexes[2] = {1,166};
-  data->localData[0]->realVars[19] /* idealCommutingSwitch1._s2 variable */ = xloc[0];
-  data->localData[0]->realVars[18] /* idealCommutingSwitch1._s1 variable */ = xloc[1];
-  PW_PowerSystem_eqFunction_157(data, threadData);
-
-  PW_PowerSystem_eqFunction_158(data, threadData);
-
-  PW_PowerSystem_eqFunction_159(data, threadData);
-  res[0] = ((-data->localData[0]->realVars[18] /* idealCommutingSwitch1._s1 variable */)) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */:1.0)) - data->localData[0]->realVars[16] /* idealCommutingSwitch1._n1._i variable */;
-
-  res[1] = data->localData[0]->realVars[13] /* arm_sensor._p._v variable */ + (-data->simulationInfo->realParameter[103] /* up_voltage._V PARAM */) - ((data->localData[0]->realVars[18] /* idealCommutingSwitch1._s1 variable */) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */)));
-  TRACE_POP
-}
-void initializeStaticLSData166(void *inData, threadData_t *threadData, void *systemData)
-{
-  DATA* data = (DATA*) inData;
-  LINEAR_SYSTEM_DATA* linearSystemData = (LINEAR_SYSTEM_DATA*) systemData;
-  int i=0;
-  /* static ls data for idealCommutingSwitch1.s2 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[19].attribute /* idealCommutingSwitch1._s2 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[19].attribute /* idealCommutingSwitch1._s2 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[19].attribute /* idealCommutingSwitch1._s2 */.max;
-  /* static ls data for idealCommutingSwitch1.s1 */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[18].attribute /* idealCommutingSwitch1._s1 */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[18].attribute /* idealCommutingSwitch1._s1 */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[18].attribute /* idealCommutingSwitch1._s1 */.max;
-}
-
-
-/*
- equation index: 181
- type: SIMPLE_ASSIGN
- motor._airGapDC._vei = motor.lesigma.p.v - motor.lesigma.v
- */
-void PW_PowerSystem_eqFunction_181(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,181};
-  data->localData[0]->realVars[29] /* motor._airGapDC._vei variable */ = data->localData[0]->realVars[66] /* motor._lesigma._p._v variable */ - data->localData[0]->realVars[67] /* motor._lesigma._v variable */;
-  TRACE_POP
-}
-/*
- equation index: 182
- type: SIMPLE_ASSIGN
- der(motor._lesigma._i) = 1.25 * motor.lesigma.v
- */
-void PW_PowerSystem_eqFunction_182(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,182};
-  data->localData[0]->realVars[9] /* der(motor._lesigma._i) DUMMY_DER */ = (1.25) * (data->localData[0]->realVars[67] /* motor._lesigma._v variable */);
-  TRACE_POP
-}
-
-void residualFunc186(void** dataIn, const double* xloc, double* res, const int* iflag)
-{
-  TRACE_PUSH
-  DATA *data = (DATA*) ((void**)dataIn[0]);
-  threadData_t *threadData = (threadData_t*) ((void**)dataIn[1]);
-  const int equationIndexes[2] = {1,186};
-  data->localData[0]->realVars[67] /* motor._lesigma._v variable */ = xloc[0];
-  PW_PowerSystem_eqFunction_181(data, threadData);
-
-  PW_PowerSystem_eqFunction_182(data, threadData);
-  res[0] = (3.2) * (data->localData[0]->realVars[9] /* der(motor._lesigma._i) DUMMY_DER */) - data->localData[0]->realVars[29] /* motor._airGapDC._vei variable */;
-  TRACE_POP
-}
-void initializeStaticLSData186(void *inData, threadData_t *threadData, void *systemData)
-{
-  DATA* data = (DATA*) inData;
-  LINEAR_SYSTEM_DATA* linearSystemData = (LINEAR_SYSTEM_DATA*) systemData;
-  int i=0;
-  /* static ls data for motor.lesigma.v */
-  linearSystemData->nominal[i] = data->modelData->realVarsData[67].attribute /* motor._lesigma._v */.nominal;
-  linearSystemData->min[i]     = data->modelData->realVarsData[67].attribute /* motor._lesigma._v */.min;
-  linearSystemData->max[i++]   = data->modelData->realVarsData[67].attribute /* motor._lesigma._v */.max;
-}
-/* jacobians linear systems */
-
-/* function initialize linear systems */
-
-void PW_PowerSystem_initialLinearSystem(int nLinearSystems, LINEAR_SYSTEM_DATA* linearSystemData)
-{
-  /* initial linear systems */
-  assertStreamPrint(NULL, nLinearSystems > 0, "Internal Error: indexlinearSystem mismatch!");
-  linearSystemData[0].equationIndex = 47;
-  linearSystemData[0].size = 2;
-  linearSystemData[0].nnz = 0;
-  linearSystemData[0].method = 1;
-  linearSystemData[0].residualFunc = residualFunc47;
-  linearSystemData[0].strictTearingFunctionCall = NULL;
-  linearSystemData[0].analyticalJacobianColumn = PW_PowerSystem_functionJacLSJac48_column;
-  linearSystemData[0].initialAnalyticalJacobian = PW_PowerSystem_initialAnalyticJacobianLSJac48;
-  linearSystemData[0].jacobianIndex = 0;
-  linearSystemData[0].setA = NULL;//setLinearMatrixA47;
-  linearSystemData[0].setb = NULL; //setLinearVectorb47;
-  linearSystemData[0].initializeStaticLSData = initializeStaticLSData47;
-  
-  assertStreamPrint(NULL, nLinearSystems > 1, "Internal Error: indexlinearSystem mismatch!");
-  linearSystemData[1].equationIndex = 76;
-  linearSystemData[1].size = 2;
-  linearSystemData[1].nnz = 0;
-  linearSystemData[1].method = 1;
-  linearSystemData[1].residualFunc = residualFunc76;
-  linearSystemData[1].strictTearingFunctionCall = NULL;
-  linearSystemData[1].analyticalJacobianColumn = PW_PowerSystem_functionJacLSJac49_column;
-  linearSystemData[1].initialAnalyticalJacobian = PW_PowerSystem_initialAnalyticJacobianLSJac49;
-  linearSystemData[1].jacobianIndex = 1;
-  linearSystemData[1].setA = NULL;//setLinearMatrixA76;
-  linearSystemData[1].setb = NULL; //setLinearVectorb76;
-  linearSystemData[1].initializeStaticLSData = initializeStaticLSData76;
-  
-  assertStreamPrint(NULL, nLinearSystems > 2, "Internal Error: indexlinearSystem mismatch!");
-  linearSystemData[2].equationIndex = 96;
-  linearSystemData[2].size = 1;
-  linearSystemData[2].nnz = 0;
-  linearSystemData[2].method = 1;
-  linearSystemData[2].residualFunc = residualFunc96;
-  linearSystemData[2].strictTearingFunctionCall = NULL;
-  linearSystemData[2].analyticalJacobianColumn = PW_PowerSystem_functionJacLSJac50_column;
-  linearSystemData[2].initialAnalyticalJacobian = PW_PowerSystem_initialAnalyticJacobianLSJac50;
-  linearSystemData[2].jacobianIndex = 2;
-  linearSystemData[2].setA = NULL;//setLinearMatrixA96;
-  linearSystemData[2].setb = NULL; //setLinearVectorb96;
-  linearSystemData[2].initializeStaticLSData = initializeStaticLSData96;
-  /* initial_lambda0 linear systems */
-  /* parameter linear systems */
-  /* model linear systems */
-  assertStreamPrint(NULL, nLinearSystems > 3, "Internal Error: indexlinearSystem mismatch!");
-  linearSystemData[3].equationIndex = 136;
-  linearSystemData[3].size = 2;
-  linearSystemData[3].nnz = 0;
-  linearSystemData[3].method = 1;
-  linearSystemData[3].residualFunc = residualFunc136;
-  linearSystemData[3].strictTearingFunctionCall = NULL;
-  linearSystemData[3].analyticalJacobianColumn = PW_PowerSystem_functionJacLSJac51_column;
-  linearSystemData[3].initialAnalyticalJacobian = PW_PowerSystem_initialAnalyticJacobianLSJac51;
-  linearSystemData[3].jacobianIndex = 3;
-  linearSystemData[3].setA = NULL;//setLinearMatrixA136;
-  linearSystemData[3].setb = NULL; //setLinearVectorb136;
-  linearSystemData[3].initializeStaticLSData = initializeStaticLSData136;
-  
-  assertStreamPrint(NULL, nLinearSystems > 4, "Internal Error: indexlinearSystem mismatch!");
-  linearSystemData[4].equationIndex = 166;
-  linearSystemData[4].size = 2;
-  linearSystemData[4].nnz = 0;
-  linearSystemData[4].method = 1;
-  linearSystemData[4].residualFunc = residualFunc166;
-  linearSystemData[4].strictTearingFunctionCall = NULL;
-  linearSystemData[4].analyticalJacobianColumn = PW_PowerSystem_functionJacLSJac52_column;
-  linearSystemData[4].initialAnalyticalJacobian = PW_PowerSystem_initialAnalyticJacobianLSJac52;
-  linearSystemData[4].jacobianIndex = 4;
-  linearSystemData[4].setA = NULL;//setLinearMatrixA166;
-  linearSystemData[4].setb = NULL; //setLinearVectorb166;
-  linearSystemData[4].initializeStaticLSData = initializeStaticLSData166;
-  
-  assertStreamPrint(NULL, nLinearSystems > 5, "Internal Error: indexlinearSystem mismatch!");
-  linearSystemData[5].equationIndex = 186;
-  linearSystemData[5].size = 1;
-  linearSystemData[5].nnz = 0;
-  linearSystemData[5].method = 1;
-  linearSystemData[5].residualFunc = residualFunc186;
-  linearSystemData[5].strictTearingFunctionCall = NULL;
-  linearSystemData[5].analyticalJacobianColumn = PW_PowerSystem_functionJacLSJac53_column;
-  linearSystemData[5].initialAnalyticalJacobian = PW_PowerSystem_initialAnalyticJacobianLSJac53;
-  linearSystemData[5].jacobianIndex = 5;
-  linearSystemData[5].setA = NULL;//setLinearMatrixA186;
-  linearSystemData[5].setb = NULL; //setLinearVectorb186;
-  linearSystemData[5].initializeStaticLSData = initializeStaticLSData186;
-  /* jacobians linear systems */
-}
-
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_03lsy.o


+ 0 - 16
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_04set.c

@@ -1,16 +0,0 @@
-/* Initial State Set */
-#include "PW_PowerSystem_model.h"
-#include "PW_PowerSystem_11mix.h"
-#include "PW_PowerSystem_12jac.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-/* funtion initialize state sets */
-void PW_PowerSystem_initializeStateSets(int nStateSets, STATE_SET_DATA* statesetData, DATA *data)
-{
-}
-
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_04set.o


+ 0 - 107
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_05evt.c

@@ -1,107 +0,0 @@
-/* Events: Sample, Zero Crossings, Relations, Discrete Changes */
-#include "PW_PowerSystem_model.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Initializes the raw time events of the simulation using the now
-   calcualted parameters. */
-void PW_PowerSystem_function_initSample(DATA *data, threadData_t *threadData)
-{
-  long i=0;
-}
-
-const char *PW_PowerSystem_zeroCrossingDescription(int i, int **out_EquationIndexes)
-{
-  static const char *res[] = {"down_input > greaterThreshold1.threshold",
-  "up_input > convertToBoolean.threshold"};
-  static const int occurEqs0[] = {1,139};
-  static const int occurEqs1[] = {1,125};
-  static const int *occurEqs[] = {occurEqs0,occurEqs1};
-  *out_EquationIndexes = (int*) occurEqs[i];
-  return res[i];
-}
-
-/* forwarded equations */
-
-int PW_PowerSystem_function_ZeroCrossingsEquations(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  data->simulationInfo->callStatistics.functionZeroCrossingsEquations++;
-
-  
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_function_ZeroCrossings(DATA *data, threadData_t *threadData, double *gout)
-{
-  TRACE_PUSH
-  modelica_boolean tmp5;
-  modelica_boolean tmp6;
-  
-  data->simulationInfo->callStatistics.functionZeroCrossings++;
-  
-  tmp5 = GreaterZC(data->localData[0]->realVars[14] /* down_input variable */, data->simulationInfo->realParameter[2] /* greaterThreshold1._threshold PARAM */, data->simulationInfo->storedRelations[0]);
-  gout[0] = (tmp5) ? 1 : -1;
-  tmp6 = GreaterZC(data->localData[0]->realVars[102] /* up_input variable */, data->simulationInfo->realParameter[0] /* convertToBoolean._threshold PARAM */, data->simulationInfo->storedRelations[1]);
-  gout[1] = (tmp6) ? 1 : -1;
-  
-  TRACE_POP
-  return 0;
-}
-
-const char *PW_PowerSystem_relationDescription(int i)
-{
-  const char *res[] = {"down_input > greaterThreshold1.threshold",
-  "up_input > convertToBoolean.threshold"};
-  return res[i];
-}
-
-int PW_PowerSystem_function_updateRelations(DATA *data, threadData_t *threadData, int evalforZeroCross)
-{
-  TRACE_PUSH
-  modelica_boolean tmp7;
-  modelica_boolean tmp8;
-  
-  if(evalforZeroCross) {
-    tmp7 = GreaterZC(data->localData[0]->realVars[14] /* down_input variable */, data->simulationInfo->realParameter[2] /* greaterThreshold1._threshold PARAM */, data->simulationInfo->storedRelations[0]);
-    data->simulationInfo->relations[0] = tmp7;
-    tmp8 = GreaterZC(data->localData[0]->realVars[102] /* up_input variable */, data->simulationInfo->realParameter[0] /* convertToBoolean._threshold PARAM */, data->simulationInfo->storedRelations[1]);
-    data->simulationInfo->relations[1] = tmp8;
-  } else {
-    data->simulationInfo->relations[0] = (data->localData[0]->realVars[14] /* down_input variable */ > data->simulationInfo->realParameter[2] /* greaterThreshold1._threshold PARAM */);
-    data->simulationInfo->relations[1] = (data->localData[0]->realVars[102] /* up_input variable */ > data->simulationInfo->realParameter[0] /* convertToBoolean._threshold PARAM */);
-  }
-  
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_checkForDiscreteChanges(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  int needToIterate = 0;
-
-  infoStreamPrint(LOG_EVENTS_V, 1, "check for discrete changes at time=%.12g", data->localData[0]->timeValue);
-  if(data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */ != data->simulationInfo->booleanVarsPre[0] /* convertToBoolean._y DISCRETE */)
-  {
-    infoStreamPrint(LOG_EVENTS_V, 0, "discrete var changed: convertToBoolean._y from %d to %d", data->simulationInfo->booleanVarsPre[0] /* convertToBoolean._y DISCRETE */, data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */);
-    needToIterate = 1;
-  }
-  if(data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */ != data->simulationInfo->booleanVarsPre[1] /* greaterThreshold1._y DISCRETE */)
-  {
-    infoStreamPrint(LOG_EVENTS_V, 0, "discrete var changed: greaterThreshold1._y from %d to %d", data->simulationInfo->booleanVarsPre[1] /* greaterThreshold1._y DISCRETE */, data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */);
-    needToIterate = 1;
-  }
-  if (ACTIVE_STREAM(LOG_EVENTS_V)) messageClose(LOG_EVENTS_V);
-  
-  TRACE_POP
-  return needToIterate;
-}
-
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_05evt.o


File diff suppressed because it is too large
+ 0 - 1630
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_06inz.c


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_06inz.o


+ 0 - 19
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_07dly.c

@@ -1,19 +0,0 @@
-/* Delay */
-#include "PW_PowerSystem_model.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-int PW_PowerSystem_function_storeDelayed(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  
-  TRACE_POP
-  return 0;
-}
-
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_07dly.o


File diff suppressed because it is too large
+ 0 - 3261
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_08bnd.c


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_08bnd.o


+ 0 - 123
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_09alg.c

@@ -1,123 +0,0 @@
-/* Algebraic */
-#include "PW_PowerSystem_model.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* forwarded equations */
-extern void PW_PowerSystem_eqFunction_122(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_137(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_144(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_146(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_147(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_149(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_150(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_151(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_152(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_153(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_154(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_155(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_167(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_168(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_169(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_170(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_175(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_176(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_177(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_188(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_189(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_190(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_191(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_192(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_193(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_194(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_195(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_121(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_198(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_197(DATA* data, threadData_t *threadData);
-extern void PW_PowerSystem_eqFunction_196(DATA* data, threadData_t *threadData);
-
-static void functionAlg_system0(DATA *data, threadData_t *threadData)
-{
-  PW_PowerSystem_eqFunction_122(data, threadData);
-
-  PW_PowerSystem_eqFunction_137(data, threadData);
-
-  PW_PowerSystem_eqFunction_144(data, threadData);
-
-  PW_PowerSystem_eqFunction_146(data, threadData);
-
-  PW_PowerSystem_eqFunction_147(data, threadData);
-
-  PW_PowerSystem_eqFunction_149(data, threadData);
-
-  PW_PowerSystem_eqFunction_150(data, threadData);
-
-  PW_PowerSystem_eqFunction_151(data, threadData);
-
-  PW_PowerSystem_eqFunction_152(data, threadData);
-
-  PW_PowerSystem_eqFunction_153(data, threadData);
-
-  PW_PowerSystem_eqFunction_154(data, threadData);
-
-  PW_PowerSystem_eqFunction_155(data, threadData);
-
-  PW_PowerSystem_eqFunction_167(data, threadData);
-
-  PW_PowerSystem_eqFunction_168(data, threadData);
-
-  PW_PowerSystem_eqFunction_169(data, threadData);
-
-  PW_PowerSystem_eqFunction_170(data, threadData);
-
-  PW_PowerSystem_eqFunction_175(data, threadData);
-
-  PW_PowerSystem_eqFunction_176(data, threadData);
-
-  PW_PowerSystem_eqFunction_177(data, threadData);
-
-  PW_PowerSystem_eqFunction_188(data, threadData);
-
-  PW_PowerSystem_eqFunction_189(data, threadData);
-
-  PW_PowerSystem_eqFunction_190(data, threadData);
-
-  PW_PowerSystem_eqFunction_191(data, threadData);
-
-  PW_PowerSystem_eqFunction_192(data, threadData);
-
-  PW_PowerSystem_eqFunction_193(data, threadData);
-
-  PW_PowerSystem_eqFunction_194(data, threadData);
-
-  PW_PowerSystem_eqFunction_195(data, threadData);
-
-  PW_PowerSystem_eqFunction_121(data, threadData);
-
-  PW_PowerSystem_eqFunction_198(data, threadData);
-
-  PW_PowerSystem_eqFunction_197(data, threadData);
-
-  PW_PowerSystem_eqFunction_196(data, threadData);
-}
-/* for continuous time variables */
-int PW_PowerSystem_functionAlgebraics(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  
-  data->simulationInfo->callStatistics.functionAlgebraics++;
-  
-  functionAlg_system0(data, threadData);
-
-  PW_PowerSystem_function_savePreSynchronous(data, threadData);
-  
-  TRACE_POP
-  return 0;
-}
-
-#ifdef __cplusplus
-}
-#endif

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_09alg.o


+ 0 - 20
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_10asr.c

@@ -1,20 +0,0 @@
-/* Asserts */
-#include "PW_PowerSystem_model.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* function to check assert after a step is done */
-int PW_PowerSystem_checkForAsserts(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  
-  TRACE_POP
-  return 0;
-}
-
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_10asr.o


+ 0 - 10
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_11mix.c

@@ -1,10 +0,0 @@
-/* Mixed Systems */
-#include "PW_PowerSystem_model.h"
-#include "PW_PowerSystem_11mix.h"
-/* initial mixed systems */
-/* initial_lambda0 mixed systems */
-/* parameter mixed systems */
-/* model mixed systems */
-/* jacobians mixed systems */
-
-

+ 0 - 0
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_11mix.h


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_11mix.o


+ 0 - 814
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_12jac.c

@@ -1,814 +0,0 @@
-/* Jacobians */
-#include "PW_PowerSystem_model.h"
-#include "PW_PowerSystem_12jac.h"
-
-int PW_PowerSystem_initialAnalyticJacobianLSJac53(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac53;
-  const int colPtrIndex[1+1] = {0,1};
-  const int rowIndex[1] = {0};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 1;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 1;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 3;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(1,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(1,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(3,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 1;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-  
-  for(i=2;i<1+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 1*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 1;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianLSJac52(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac52;
-  const int colPtrIndex[1+2] = {0,2,2};
-  const int rowIndex[4] = {0,1,0,1};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 2;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 2;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 5;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(5,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((2+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(4*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 4;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(2*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 2;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (2+1)*sizeof(int));
-  
-  for(i=2;i<2+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 4*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 2;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianLSJac51(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac51;
-  const int colPtrIndex[1+2] = {0,2,2};
-  const int rowIndex[4] = {0,1,0,1};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 2;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 2;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 5;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(5,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((2+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(4*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 4;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(2*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 2;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (2+1)*sizeof(int));
-  
-  for(i=2;i<2+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 4*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 2;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianLSJac50(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac50;
-  const int colPtrIndex[1+1] = {0,1};
-  const int rowIndex[1] = {0};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 1;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 1;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 3;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(1,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(1,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(3,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((1+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(1*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(1*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 1;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (1+1)*sizeof(int));
-  
-  for(i=2;i<1+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 1*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 1;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianLSJac49(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac49;
-  const int colPtrIndex[1+2] = {0,2,2};
-  const int rowIndex[4] = {0,1,0,1};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 2;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 2;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 5;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(5,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((2+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(4*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 4;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(2*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 2;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (2+1)*sizeof(int));
-  
-  for(i=2;i<2+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 4*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 2;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianLSJac48(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac48;
-  const int colPtrIndex[1+2] = {0,2,2};
-  const int rowIndex[4] = {0,1,0,1};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 2;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 2;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 5;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(5,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((2+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(4*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 4;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(2*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 2;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (2+1)*sizeof(int));
-  
-  for(i=2;i<2+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 4*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 2;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianD(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_D;
-  const int colPtrIndex[1+3] = {0,0,0,0};
-  const int rowIndex[0] = {};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 3;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 2;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 0;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(3,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(0,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((3+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(0*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 0;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(3*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 1;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (3+1)*sizeof(int));
-  
-  for(i=2;i<3+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 0*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[2] = 1;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianC(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_C;
-  const int colPtrIndex[1+4] = {0,0,1,1,0};
-  const int rowIndex[2] = {1,0};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 4;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 2;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 0;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(4,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(2,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(0,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((4+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(2*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 2;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(4*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 1;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (4+1)*sizeof(int));
-  
-  for(i=2;i<4+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 2*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[3] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[2] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 1;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianB(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_B;
-  const int colPtrIndex[1+3] = {0,1,1,1};
-  const int rowIndex[3] = {2,1,2};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 3;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 4;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 0;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(3,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(4,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(0,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((3+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(3*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 3;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(3*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 2;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (3+1)*sizeof(int));
-  
-  for(i=2;i<3+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 3*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[2] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 2;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 2;
-  TRACE_POP
-  return 0;
-}
-
-int PW_PowerSystem_initialAnalyticJacobianA(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_A;
-  const int colPtrIndex[1+4] = {0,3,3,2,0};
-  const int rowIndex[8] = {0,1,2,1,2,3,1,2};
-  int i = 0;
-  
-  data->simulationInfo->analyticJacobians[index].sizeCols = 4;
-  data->simulationInfo->analyticJacobians[index].sizeRows = 4;
-  data->simulationInfo->analyticJacobians[index].sizeTmpVars = 0;
-  data->simulationInfo->analyticJacobians[index].seedVars = (modelica_real*) calloc(4,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].resultVars = (modelica_real*) calloc(4,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].tmpVars = (modelica_real*) calloc(0,sizeof(modelica_real));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex = (unsigned int*) malloc((4+1)*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.index = (unsigned int*) malloc(8*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.numberOfNoneZeros = 8;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols = (unsigned int*) malloc(4*sizeof(int));
-  data->simulationInfo->analyticJacobians[index].sparsePattern.maxColors = 3;
-  data->simulationInfo->analyticJacobians[index].jacobian = NULL;
-  
-  /* write lead index of compressed sparse column */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex, colPtrIndex, (4+1)*sizeof(int));
-  
-  for(i=2;i<4+1;++i)
-    data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i] += data->simulationInfo->analyticJacobians[index].sparsePattern.leadindex[i-1];
-  
-  /* call sparse index */
-  memcpy(data->simulationInfo->analyticJacobians[index].sparsePattern.index, rowIndex, 8*sizeof(int));
-  
-  /* write color array */
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[0] = 1;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[2] = 2;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[3] = 3;
-  data->simulationInfo->analyticJacobians[index].sparsePattern.colorCols[1] = 3;
-  TRACE_POP
-  return 0;
-}
-
-
-/*
- equation index: 184
- type: SIMPLE_ASSIGN
- der(motor._lesigma._i._$pDERLSJac53._dummyVarLSJac53) = 1.25 * motor_lesigma_vSeedLSJac53
- */
-void PW_PowerSystem_eqFunction_184(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,184};
-  $P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac53$PdummyVarLSJac53 = (1.25) * ($Pmotor_lesigma_vSeedLSJac53);
-  TRACE_POP
-}
-
-/*
- equation index: 185
- type: SIMPLE_ASSIGN
- $res._1._$pDERLSJac53._dummyVarLSJac53 = 3.2 * $DER.motor.lesigma.i.$pDERLSJac53.dummyVarLSJac53 + motor_lesigma_vSeedLSJac53
- */
-void PW_PowerSystem_eqFunction_185(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,185};
-  $P$res$P1$P$pDERLSJac53$PdummyVarLSJac53 = (3.2) * ($P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac53$PdummyVarLSJac53) + $Pmotor_lesigma_vSeedLSJac53;
-  TRACE_POP
-}
-int PW_PowerSystem_functionJacLSJac53_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac53;
-  PW_PowerSystem_eqFunction_184(data, threadData);
-
-  PW_PowerSystem_eqFunction_185(data, threadData);
-  
-  TRACE_POP
-  return 0;
-}
-
-/*
- equation index: 162
- type: SIMPLE_ASSIGN
- arm_sensor._p._v._$pDERLSJac52._dummyVarLSJac52 = idealCommutingSwitch1_s2SeedLSJac52 * (if greaterThreshold1.y then idealCommutingSwitch1.Ron else 1.0)
- */
-void PW_PowerSystem_eqFunction_162(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,162};
-  $Parm_sensor$Pp$Pv$P$pDERLSJac52$PdummyVarLSJac52 = ($PidealCommutingSwitch1_s2SeedLSJac52) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */:1.0));
-  TRACE_POP
-}
-
-/*
- equation index: 163
- type: SIMPLE_ASSIGN
- $res._2._$pDERLSJac52._dummyVarLSJac52 = arm_sensor.p.v.$pDERLSJac52.dummyVarLSJac52 - idealCommutingSwitch1_s1SeedLSJac52 * (if greaterThreshold1.y then 1.0 else idealCommutingSwitch1.Ron)
- */
-void PW_PowerSystem_eqFunction_163(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,163};
-  $P$res$P2$P$pDERLSJac52$PdummyVarLSJac52 = $Parm_sensor$Pp$Pv$P$pDERLSJac52$PdummyVarLSJac52 - (($PidealCommutingSwitch1_s1SeedLSJac52) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */)));
-  TRACE_POP
-}
-
-/*
- equation index: 164
- type: SIMPLE_ASSIGN
- idealCommutingSwitch1._n2._i._$pDERLSJac52._dummyVarLSJac52 = (-idealCommutingSwitch1_s2SeedLSJac52) * (if greaterThreshold1.y then 1.0 else idealCommutingSwitch1.Goff)
- */
-void PW_PowerSystem_eqFunction_164(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,164};
-  $PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac52$PdummyVarLSJac52 = ((-$PidealCommutingSwitch1_s2SeedLSJac52)) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */));
-  TRACE_POP
-}
-
-/*
- equation index: 165
- type: SIMPLE_ASSIGN
- $res._1._$pDERLSJac52._dummyVarLSJac52 = idealCommutingSwitch1.n2.i.$pDERLSJac52.dummyVarLSJac52 - idealCommutingSwitch1_s1SeedLSJac52 * (if greaterThreshold1.y then idealCommutingSwitch1.Goff else 1.0)
- */
-void PW_PowerSystem_eqFunction_165(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,165};
-  $P$res$P1$P$pDERLSJac52$PdummyVarLSJac52 = $PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac52$PdummyVarLSJac52 - (($PidealCommutingSwitch1_s1SeedLSJac52) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */:1.0)));
-  TRACE_POP
-}
-int PW_PowerSystem_functionJacLSJac52_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac52;
-  PW_PowerSystem_eqFunction_162(data, threadData);
-
-  PW_PowerSystem_eqFunction_163(data, threadData);
-
-  PW_PowerSystem_eqFunction_164(data, threadData);
-
-  PW_PowerSystem_eqFunction_165(data, threadData);
-  
-  TRACE_POP
-  return 0;
-}
-
-/*
- equation index: 131
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n1._i._$pDERLSJac51._dummyVarLSJac51 = (-idealCommutingSwitch2_s1SeedLSJac51) * (if convertToBoolean.y then idealCommutingSwitch2.Goff else 1.0)
- */
-void PW_PowerSystem_eqFunction_131(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,131};
-  $PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac51$PdummyVarLSJac51 = ((-$PidealCommutingSwitch2_s1SeedLSJac51)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */:1.0));
-  TRACE_POP
-}
-
-/*
- equation index: 132
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._p._v._$pDERLSJac51._dummyVarLSJac51 = idealCommutingSwitch2_s1SeedLSJac51 * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Ron)
- */
-void PW_PowerSystem_eqFunction_132(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,132};
-  $PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac51$PdummyVarLSJac51 = ($PidealCommutingSwitch2_s1SeedLSJac51) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */));
-  TRACE_POP
-}
-
-/*
- equation index: 133
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n2._i._$pDERLSJac51._dummyVarLSJac51 = (-idealCommutingSwitch2_s2SeedLSJac51) * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Goff)
- */
-void PW_PowerSystem_eqFunction_133(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,133};
-  $PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac51$PdummyVarLSJac51 = ((-$PidealCommutingSwitch2_s2SeedLSJac51)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */));
-  TRACE_POP
-}
-
-/*
- equation index: 134
- type: SIMPLE_ASSIGN
- $res._1._$pDERLSJac51._dummyVarLSJac51 = idealCommutingSwitch2.n2.i.$pDERLSJac51.dummyVarLSJac51 + idealCommutingSwitch2.n1.i.$pDERLSJac51.dummyVarLSJac51
- */
-void PW_PowerSystem_eqFunction_134(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,134};
-  $P$res$P1$P$pDERLSJac51$PdummyVarLSJac51 = $PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac51$PdummyVarLSJac51 + $PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac51$PdummyVarLSJac51;
-  TRACE_POP
-}
-
-/*
- equation index: 135
- type: SIMPLE_ASSIGN
- $res._2._$pDERLSJac51._dummyVarLSJac51 = idealCommutingSwitch2_s2SeedLSJac51 * (if convertToBoolean.y then idealCommutingSwitch2.Ron else 1.0) - idealCommutingSwitch2.p.v.$pDERLSJac51.dummyVarLSJac51
- */
-void PW_PowerSystem_eqFunction_135(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,135};
-  $P$res$P2$P$pDERLSJac51$PdummyVarLSJac51 = ($PidealCommutingSwitch2_s2SeedLSJac51) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */:1.0)) - $PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac51$PdummyVarLSJac51;
-  TRACE_POP
-}
-int PW_PowerSystem_functionJacLSJac51_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac51;
-  PW_PowerSystem_eqFunction_131(data, threadData);
-
-  PW_PowerSystem_eqFunction_132(data, threadData);
-
-  PW_PowerSystem_eqFunction_133(data, threadData);
-
-  PW_PowerSystem_eqFunction_134(data, threadData);
-
-  PW_PowerSystem_eqFunction_135(data, threadData);
-  
-  TRACE_POP
-  return 0;
-}
-
-/*
- equation index: 94
- type: SIMPLE_ASSIGN
- der(motor._lesigma._i._$pDERLSJac50._dummyVarLSJac50) = 0.3125 * motor_airGapDC_veiSeedLSJac50
- */
-void PW_PowerSystem_eqFunction_94(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,94};
-  $P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac50$PdummyVarLSJac50 = (0.3125) * ($Pmotor_airGapDC_veiSeedLSJac50);
-  TRACE_POP
-}
-
-/*
- equation index: 95
- type: SIMPLE_ASSIGN
- $res._1._$pDERLSJac50._dummyVarLSJac50 = 0.8 * $DER.motor.lesigma.i.$pDERLSJac50.dummyVarLSJac50 + motor_airGapDC_veiSeedLSJac50
- */
-void PW_PowerSystem_eqFunction_95(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,95};
-  $P$res$P1$P$pDERLSJac50$PdummyVarLSJac50 = (0.8) * ($P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac50$PdummyVarLSJac50) + $Pmotor_airGapDC_veiSeedLSJac50;
-  TRACE_POP
-}
-int PW_PowerSystem_functionJacLSJac50_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac50;
-  PW_PowerSystem_eqFunction_94(data, threadData);
-
-  PW_PowerSystem_eqFunction_95(data, threadData);
-  
-  TRACE_POP
-  return 0;
-}
-
-/*
- equation index: 72
- type: SIMPLE_ASSIGN
- arm_sensor._p._v._$pDERLSJac49._dummyVarLSJac49 = idealCommutingSwitch1_s2SeedLSJac49 * (if greaterThreshold1.y then idealCommutingSwitch1.Ron else 1.0)
- */
-void PW_PowerSystem_eqFunction_72(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,72};
-  $Parm_sensor$Pp$Pv$P$pDERLSJac49$PdummyVarLSJac49 = ($PidealCommutingSwitch1_s2SeedLSJac49) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */:1.0));
-  TRACE_POP
-}
-
-/*
- equation index: 73
- type: SIMPLE_ASSIGN
- $res._2._$pDERLSJac49._dummyVarLSJac49 = arm_sensor.p.v.$pDERLSJac49.dummyVarLSJac49 - idealCommutingSwitch1_s1SeedLSJac49 * (if greaterThreshold1.y then 1.0 else idealCommutingSwitch1.Ron)
- */
-void PW_PowerSystem_eqFunction_73(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,73};
-  $P$res$P2$P$pDERLSJac49$PdummyVarLSJac49 = $Parm_sensor$Pp$Pv$P$pDERLSJac49$PdummyVarLSJac49 - (($PidealCommutingSwitch1_s1SeedLSJac49) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[4] /* idealCommutingSwitch1._Ron PARAM */)));
-  TRACE_POP
-}
-
-/*
- equation index: 74
- type: SIMPLE_ASSIGN
- idealCommutingSwitch1._n2._i._$pDERLSJac49._dummyVarLSJac49 = (-idealCommutingSwitch1_s2SeedLSJac49) * (if greaterThreshold1.y then 1.0 else idealCommutingSwitch1.Goff)
- */
-void PW_PowerSystem_eqFunction_74(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,74};
-  $PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac49$PdummyVarLSJac49 = ((-$PidealCommutingSwitch1_s2SeedLSJac49)) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?1.0:data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */));
-  TRACE_POP
-}
-
-/*
- equation index: 75
- type: SIMPLE_ASSIGN
- $res._1._$pDERLSJac49._dummyVarLSJac49 = idealCommutingSwitch1.n2.i.$pDERLSJac49.dummyVarLSJac49 - idealCommutingSwitch1_s1SeedLSJac49 * (if greaterThreshold1.y then idealCommutingSwitch1.Goff else 1.0)
- */
-void PW_PowerSystem_eqFunction_75(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,75};
-  $P$res$P1$P$pDERLSJac49$PdummyVarLSJac49 = $PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac49$PdummyVarLSJac49 - (($PidealCommutingSwitch1_s1SeedLSJac49) * ((data->localData[0]->booleanVars[1] /* greaterThreshold1._y DISCRETE */?data->simulationInfo->realParameter[3] /* idealCommutingSwitch1._Goff PARAM */:1.0)));
-  TRACE_POP
-}
-int PW_PowerSystem_functionJacLSJac49_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac49;
-  PW_PowerSystem_eqFunction_72(data, threadData);
-
-  PW_PowerSystem_eqFunction_73(data, threadData);
-
-  PW_PowerSystem_eqFunction_74(data, threadData);
-
-  PW_PowerSystem_eqFunction_75(data, threadData);
-  
-  TRACE_POP
-  return 0;
-}
-
-/*
- equation index: 42
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n2._i._$pDERLSJac48._dummyVarLSJac48 = (-idealCommutingSwitch2_s2SeedLSJac48) * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Goff)
- */
-void PW_PowerSystem_eqFunction_42(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,42};
-  $PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac48$PdummyVarLSJac48 = ((-$PidealCommutingSwitch2_s2SeedLSJac48)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */));
-  TRACE_POP
-}
-
-/*
- equation index: 43
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._n1._i._$pDERLSJac48._dummyVarLSJac48 = (-idealCommutingSwitch2_s1SeedLSJac48) * (if convertToBoolean.y then idealCommutingSwitch2.Goff else 1.0)
- */
-void PW_PowerSystem_eqFunction_43(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,43};
-  $PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac48$PdummyVarLSJac48 = ((-$PidealCommutingSwitch2_s1SeedLSJac48)) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[6] /* idealCommutingSwitch2._Goff PARAM */:1.0));
-  TRACE_POP
-}
-
-/*
- equation index: 44
- type: SIMPLE_ASSIGN
- idealCommutingSwitch2._p._v._$pDERLSJac48._dummyVarLSJac48 = idealCommutingSwitch2_s1SeedLSJac48 * (if convertToBoolean.y then 1.0 else idealCommutingSwitch2.Ron)
- */
-void PW_PowerSystem_eqFunction_44(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,44};
-  $PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac48$PdummyVarLSJac48 = ($PidealCommutingSwitch2_s1SeedLSJac48) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?1.0:data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */));
-  TRACE_POP
-}
-
-/*
- equation index: 45
- type: SIMPLE_ASSIGN
- $res._1._$pDERLSJac48._dummyVarLSJac48 = idealCommutingSwitch2_s2SeedLSJac48 * (if convertToBoolean.y then idealCommutingSwitch2.Ron else 1.0) - idealCommutingSwitch2.p.v.$pDERLSJac48.dummyVarLSJac48
- */
-void PW_PowerSystem_eqFunction_45(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,45};
-  $P$res$P1$P$pDERLSJac48$PdummyVarLSJac48 = ($PidealCommutingSwitch2_s2SeedLSJac48) * ((data->localData[0]->booleanVars[0] /* convertToBoolean._y DISCRETE */?data->simulationInfo->realParameter[7] /* idealCommutingSwitch2._Ron PARAM */:1.0)) - $PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac48$PdummyVarLSJac48;
-  TRACE_POP
-}
-
-/*
- equation index: 46
- type: SIMPLE_ASSIGN
- $res._2._$pDERLSJac48._dummyVarLSJac48 = idealCommutingSwitch2.n2.i.$pDERLSJac48.dummyVarLSJac48 + idealCommutingSwitch2.n1.i.$pDERLSJac48.dummyVarLSJac48
- */
-void PW_PowerSystem_eqFunction_46(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  const int equationIndexes[2] = {1,46};
-  $P$res$P2$P$pDERLSJac48$PdummyVarLSJac48 = $PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac48$PdummyVarLSJac48 + $PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac48$PdummyVarLSJac48;
-  TRACE_POP
-}
-int PW_PowerSystem_functionJacLSJac48_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_LSJac48;
-  PW_PowerSystem_eqFunction_42(data, threadData);
-
-  PW_PowerSystem_eqFunction_43(data, threadData);
-
-  PW_PowerSystem_eqFunction_44(data, threadData);
-
-  PW_PowerSystem_eqFunction_45(data, threadData);
-
-  PW_PowerSystem_eqFunction_46(data, threadData);
-  
-  TRACE_POP
-  return 0;
-}
-int PW_PowerSystem_functionJacD_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_D;
-  
-  TRACE_POP
-  return 0;
-}
-int PW_PowerSystem_functionJacC_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_C;
-  
-  TRACE_POP
-  return 0;
-}
-int PW_PowerSystem_functionJacB_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_B;
-  
-  TRACE_POP
-  return 0;
-}
-int PW_PowerSystem_functionJacA_column(void* inData, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  DATA* data = ((DATA*)inData);
-  int index = PW_PowerSystem_INDEX_JAC_A;
-  
-  TRACE_POP
-  return 0;
-}
-
-

+ 0 - 210
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_12jac.h

@@ -1,210 +0,0 @@
-/* Jacobians */
-static const REAL_ATTRIBUTE dummyREAL_ATTRIBUTE = omc_dummyRealAttribute;
-/* Jacobian Variables */
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_LSJac53 5
-  int PW_PowerSystem_functionJacLSJac53_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianLSJac53(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* LSJac53 */
-#define $Pmotor_lesigma_vSeedLSJac53 data->simulationInfo->analyticJacobians[5].seedVars[0]
-#define _$P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac53$PdummyVarLSJac53(i) data->simulationInfo->analyticJacobians[5].tmpVars[0]
-#define $P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac53$PdummyVarLSJac53 _$P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac53$PdummyVarLSJac53(0)
-
-#define _$Pmotor$PairGapDC$Pvei$P$pDERLSJac53$PdummyVarLSJac53(i) data->simulationInfo->analyticJacobians[5].tmpVars[1]
-#define $Pmotor$PairGapDC$Pvei$P$pDERLSJac53$PdummyVarLSJac53 _$Pmotor$PairGapDC$Pvei$P$pDERLSJac53$PdummyVarLSJac53(0)
-
-#define _$P$res$P1$P$pDERLSJac53$PdummyVarLSJac53(i) data->simulationInfo->analyticJacobians[5].resultVars[0]
-#define $P$res$P1$P$pDERLSJac53$PdummyVarLSJac53 _$P$res$P1$P$pDERLSJac53$PdummyVarLSJac53(0)
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_LSJac52 4
-  int PW_PowerSystem_functionJacLSJac52_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianLSJac52(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* LSJac52 */
-#define $PidealCommutingSwitch1_s2SeedLSJac52 data->simulationInfo->analyticJacobians[4].seedVars[0]
-#define $PidealCommutingSwitch1_s1SeedLSJac52 data->simulationInfo->analyticJacobians[4].seedVars[1]
-#define _$PidealCommutingSwitch1$Pn1$Pi$P$pDERLSJac52$PdummyVarLSJac52(i) data->simulationInfo->analyticJacobians[4].tmpVars[0]
-#define $PidealCommutingSwitch1$Pn1$Pi$P$pDERLSJac52$PdummyVarLSJac52 _$PidealCommutingSwitch1$Pn1$Pi$P$pDERLSJac52$PdummyVarLSJac52(0)
-
-#define _$Parm_sensor$Pp$Pv$P$pDERLSJac52$PdummyVarLSJac52(i) data->simulationInfo->analyticJacobians[4].tmpVars[1]
-#define $Parm_sensor$Pp$Pv$P$pDERLSJac52$PdummyVarLSJac52 _$Parm_sensor$Pp$Pv$P$pDERLSJac52$PdummyVarLSJac52(0)
-
-#define _$PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac52$PdummyVarLSJac52(i) data->simulationInfo->analyticJacobians[4].tmpVars[2]
-#define $PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac52$PdummyVarLSJac52 _$PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac52$PdummyVarLSJac52(0)
-
-#define _$P$res$P2$P$pDERLSJac52$PdummyVarLSJac52(i) data->simulationInfo->analyticJacobians[4].resultVars[1]
-#define $P$res$P2$P$pDERLSJac52$PdummyVarLSJac52 _$P$res$P2$P$pDERLSJac52$PdummyVarLSJac52(0)
-
-#define _$P$res$P1$P$pDERLSJac52$PdummyVarLSJac52(i) data->simulationInfo->analyticJacobians[4].resultVars[0]
-#define $P$res$P1$P$pDERLSJac52$PdummyVarLSJac52 _$P$res$P1$P$pDERLSJac52$PdummyVarLSJac52(0)
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_LSJac51 3
-  int PW_PowerSystem_functionJacLSJac51_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianLSJac51(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* LSJac51 */
-#define $PidealCommutingSwitch2_s1SeedLSJac51 data->simulationInfo->analyticJacobians[3].seedVars[0]
-#define $PidealCommutingSwitch2_s2SeedLSJac51 data->simulationInfo->analyticJacobians[3].seedVars[1]
-#define _$PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac51$PdummyVarLSJac51(i) data->simulationInfo->analyticJacobians[3].tmpVars[0]
-#define $PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac51$PdummyVarLSJac51 _$PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac51$PdummyVarLSJac51(0)
-
-#define _$PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac51$PdummyVarLSJac51(i) data->simulationInfo->analyticJacobians[3].tmpVars[1]
-#define $PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac51$PdummyVarLSJac51 _$PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac51$PdummyVarLSJac51(0)
-
-#define _$PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac51$PdummyVarLSJac51(i) data->simulationInfo->analyticJacobians[3].tmpVars[2]
-#define $PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac51$PdummyVarLSJac51 _$PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac51$PdummyVarLSJac51(0)
-
-#define _$P$res$P2$P$pDERLSJac51$PdummyVarLSJac51(i) data->simulationInfo->analyticJacobians[3].resultVars[1]
-#define $P$res$P2$P$pDERLSJac51$PdummyVarLSJac51 _$P$res$P2$P$pDERLSJac51$PdummyVarLSJac51(0)
-
-#define _$P$res$P1$P$pDERLSJac51$PdummyVarLSJac51(i) data->simulationInfo->analyticJacobians[3].resultVars[0]
-#define $P$res$P1$P$pDERLSJac51$PdummyVarLSJac51 _$P$res$P1$P$pDERLSJac51$PdummyVarLSJac51(0)
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_LSJac50 2
-  int PW_PowerSystem_functionJacLSJac50_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianLSJac50(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* LSJac50 */
-#define $Pmotor_airGapDC_veiSeedLSJac50 data->simulationInfo->analyticJacobians[2].seedVars[0]
-#define _$P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac50$PdummyVarLSJac50(i) data->simulationInfo->analyticJacobians[2].tmpVars[0]
-#define $P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac50$PdummyVarLSJac50 _$P$DER$Pmotor$Plesigma$Pi$P$pDERLSJac50$PdummyVarLSJac50(0)
-
-#define _$Pmotor$Plesigma$Pv$P$pDERLSJac50$PdummyVarLSJac50(i) data->simulationInfo->analyticJacobians[2].tmpVars[1]
-#define $Pmotor$Plesigma$Pv$P$pDERLSJac50$PdummyVarLSJac50 _$Pmotor$Plesigma$Pv$P$pDERLSJac50$PdummyVarLSJac50(0)
-
-#define _$P$res$P1$P$pDERLSJac50$PdummyVarLSJac50(i) data->simulationInfo->analyticJacobians[2].resultVars[0]
-#define $P$res$P1$P$pDERLSJac50$PdummyVarLSJac50 _$P$res$P1$P$pDERLSJac50$PdummyVarLSJac50(0)
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_LSJac49 1
-  int PW_PowerSystem_functionJacLSJac49_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianLSJac49(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* LSJac49 */
-#define $PidealCommutingSwitch1_s2SeedLSJac49 data->simulationInfo->analyticJacobians[1].seedVars[0]
-#define $PidealCommutingSwitch1_s1SeedLSJac49 data->simulationInfo->analyticJacobians[1].seedVars[1]
-#define _$PidealCommutingSwitch1$Pn1$Pi$P$pDERLSJac49$PdummyVarLSJac49(i) data->simulationInfo->analyticJacobians[1].tmpVars[0]
-#define $PidealCommutingSwitch1$Pn1$Pi$P$pDERLSJac49$PdummyVarLSJac49 _$PidealCommutingSwitch1$Pn1$Pi$P$pDERLSJac49$PdummyVarLSJac49(0)
-
-#define _$Parm_sensor$Pp$Pv$P$pDERLSJac49$PdummyVarLSJac49(i) data->simulationInfo->analyticJacobians[1].tmpVars[1]
-#define $Parm_sensor$Pp$Pv$P$pDERLSJac49$PdummyVarLSJac49 _$Parm_sensor$Pp$Pv$P$pDERLSJac49$PdummyVarLSJac49(0)
-
-#define _$PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac49$PdummyVarLSJac49(i) data->simulationInfo->analyticJacobians[1].tmpVars[2]
-#define $PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac49$PdummyVarLSJac49 _$PidealCommutingSwitch1$Pn2$Pi$P$pDERLSJac49$PdummyVarLSJac49(0)
-
-#define _$P$res$P2$P$pDERLSJac49$PdummyVarLSJac49(i) data->simulationInfo->analyticJacobians[1].resultVars[1]
-#define $P$res$P2$P$pDERLSJac49$PdummyVarLSJac49 _$P$res$P2$P$pDERLSJac49$PdummyVarLSJac49(0)
-
-#define _$P$res$P1$P$pDERLSJac49$PdummyVarLSJac49(i) data->simulationInfo->analyticJacobians[1].resultVars[0]
-#define $P$res$P1$P$pDERLSJac49$PdummyVarLSJac49 _$P$res$P1$P$pDERLSJac49$PdummyVarLSJac49(0)
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_LSJac48 0
-  int PW_PowerSystem_functionJacLSJac48_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianLSJac48(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* LSJac48 */
-#define $PidealCommutingSwitch2_s1SeedLSJac48 data->simulationInfo->analyticJacobians[0].seedVars[0]
-#define $PidealCommutingSwitch2_s2SeedLSJac48 data->simulationInfo->analyticJacobians[0].seedVars[1]
-#define _$PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac48$PdummyVarLSJac48(i) data->simulationInfo->analyticJacobians[0].tmpVars[0]
-#define $PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac48$PdummyVarLSJac48 _$PidealCommutingSwitch2$Pp$Pv$P$pDERLSJac48$PdummyVarLSJac48(0)
-
-#define _$PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac48$PdummyVarLSJac48(i) data->simulationInfo->analyticJacobians[0].tmpVars[1]
-#define $PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac48$PdummyVarLSJac48 _$PidealCommutingSwitch2$Pn1$Pi$P$pDERLSJac48$PdummyVarLSJac48(0)
-
-#define _$PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac48$PdummyVarLSJac48(i) data->simulationInfo->analyticJacobians[0].tmpVars[2]
-#define $PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac48$PdummyVarLSJac48 _$PidealCommutingSwitch2$Pn2$Pi$P$pDERLSJac48$PdummyVarLSJac48(0)
-
-#define _$P$res$P2$P$pDERLSJac48$PdummyVarLSJac48(i) data->simulationInfo->analyticJacobians[0].resultVars[1]
-#define $P$res$P2$P$pDERLSJac48$PdummyVarLSJac48 _$P$res$P2$P$pDERLSJac48$PdummyVarLSJac48(0)
-
-#define _$P$res$P1$P$pDERLSJac48$PdummyVarLSJac48(i) data->simulationInfo->analyticJacobians[0].resultVars[0]
-#define $P$res$P1$P$pDERLSJac48$PdummyVarLSJac48 _$P$res$P1$P$pDERLSJac48$PdummyVarLSJac48(0)
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_D 9
-  int PW_PowerSystem_functionJacD_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianD(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* D */
-#define $Pdown_inputSeedD data->simulationInfo->analyticJacobians[9].seedVars[0]
-#define $Pinput_torqueSeedD data->simulationInfo->analyticJacobians[9].seedVars[1]
-#define $Pup_inputSeedD data->simulationInfo->analyticJacobians[9].seedVars[2]
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_C 8
-  int PW_PowerSystem_functionJacC_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianC(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* C */
-#define $Pmotor_airGapDC_psi_eSeedC data->simulationInfo->analyticJacobians[8].seedVars[0]
-#define $Pmotor_inertiaRotor_wSeedC data->simulationInfo->analyticJacobians[8].seedVars[1]
-#define $Pmotor_la_iSeedC data->simulationInfo->analyticJacobians[8].seedVars[2]
-#define $Pmotor_phiMechanicalSeedC data->simulationInfo->analyticJacobians[8].seedVars[3]
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_B 7
-  int PW_PowerSystem_functionJacB_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianB(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* B */
-#define $Pdown_inputSeedB data->simulationInfo->analyticJacobians[7].seedVars[0]
-#define $Pinput_torqueSeedB data->simulationInfo->analyticJacobians[7].seedVars[1]
-#define $Pup_inputSeedB data->simulationInfo->analyticJacobians[7].seedVars[2]
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-  #define PW_PowerSystem_INDEX_JAC_A 6
-  int PW_PowerSystem_functionJacA_column(void* data, threadData_t *threadData);
-  int PW_PowerSystem_initialAnalyticJacobianA(void* data, threadData_t *threadData);
-#if defined(__cplusplus)
-}
-#endif
-/* A */
-#define $Pmotor_airGapDC_psi_eSeedA data->simulationInfo->analyticJacobians[6].seedVars[0]
-#define $Pmotor_inertiaRotor_wSeedA data->simulationInfo->analyticJacobians[6].seedVars[1]
-#define $Pmotor_la_iSeedA data->simulationInfo->analyticJacobians[6].seedVars[2]
-#define $Pmotor_phiMechanicalSeedA data->simulationInfo->analyticJacobians[6].seedVars[3]
-
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_12jac.o


+ 0 - 14
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_13opt.c

@@ -1,14 +0,0 @@
-/* Optimization */
-#include "PW_PowerSystem_model.h"
-#include "PW_PowerSystem_12jac.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-int PW_PowerSystem_mayer(DATA* data, modelica_real** res,short *i){return -1;}
-int PW_PowerSystem_lagrange(DATA* data, modelica_real** res, short * i1, short*i2){return -1;}
-int PW_PowerSystem_pickUpBoundsForInputsInOptimization(DATA* data, modelica_real* min, modelica_real* max, modelica_real*nominal, modelica_boolean *useNominal, char ** name, modelica_real * start, modelica_real * startTimeOpt){return -1;}
-int PW_PowerSystem_setInputData(DATA *data, const modelica_boolean file){return -1;}
-int PW_PowerSystem_getTimeGrid(DATA *data, modelica_integer * nsi, modelica_real**t){return -1;}
-#if defined(__cplusplus)
-}
-#endif

+ 0 - 11
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_13opt.h

@@ -1,11 +0,0 @@
-#if defined(__cplusplus)
-  extern "C" {
-#endif
-  int PW_PowerSystem_mayer(DATA* data, modelica_real** res, short*);
-  int PW_PowerSystem_lagrange(DATA* data, modelica_real** res, short *, short *);
-  int PW_PowerSystem_pickUpBoundsForInputsInOptimization(DATA* data, modelica_real* min, modelica_real* max, modelica_real*nominal, modelica_boolean *useNominal, char ** name, modelica_real * start, modelica_real * startTimeOpt);
-  int PW_PowerSystem_setInputData(DATA *data, const modelica_boolean file);
-  int PW_PowerSystem_getTimeGrid(DATA *data, modelica_integer * nsi, modelica_real**t);
-#if defined(__cplusplus)
-}
-#endif

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_13opt.o


File diff suppressed because it is too large
+ 0 - 44
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_14lnz.c


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_14lnz.o


+ 0 - 59
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_15syn.c

@@ -1,59 +0,0 @@
-/* Synchronous systems */
-#include "PW_PowerSystem_model.h"
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Initializes the clocks of model. */
-void PW_PowerSystem_function_initSynchronous(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-  long i=0, j=0;
-  TRACE_POP
-}
-
-/* Update the base clock. */
-void PW_PowerSystem_function_updateSynchronous(DATA *data, threadData_t *threadData, long i)
-{
-  TRACE_PUSH
-  modelica_boolean ret;
-  switch (i) {
-    default:
-      throwStreamPrint(NULL, "Internal Error: unknown base partition %ld", i);
-      break;
-  }
-  TRACE_POP
-}
-
-
-
-/*Clocked systems equations */
-int PW_PowerSystem_function_equationsSynchronous(DATA *data, threadData_t *threadData, long i)
-{
-  TRACE_PUSH
-  int ret;
-
-  switch (i) {
-    default:
-      throwStreamPrint(NULL, "Internal Error: unknown sub partition %ld", i);
-      ret = 1;
-      break;
-  }
-
-  TRACE_POP
-  return ret;
-}
-
-/* pre(%v%) = %v% */
-void PW_PowerSystem_function_savePreSynchronous(DATA *data, threadData_t *threadData)
-{
-  TRACE_PUSH
-
-  
-  TRACE_POP
-}
-
-#if defined(__cplusplus)
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_15syn.o


+ 0 - 9
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_16dae.c

@@ -1,9 +0,0 @@
-/* DAE residuals is empty */
- #include "PW_PowerSystem_model.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-int PW_PowerSystem_initializeDAEmodeData(DATA *inData, DAEMODE_DATA* daeModeData){ return -1; }
-#ifdef __cplusplus
-}
-#endif

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_16dae.o


File diff suppressed because it is too large
+ 0 - 1792
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_FMU.c


+ 0 - 0
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_FMU.libs


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_FMU.o


File diff suppressed because it is too large
+ 0 - 248
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_functions.c


File diff suppressed because it is too large
+ 0 - 195
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_functions.h


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_functions.o


+ 0 - 0
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_includes.h


File diff suppressed because it is too large
+ 0 - 1
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_info.c


File diff suppressed because it is too large
+ 0 - 3822
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_init_fmu.c


BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_init_fmu.o


+ 0 - 26
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_literals.h

@@ -1,26 +0,0 @@
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define _OMC_LIT0_data "'p"
-static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,2,_OMC_LIT0_data);
-#define _OMC_LIT0 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT0)
-#define _OMC_LIT1_data "'p/s"
-static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT1,4,_OMC_LIT1_data);
-#define _OMC_LIT1 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT1)
-#define _OMC_LIT2_data "ElectricCurrent"
-static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,15,_OMC_LIT2_data);
-#define _OMC_LIT2 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT2)
-#define _OMC_LIT3_data "A"
-static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT3,1,_OMC_LIT3_data);
-#define _OMC_LIT3 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT3)
-#define _OMC_LIT4_data "ElectricPotential"
-static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT4,17,_OMC_LIT4_data);
-#define _OMC_LIT4 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT4)
-#define _OMC_LIT5_data "V"
-static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT5,1,_OMC_LIT5_data);
-#define _OMC_LIT5 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT5)
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 102
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_model.h

@@ -1,102 +0,0 @@
-/* Simulation code for PW_PowerSystem generated by the OpenModelica Compiler v1.12.0-dev-77-g56dc448 (32-bit). */
-#if !defined(PW_PowerSystem__MODEL_H)
-#define PW_PowerSystem__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 "PW_PowerSystem_functions.h"
-
-#define Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE_index 0
-#define Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE$motor$powerBalance_index 1
-#define Modelica_Electrical_Machines_Losses_BrushParameters_index 2
-#define Modelica_Electrical_Machines_Losses_BrushParameters$motor$brushParameters_index 3
-#define Modelica_Electrical_Machines_Losses_CoreParameters_index 4
-#define Modelica_Electrical_Machines_Losses_CoreParameters$motor$coreParameters_index 5
-#define Modelica_Electrical_Machines_Losses_FrictionParameters_index 6
-#define Modelica_Electrical_Machines_Losses_FrictionParameters$motor__frictionParameters_index 7
-#define Modelica_Electrical_Machines_Losses_StrayLoadParameters_index 8
-#define Modelica_Electrical_Machines_Losses_StrayLoadParameters$motor$strayLoadParameters_index 9
-#define Modelica_Electrical_Machines_Losses_DCMachines_brushVoltageDrop_index 10
-
-extern void PW_PowerSystem_callExternalObjectConstructors(DATA *data, threadData_t *threadData);
-extern void PW_PowerSystem_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
-extern void PW_PowerSystem_initialLinearSystem(int nLinearSystems, LINEAR_SYSTEM_DATA *data);
-#endif
-#if !defined(OMC_NUM_MIXED_SYSTEMS) || OMC_NUM_MIXED_SYSTEMS>0
-#endif
-#if !defined(OMC_NO_STATESELECTION)
-extern void PW_PowerSystem_initializeStateSets(int nStateSets, STATE_SET_DATA* statesetData, DATA *data);
-#endif
-extern int PW_PowerSystem_functionAlgebraics(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_function_storeDelayed(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_updateBoundVariableAttributes(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_functionInitialEquations(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_functionInitialEquations_lambda0(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_functionRemovedInitialEquations(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_updateBoundParameters(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_checkForAsserts(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_function_ZeroCrossingsEquations(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_function_ZeroCrossings(DATA *data, threadData_t *threadData, double* gout);
-extern int PW_PowerSystem_function_updateRelations(DATA *data, threadData_t *threadData, int evalZeroCross);
-extern int PW_PowerSystem_checkForDiscreteChanges(DATA *data, threadData_t *threadData);
-extern const char* PW_PowerSystem_zeroCrossingDescription(int i, int **out_EquationIndexes);
-extern const char* PW_PowerSystem_relationDescription(int i);
-extern void PW_PowerSystem_function_initSample(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_initialAnalyticJacobianG(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_initialAnalyticJacobianA(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_initialAnalyticJacobianB(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_initialAnalyticJacobianC(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_initialAnalyticJacobianD(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_functionJacG_column(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_functionJacA_column(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_functionJacB_column(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_functionJacC_column(void* data, threadData_t *threadData);
-extern int PW_PowerSystem_functionJacD_column(void* data, threadData_t *threadData);
-extern const char* PW_PowerSystem_linear_model_frame(void);
-extern const char* PW_PowerSystem_linear_model_datarecovery_frame(void);
-extern int PW_PowerSystem_mayer(DATA* data, modelica_real** res, short *);
-extern int PW_PowerSystem_lagrange(DATA* data, modelica_real** res, short *, short *);
-extern int PW_PowerSystem_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 PW_PowerSystem_setInputData(DATA *data, const modelica_boolean file);
-extern int PW_PowerSystem_getTimeGrid(DATA *data, modelica_integer * nsi, modelica_real**t);
-extern void PW_PowerSystem_function_initSynchronous(DATA * data, threadData_t *threadData);
-extern void PW_PowerSystem_function_updateSynchronous(DATA * data, threadData_t *threadData, long i);
-extern int PW_PowerSystem_function_equationsSynchronous(DATA * data, threadData_t *threadData, long i);
-extern void PW_PowerSystem_read_input_fmu(MODEL_DATA* modelData, SIMULATION_INFO* simulationData);
-extern void PW_PowerSystem_function_savePreSynchronous(DATA *data, threadData_t *threadData);
-extern int PW_PowerSystem_inputNames(DATA* data, char ** names);
-extern int PW_PowerSystem_initializeDAEmodeData(DATA *data, DAEMODE_DATA*);
-extern int PW_PowerSystem_functionLocalKnownVars(DATA*, threadData_t*);
-
-#include "PW_PowerSystem_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
-
-

+ 0 - 92
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_records.c

@@ -1,92 +0,0 @@
-/* Additional record code for PW_PowerSystem generated by the OpenModelica Compiler v1.12.0-dev-77-g56dc448 (32-bit). */
-
-#include "meta/meta_modelica.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE__desc_added 1
-const char* Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE__desc__fields[12] = {"lossPowerArmature","lossPowerBrush","lossPowerCore","lossPowerExcitation","lossPowerFriction","lossPowerStrayLoad","lossPowerTotal","powerArmature","powerExcitation","powerInertiaRotor","powerInertiaStator","powerMechanical"};
-struct record_description Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE__desc = {
-  "Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE", /* package_record__X */
-  "Modelica.Electrical.Machines.Interfaces.DCMachines.PowerBalanceDCEE", /* package.record_X */
-  Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_BrushParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_BrushParameters__desc__fields[2] = {"ILinear","V"};
-struct record_description Modelica_Electrical_Machines_Losses_BrushParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_BrushParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.BrushParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_BrushParameters__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_CoreParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_CoreParameters__desc__fields[7] = {"GcRef","PRef","VRef","m","ratioHysteresis","wMin","wRef"};
-struct record_description Modelica_Electrical_Machines_Losses_CoreParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_CoreParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.CoreParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_CoreParameters__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_FrictionParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_FrictionParameters__desc__fields[7] = {"PRef","linear","power_w","tauLinear","tauRef","wLinear","wRef"};
-struct record_description Modelica_Electrical_Machines_Losses_FrictionParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_FrictionParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.FrictionParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_FrictionParameters__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_StrayLoadParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_StrayLoadParameters__desc__fields[5] = {"IRef","PRef","power_w","tauRef","wRef"};
-struct record_description Modelica_Electrical_Machines_Losses_StrayLoadParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_StrayLoadParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.StrayLoadParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_StrayLoadParameters__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE$motor$powerBalance__desc_added 1
-const char* Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE$motor$powerBalance__desc__fields[12] = {"lossPowerArmature","lossPowerBrush","lossPowerCore","lossPowerExcitation","lossPowerFriction","lossPowerStrayLoad","lossPowerTotal","powerArmature","powerExcitation","powerInertiaRotor","powerInertiaStator","powerMechanical"};
-struct record_description Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE$motor$powerBalance__desc = {
-  "Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE$motor$powerBalance", /* package_record__X */
-  "Modelica.Electrical.Machines.Interfaces.DCMachines.PowerBalanceDCEE$motor$powerBalance", /* package.record_X */
-  Modelica_Electrical_Machines_Interfaces_DCMachines_PowerBalanceDCEE$motor$powerBalance__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_BrushParameters$motor$brushParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_BrushParameters$motor$brushParameters__desc__fields[2] = {"ILinear","V"};
-struct record_description Modelica_Electrical_Machines_Losses_BrushParameters$motor$brushParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_BrushParameters$motor$brushParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.BrushParameters$motor$brushParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_BrushParameters$motor$brushParameters__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_CoreParameters$motor$coreParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_CoreParameters$motor$coreParameters__desc__fields[7] = {"GcRef","PRef","VRef","m","ratioHysteresis","wMin","wRef"};
-struct record_description Modelica_Electrical_Machines_Losses_CoreParameters$motor$coreParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_CoreParameters$motor$coreParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.CoreParameters$motor$coreParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_CoreParameters$motor$coreParameters__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_FrictionParameters$motor__frictionParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_FrictionParameters$motor__frictionParameters__desc__fields[7] = {"PRef","linear","power_w","tauLinear","tauRef","wLinear","wRef"};
-struct record_description Modelica_Electrical_Machines_Losses_FrictionParameters$motor__frictionParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_FrictionParameters$motor__frictionParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.FrictionParameters$motor_frictionParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_FrictionParameters$motor__frictionParameters__desc__fields
-};
-
-#define Modelica_Electrical_Machines_Losses_StrayLoadParameters$motor$strayLoadParameters__desc_added 1
-const char* Modelica_Electrical_Machines_Losses_StrayLoadParameters$motor$strayLoadParameters__desc__fields[5] = {"IRef","PRef","power_w","tauRef","wRef"};
-struct record_description Modelica_Electrical_Machines_Losses_StrayLoadParameters$motor$strayLoadParameters__desc = {
-  "Modelica_Electrical_Machines_Losses_StrayLoadParameters$motor$strayLoadParameters", /* package_record__X */
-  "Modelica.Electrical.Machines.Losses.StrayLoadParameters$motor$strayLoadParameters", /* package.record_X */
-  Modelica_Electrical_Machines_Losses_StrayLoadParameters$motor$strayLoadParameters__desc__fields
-};
-
-#ifdef __cplusplus
-}
-#endif
-

BIN
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/PW_PowerSystem_records.o


+ 0 - 242
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/configure.ac

@@ -1,242 +0,0 @@
- Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.63])
-AC_INIT([OpenModelica Exported FMU],[dev],[https://trac.openmodelica.org/OpenModelica],[openmodelica],[https://openmodelica.org])
-
-AC_SUBST(AR)
-AC_SUBST(DLLEXT)
-AC_SUBST(FMIPLATFORM)
-AC_SUBST(NEED_DGESV)
-AC_SUBST(NEED_RUNTIME)
-AC_SUBST(LIBTYPE_STATIC)
-AC_SUBST(LIBTYPE_DYNAMIC)
-
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
-
-build_short=$build_cpu-$build_os
-if test "$host_os" = "none"; then
-  host_short=$host_cpu
-else
-  host_short=$host_cpu-$host_os
-fi
-
-echo "build_short: $build_short"
-echo "host_short: $host_short"
-
-ORIGCC="$CC"
-
-dnl Checks for programs.
-AC_LANG([C])
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_MAKE_SET
-
-AC_MSG_CHECKING([for cross-compilation flags])
-if test "$host_short" = "$build_short"; then
-  # Not cross-compiling or found a good tool; don't need special flags
-  AC_MSG_RESULT([not cross-compiling])
-elif echo "$CC" | grep -q "$host_short" || echo "$CC" | grep -q "$host" || echo "$CC" | grep -q "$host_cpu"; then
-  AC_MSG_RESULT([not needed; $CC contains the prefix])
-elif test "$host_os" = "$build_os" && test "$host_short" = "x86_64"; then
-  CFLAGS_BEFORE="$CFLAGS"
-  CFLAGS="$CFLAGS -m64"
-  AC_TRY_LINK([void abc() {}], [abc();], [AC_MSG_RESULT([-m64])], [AC_MSG_ERROR([-m64 not working])])
-elif test "$host_os" = "$build_os" && echo "$host_short" | grep -q "i.86"; then
-  CFLAGS_BEFORE="$CFLAGS"
-  CFLAGS="$CFLAGS -m32"
-  LDFLAGS="$LDFLAGS -m32"
-  AC_TRY_LINK([void abc() {}], [abc();], [AC_MSG_RESULT([-m32])], [AC_MSG_ERROR([-m32 not working])])
-elif test ! -z "$ORIGCC"; then
-  AC_MSG_RESULT([user sent an explicit CC=$ORIGCC. Trusting the user.])
-else
-  CC="$host-cc"
-  if which $host-cc > /dev/null 2>&1; then
-    CC="$host-cc"
-  else
-    CC=clang
-    CFLAGS="$CFLAGS -target $host"
-  fi
-  AC_TRY_LINK([void abc() {}], [abc();], [AC_MSG_RESULT([$CC $CFLAGS])], [AC_MSG_ERROR([unknown platform and $CC $CFLAGS not working])])
-fi
-
-if false; then
-CC_BEFORE="$CC"
-CC="clang -target $host_short"
-AC_MSG_CHECKING([looking for $CC to replace $CC_BEFORE])
-AC_TRY_LINK([void abc() {}], [abc();], [AC_MSG_RESULT([yes])], [CC="$CC_BEFORE";AC_MSG_RESULT([no])])
-fi
-
-CFLAGS_BEFORE="$CFLAGS"
-CFLAGS="$CFLAGS -Werror"
-AC_MSG_CHECKING([if -Werror works])
-AC_TRY_LINK([void abc() {}], [abc();], [AC_MSG_RESULT([ok])], [AC_MSG_ERROR([failed (check your CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS)])])
-CFLAGS="$CFLAGS_BEFORE"
-
-LDFLAGS_BEFORE="$LDFLAGS"
-LDFLAGS="$LDFLAGS -Wl,--no-undefined -Werror"
-AC_MSG_CHECKING([looking for --no-undefined])
-AC_TRY_LINK([void abc() {}], [abc();], [AC_MSG_RESULT([yes]);LD_NOUNDEFINED=" -Wl,--no-undefined"], [AC_MSG_RESULT([no])])
-LDFLAGS="$LDFLAGS_BEFORE"
-
-dnl Enable to handle AVR pre-processor not handling $ as symbol names; but fails on assembler anyway
-
-AC_MSG_CHECKING([looking for dollars in identifiers])
-AC_TRY_LINK([
-void $a$b$c() {}
-#define $a$b$c$d $a$b$c
-], [$a$b$c$d();], [AC_MSG_RESULT([not needed])], [
-  CPPFLAGS="$CPPFLAGS -fdollars-in-identifiers"
-  AC_TRY_LINK([
-    void fx() {}
-    #define \$a\$b fx
-    ], [\$a\$b();], [AC_MSG_RESULT([CPPFLAGS: -fdollars-in-identifiers])], [
-    AC_MSG_ERROR([the compiler does not handle dollar in identifiers])
-  ])
-])
-
-dnl Disables the default CFLAGS="-g -O2"
-
-AC_ARG_ENABLE(static, [  --enable-static], [
-  if test "$enableval" = "yes"; then
-    LIBTYPE_STATIC=1
-  elif test "$enableval" = "no"; then
-    LIBTYPE_STATIC=0
-  else
-    AC_MSG_ERROR([Unknown value --enable-static=$withval (use yes or no, or no value)])
-  fi
-], [LIBTYPE_STATIC=0])
-
-AC_ARG_ENABLE(shared, [  --disable-shared], [
-  if test "$enableval" = "yes"; then
-    LIBTYPE_DYNAMIC=1
-  elif test "$enableval" = "no"; then
-    LIBTYPE_DYNAMIC=0
-  else
-    AC_MSG_ERROR([Unknown value --enable-dynamic=$withval (use yes or no, or no value)])
-  fi
-], [LIBTYPE_DYNAMIC=1])
-
-if test "$LIBTYPE_DYNAMIC" = 0 -a "$LIBTYPE_STATIC" = 0; then
-  AC_MSG_ERROR([Need to --enable-shared or --enable-static (both were disabled)])
-fi
-
-if test "$LIBTYPE_DYNAMIC" = 1; then
-  LDFLAGS="$LDFLAGS -shared"
-fi
-
-if test "$LIBTYPE_STATIC" = 1; then
-  AC_CHECK_TOOL([AR], [ar], [:])
-  if test "$AR" = ":"; then
-    AC_MSG_ERROR([Did not find a suitable ar])
-  fi
-fi
-
-
-TRY_FLAGS="-fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC"
-
-for flag in $TRY_FLAGS; do
-  OLD_CFLAGS="$CFLAGS"
-  CFLAGS="$RUNTIMECFLAGS $flag -Werror"
-  AC_TRY_LINK([], [return 0;], [CFLAGS="$OLD_CFLAGS $flag"],[CFLAGS="$OLD_CFLAGS"])
-done
-
-TRY_FLAGS="-static-libgcc"
-for flag in $TRY_FLAGS; do
-  OLD_LDFLAGS="$LDFLAGS"
-  LDFLAGS="$LDFLAGS $flag"
-  AC_TRY_LINK([], [return 0;], [LDFLAGS="$OLD_LDFLAGS $flag"],[LDFLAGS="$OLD_LDFLAGS"])
-done
-
-if test "`getconf LONG_BIT`" = "32"; then
-dnl Simulations spin forever unless -msse2 -mfpmath=sse is set
-
-CFLAGS_BEFORE=$CFLAGS
-CFLAGS="-mfpmath=sse -Werror"
-AC_MSG_CHECKING([for floating point bugs])
-AC_TRY_LINK([int abc() {}], [abc();], [AC_MSG_RESULT([force SSE2]); FPMATHFORTRAN="-msse -mfpmath=sse"], [AC_MSG_RESULT([no]); FPMATHFORTRAN=-ffloat-store])
-CFLAGS=$CFLAGS_BEFORE
-
-fi # End x86-specific CFLAGS
-
-dnl Checks for libraries.
-
-dnl Checks for header files.
-AC_HEADER_STDC
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
-
-dnl Checks for library functions.
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(strdup strerror)
-
-m4_include([../../../../m4/lapack.m4])
-OMC_AC_LAPACK(static)
-if test -z "$LD_LAPACK"; then
-  NEED_DGESV=1
-else
-  LIBS="$LIBS $LD_LAPACK"
-fi
-
-AC_MSG_CHECKING([for static pthreads])
-OLDLIBS=$LIBS
-LIBS="$OLDLIBS -Wl,-Bstatic -lpthread -Wl,-Bdynamic"
-AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_mutex_lock])],[AC_MSG_RESULT([OK (static)])],[
-  AC_MSG_RESULT([no])
-  LIBS="$OLDLIBS"
-  AC_CHECK_LIB(pthread,[pthread_mutex_lock],[],[
-    if test "$LIBTYPE_DYNAMIC" = 1; then
-      AC_MSG_ERROR([pthreads not found and requested dynamic linking])
-    else
-      AC_MSG_RESULT([pthreads disabled])
-      CPPFLAGS="$CPPFLAGS -DOMC_NO_THREADS"
-    fi
-  ])
-])
-
-AC_CHECK_LIB([m],[cos],[],[AC_MSG_ERROR([math library not found])])
-
-AC_MSG_CHECKING([for filesystem access])
-AC_TRY_LINK([#include <stdio.h>], [fopen("a.txt", "r");], [AC_MSG_RESULT([OK])], [AC_MSG_RESULT([no]); CPPFLAGS="$CPPFLAGS -DOMC_NO_FILESYSTEM"])
-
-AC_ARG_WITH(dynamic-om-runtime,  [  --with-dynamic-om-runtime    (uses the OMC runtime as a shared object instead of compiling it statically into the the FMU.)],[OPENMODELICADYNAMIC=yes],[OPENMODELICADYNAMIC=no])
-
-if test "$OPENMODELICADYNAMIC" = "no"; then
-  CPPFLAGS="$CPPFLAGS -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1"
-  NEED_RUNTIME=1
-fi
-
-if echo "$host_os" | grep -q darwin; then
-  DLLEXT=".dylib"
-  if echo "$host_cpu" | grep -q i@<:@3456@:>@86; then
-    FMIPLATFORM=darwin32
-  elif echo "$host_cpu" | grep -q x86_64; then
-    FMIPLATFORM=darwin64
-  fi
-elif echo "$host_os" | grep -q mingw; then
-  DLLEXT=".dll"
-  if echo "$host_cpu" | grep -q i@<:@3456@:>@86; then
-    FMIPLATFORM=win32
-  elif echo "$host_cpu" | grep -q x86_64; then
-    FMIPLATFORM=win64
-  fi
-elif echo "$host_os" | grep -q linux; then
-  DLLEXT=".so"
-  if echo "$host_cpu" | grep -q i@<:@3456@:>@86; then
-    FMIPLATFORM=linux32
-  elif echo "$host_cpu" | grep -q x86_64; then
-    FMIPLATFORM=linux64
-  fi
-else
-  DLLEXT=".so"
-fi
-
-# Non-standard platforms also need some love
-if test -z "$FMIPLATFORM"; then
-  FMIPLATFORM=$host_short
-fi
-
-AC_OUTPUT(Makefile)

File diff suppressed because it is too large
+ 0 - 183
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/Makefile.objs


+ 0 - 113
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ModelicaUtilities.h

@@ -1,113 +0,0 @@
-#ifndef MODELICA_UTILITIES_H
-#define MODELICA_UTILITIES_H
-
-#include <stddef.h>
-#include <stdarg.h>
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/* Utility functions which can be called by external Modelica functions.
-
-   These functions are defined in section 12.8.6 of the
-   Modelica Specification 3.0 and section 12.9.6 of the
-   Modelica Specification 3.1 and 3.2.
-
-   A generic C-implementation of these functions cannot be given,
-   because it is tool dependent how strings are output in a
-   window of the respective simulation tool. Therefore, only
-   this header file is shipped with the Modelica Standard Library.
-*/
-
-/*
- * Some of the functions never return to the caller. In order to compile
- * external Modelica C-code in most compilers, noreturn attributes need to
- * be present to avoid warnings or errors.
- *
- * The following macros handle noreturn attributes according to the latest
- * C11/C++11 standard with fallback to GNU or MSVC extensions if using an
- * older compiler.
- */
-#if __STDC_VERSION__ >= 201112L
-#define MODELICA_NORETURN _Noreturn
-#define MODELICA_NORETURNATTR
-#elif __cplusplus >= 201103L
-#define MODELICA_NORETURN [[noreturn]]
-#define MODELICA_NORETURNATTR
-#elif defined(__GNUC__)
-#define MODELICA_NORETURN
-#define MODELICA_NORETURNATTR __attribute__((noreturn))
-#elif defined(_MSC_VER)
-#define MODELICA_NORETURN __declspec(noreturn)
-#define MODELICA_NORETURNATTR
-#else
-#define MODELICA_NORETURN
-#define MODELICA_NORETURNATTR
-#endif
-
-void ModelicaMessage(const char *string);
-/*
-Output the message string (no format control).
-*/
-
-
-void ModelicaFormatMessage(const char *string,...);
-  /*
-Output the message under the same format control as the C-function printf.
-  */
-
-
-void ModelicaVFormatMessage(const char *string, va_list);
-  /*
-Output the message under the same format control as the C-function vprintf.
-  */
-
-
-MODELICA_NORETURN void ModelicaError(const char *string) MODELICA_NORETURNATTR;
-/*
-Output the error message string (no format control). This function
-never returns to the calling function, but handles the error
-similarly to an assert in the Modelica code.
-*/
-
-
-MODELICA_NORETURN void ModelicaFormatError(const char *string,...) MODELICA_NORETURNATTR;
-/*
-Output the error message under the same format control as the C-function
-printf. This function never returns to the calling function,
-but handles the error similarly to an assert in the Modelica code.
-*/
-
-
-MODELICA_NORETURN void ModelicaVFormatError(const char *string, va_list) MODELICA_NORETURNATTR;
-/*
-Output the error message under the same format control as the C-function
-vprintf. This function never returns to the calling function,
-but handles the error similarly to an assert in the Modelica code.
-*/
-
-
-char* ModelicaAllocateString(size_t len);
-/*
-Allocate memory for a Modelica string which is used as return
-argument of an external Modelica function. Note, that the storage
-for string arrays (= pointer to string array) is still provided by the
-calling program, as for any other array. If an error occurs, this
-function does not return, but calls "ModelicaError".
-*/
-
-
-char* ModelicaAllocateStringWithErrorReturn(size_t len);
-/*
-Same as ModelicaAllocateString, except that in case of error, the
-function returns 0. This allows the external function to close files
-and free other open resources in case of error. After cleaning up
-resources use ModelicaError or ModelicaFormatError to signal
-the error.
-*/
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif

+ 0 - 910
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/OCLRuntimeUtil.cl

@@ -1,910 +0,0 @@
-/*
- * This file is part of OpenModelica.
- *
- * Copyright (c) 1998-CurrentYear, Linköping University,
- * Department of Computer and Information Science,
- * SE-58183 Linköping, Sweden.
- *
- * All rights reserved.
- *
- * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3
- * AND THIS OSMC PUBLIC LICENSE (OSMC-PL).
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
- * ACCEPTANCE OF THE OSMC PUBLIC LICENSE.
- *
- * The OpenModelica software and the Open Source Modelica
- * Consortium (OSMC) Public License (OSMC-PL) are obtained
- * from Linköping University, either from the above address,
- * from the URLs: http://www.ida.liu.se/projects/OpenModelica or
- * http://www.openmodelica.org, and in the OpenModelica distribution.
- * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of  MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
- * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS
- * OF OSMC-PL.
- *
- * See the full OSMC Public License conditions for more details.
- *
- */
-
-
-/*
-
- This file contains functions and objects used at runtime
- by OpenCL code. This file is included in every OpenCL
- computation from modelica. It provides utilities when running
- computations on GPUs and also on CPUs in OpenCL mode.
-
- It is the OpenCL counterpart of the C runtime for
- normal modelica execution.
-
- Mahder.Gebremedhin@liu.se  2012-03-31
-
-*/
-
-
-#ifdef cl_amd_printf
-  #pragma OPENCL EXTENSION cl_amd_printf : enable
-  #define PRINTF_AVAILABLE
-#endif
-
-#ifdef cl_intel_printf
-  #pragma OPENCL EXTENSION cl_intel_printf : enable
-  #define PRINTF_AVAILABLE
-#endif
-
-#ifdef PRINTF_AVAILABLE
-  #define omc_assert(td,i,s) (printf("Assertion: %s, Line %d, info %d\n", s, __LINE__, i))
-  #define omc_assert_withEquationIndexes(td,i,idx,s) (printf("Assertion: %s, Line %d, info %d\n", s, __LINE__, i))
-  #define throwStreamPrint(td,str,exp) (printf("Assertion: %s\n, expression %s, Line %d\n", str, exp, __LINE__))
-  #define printline() printf("At line %d\n", __LINE__)
-#else
-  #define omc_assert(td,i,s)
-  #define omc_assert_withEquationIndexes(td,i,idx,s)
-  #define throwStreamPrint(td,str,exp)
-  #define printline()
-#endif
-
-#ifdef cl_khr_fp64
-  #pragma OPENCL EXTENSION cl_khr_fp64 : enable
-  #define DOUBLE_PREC_AVAILABLE
-#endif
-
-#ifdef cl_amd_fp64
-  #pragma OPENCL EXTENSION cl_amd_fp64 : enable
-  #define DOUBLE_PREC_AVAILABLE
-#endif
-
-
-#define FILE_INFO modelica_integer
-#define threadData_t integer
-#define threadData NULL
-#define omc_dummyFileInfo __LINE__
-
-#define sin(v,m) (sin(v))
-#define cos(v,m) (cos(v))
-
-#ifdef DOUBLE_PREC_AVAILABLE
-typedef long  modelica_integer;
-typedef double modelica_real;
-#else
-typedef float modelica_real;
-typedef int  modelica_integer;
-#endif
-
-typedef bool modelica_boolean;
-typedef modelica_integer _index_t;
-
-
-#define state modelica_boolean
-
-modelica_boolean get_memory_state() {return true;}
-void restore_memory_state(modelica_boolean in_state) {}
-
-
-struct gr_array
-{
-    int ndims;
-    __global modelica_integer* dim_size;
-    __global modelica_real* data;
-};
-
-struct gi_array
-{
-    int ndims;
-    __global modelica_integer* dim_size;
-    __global modelica_integer* data;
-};
-typedef struct gr_array real_array;
-typedef struct gi_array integer_array;
-
-struct lr_array
-{
-    int ndims;
-    local modelica_integer* dim_size;
-    local modelica_real* data;
-};
-
-struct li_array
-{
-    int ndims;
-    local modelica_integer* dim_size;
-    local modelica_integer* data;
-};
-typedef struct lr_array local_real_array;
-typedef struct li_array local_integer_array;
-
-
-// ParModelica versions of OpenCL thread managment functions.
-// They start counting from 0. Parmodelica/Modelica starts from 1.
-modelica_integer  oclGetGlobalId(modelica_integer dim) {
-    return get_global_id(dim - 1) + 1;
-}
-
-modelica_integer  oclGetLocalId(modelica_integer dim) {
-    return get_local_id(dim - 1) + 1;
-}
-
-modelica_integer  oclGetLocalSize(modelica_integer dim) {
-    return get_local_size(dim - 1);
-}
-
-modelica_integer  oclGetGlobalSize(modelica_integer dim) {
-    return get_global_size(dim - 1);
-}
-
-modelica_integer  oclGetGroupId(modelica_integer dim) {
-    return get_group_id(dim - 1) + 1;
-}
-
-modelica_integer  oclGetNumGroups(modelica_integer dim) {
-    return get_num_groups(dim - 1);
-}
-
-#define oclGlobalBarrier() barrier(CLK_GLOBAL_MEM_FENCE)
-#define oclLocalBarrier() barrier(CLK_LOCAL_MEM_FENCE)
-
-
-
-inline int in_range_integer(modelica_integer i,
-         modelica_integer start,
-         modelica_integer stop)
-{
-  if (start <= stop) {
-      if ((i >= start) && (i <= stop)) {
-          return 1;
-      }
-  } else {
-      if ((i >= stop) && (i <= start)) {
-          return 1;
-      }
-  }
-  return 0;
-}
-
-inline int in_range_real(modelica_real i,
-      modelica_real start,
-      modelica_real stop)
-{
-  if (start <= stop) {
-      if ((i >= start) && (i <= stop)) {
-          return 1;
-      }
-  } else {
-      if ((i >= stop) && (i <= start)) {
-          return 1;
-      }
-  }
-  return 0;
-}
-
-
-size_t integer_array_nr_of_elements(integer_array *a)
-{
-    int i;
-    size_t nr_of_elements = 1;
-    for (i = 0; i < a->ndims; ++i) {
-       nr_of_elements *= a->dim_size[i];
-    }
-    return nr_of_elements;
-}
-
-size_t real_array_nr_of_elements(real_array *a)
-{
-    int i;
-    size_t nr_of_elements = 1;
-    for (i = 0; i < a->ndims; ++i) {
-       nr_of_elements *= a->dim_size[i];
-    }
-    return nr_of_elements;
-}
-
-void copy_integer_array_data(integer_array *source, integer_array *dest)
-{
-    size_t i, nr_of_elements;
-
-
-    nr_of_elements = integer_array_nr_of_elements(source);
-
-    for (i = 0; i < nr_of_elements; ++i) {
-        ((__global modelica_integer *) dest->data)[i] = ((__global modelica_integer *) source->data)[i];
-    }
-}
-
-void copy_real_array_data(real_array *source, real_array *dest)
-{
-    size_t i, nr_of_elements;
-
-
-    nr_of_elements = real_array_nr_of_elements(source);
-
-    for (i = 0; i < nr_of_elements; ++i) {
-        ((__global modelica_real *) dest->data)[i] = ((__global modelica_real *) source->data)[i];
-    }
-}
-
-
-
-#define integer_array_element_addr_c99_1(L, d, i) (((L)->data) + i - 1)
-#define integer_array_element_addr_c99_2(L, d, i, j) ((((L)->data)) + (i - 1)*((L)->dim_size[1]) + (j - 1))
-
-#define real_array_element_addr_c99_1(L, d, i) (((L)->data) + i - 1)
-#define real_array_element_addr_c99_2(L, d, i, j) ((((L)->data)) + (i - 1)*((L)->dim_size[1]) + (j - 1))
-
-
-
-// typedef modelica_real cos_rettype;
-// typedef modelica_real cosh_rettype;
-// typedef modelica_real acos_rettype;
-// typedef modelica_real sin_rettype;
-// typedef modelica_real sinh_rettype;
-// typedef modelica_real asin_rettype;
-// typedef modelica_real log_rettype;
-// typedef modelica_real log10_rettype;
-// typedef modelica_real tan_rettype;
-// typedef modelica_real tanh_rettype;
-// typedef modelica_real atan_rettype;
-// typedef modelica_real exp_rettype;
-// typedef modelica_real sqrt_rettype;
-// typedef modelica_real atan2_rettype;
-// typedef modelica_real div_rettype;
-// typedef modelica_real mod_rettype;
-
-
-// ///////////////////////////////////////////////////////////
-// //memory_pool
-
-// #define NR_REAL_ELEMENTS    1024
-// #define NR_INTEGER_ELEMENTS 1024
-// #define NR_BOOLEAN_ELEMENTS 1
-// #define NR_SIZE_ELEMENTS    100
-
-// #define PRECENTAGE_REAL_BUFFER       40
-// #define PRECENTAGE_INTEGER_BUFFER     40
-// #define PRECENTAGE_BOOLEAN_BUFFER    15
-// #define PRECENTAGE_SIZE_BUFFER        5
-
-
-// struct gr_array
-// {
-    // int ndims;
-    // __global modelica_integer* dim_size;
-    // __global modelica_real* data;
-// };
-
-// struct gi_array
-// {
-    // int ndims;
-    // __global modelica_integer* dim_size;
-    // __global modelica_integer* data;
-// };
-// typedef struct gr_array real_array;
-// typedef struct gi_array integer_array;
-
-// struct lr_array
-// {
-    // int ndims;
-    // __local modelica_integer* dim_size;
-    // __local modelica_real* data;
-// };
-
-// struct li_array
-// {
-    // int ndims;
-    // __local modelica_integer* dim_size;
-    // __local modelica_integer* data;
-// };
-// typedef __local struct lr_array local_real_array;
-// typedef __local struct li_array local_integer_array;
-
-
-
-// // HELL starts here. Enjoy!
-
-// struct local_state_s {
-  // _index_t real_count;
-  // _index_t integer_count;
-  // _index_t boolean_count;
-  // _index_t size_count;
-  // __local modelica_real* local_real_buffer_ptr;
-  // __local modelica_integer* local_integer_buffer_ptr;
-  // __local modelica_boolean* local_boolean_buffer_ptr;
-  // __local modelica_integer* local_size_buffer_ptr;
-// };
-// typedef __local struct local_state_s local_state;
-
-// struct global_state_s {
-  // __global modelica_real* global_real_buffer_ptr;
-  // __global modelica_integer* global_integer_buffer_ptr;
-  // __global modelica_boolean* global_boolean_buffer_ptr;
-  // __global modelica_integer* global_size_buffer_ptr;
-// };
-// typedef struct global_state_s global_state;
-
-
-// struct state_s{
-  // global_state saved_global_state;
-  // local_state saved_local_state;
-// };
-// typedef struct state_s state;
-
-// struct buffer_s{
-  // __global modelica_real* global_real_buffer;
-  // __global modelica_integer* global_integer_buffer;
-  // __global modelica_boolean* global_boolean_buffer;
-  // __global modelica_integer* global_size_buffer;
-  // __local modelica_real* local_real_buffer;
-  // __local modelica_integer* local_integer_buffer;
-  // __local modelica_boolean* local_boolean_buffer;
-  // __local modelica_integer* local_size_buffer;
-// };
-// typedef struct buffer_s buffer;
-
-
-// struct memory_s{
-    // global_state* current_global_state;
-    // local_state* current_local_state;
-    // buffer* data_buffer;
-// };
-// typedef struct memory_s memory;
-
-// /*
-// void print_memory_state(memory* m)
-// {
-  // printf("=== Current state ===\n");
-  // printf("real ptr at: %d\n",(int)m->current_global_state->global_real_buffer_ptr);
-  // printf("integer ptr at: %d\n",(int)m->current_global_state->global_integer_buffer_ptr);
-  // printf("boolean ptr at: %d\n",(int)m->current_global_state->global_boolean_buffer_ptr);
-  // printf("size ptr at: %d\n",(int)m->current_global_state->global_size_buffer_ptr);
-  // printf("real counter at: %d\n",(int)m->current_global_state->real_count);
-  // printf("integer counter at: %d\n",(int)m->current_global_state->integer_count);
-  // printf("boolean counter at: %d\n",(int)m->current_global_state->boolean_count);
-  // printf("size counter at: %d\n",(int)m->current_global_state->size_count);
-// }
-
-
-// void print_state(state* m)
-// {
-  // printf("=== Current state ===\n");
-  // printf("real ptr at: %d\n",(int)m->global_real_buffer_ptr);
-  // printf("integer ptr at: %d\n",(int)m->global_integer_buffer_ptr);
-  // printf("boolean ptr at: %d\n",(int)m->global_boolean_buffer_ptr);
-  // printf("size ptr at: %d\n",(int)m->global_size_buffer_ptr);
-  // printf("real counter at: %d\n",(int)m->real_count);
-  // printf("integer counter at: %d\n",(int)m->integer_count);
-  // printf("boolean counter at: %d\n",(int)m->boolean_count);
-  // printf("size counter at: %d\n",(int)m->size_count);
-// }
-
-
-// */
-// void initialize_global_buffer(__global void* exec_buffer, modelica_integer buffer_size, memory* current_memory){
-    // size_t num_threads = 1;
-    // size_t ndims = get_work_dim();
-    // for(int i = 0; i < ndims; i++)
-        // num_threads *= get_global_size(i);
-
-    // size_t universalId;
-    // if(ndims == 1)
-        // universalId = get_global_id(0);
-    // else if(ndims == 2)
-        // universalId = get_global_id(1)*get_global_size(0) + get_global_id(0);
-    // else if(ndims == 3)
-        // universalId = get_global_id(2)*get_global_size(1)*get_global_size(0) + get_global_id(1)*get_global_size(0) + get_global_id(0);
-
-
-// typedef __global void* global_void_ptr;
-
-    // global_void_ptr  thread_buff_start;
-    // size_t buffer_per_thread;
-    // size_t real_buffer_per_thread;
-    // size_t integer_buffer_per_thread;
-    // size_t boolean_buffer_per_thread;
-    // size_t size_buffer_per_thread;
-
-    // buffer_per_thread = (buffer_size/num_threads);
-    // thread_buff_start = exec_buffer + universalId*buffer_per_thread;
-
-    // global_void_ptr real_start = thread_buff_start;
-    // current_memory->data_buffer->global_real_buffer = (__global modelica_real*)real_start;
-    // real_buffer_per_thread = (buffer_per_thread*PRECENTAGE_REAL_BUFFER)/100;
-
-    // global_void_ptr integer_start = real_start + real_buffer_per_thread;
-    // current_memory->data_buffer->global_integer_buffer = (__global modelica_integer*)integer_start;
-    // integer_buffer_per_thread = (buffer_per_thread*PRECENTAGE_INTEGER_BUFFER)/100;
-
-    // global_void_ptr size_start = integer_start + integer_buffer_per_thread;
-    // current_memory->data_buffer->global_size_buffer = (__global modelica_integer*)size_start;
-    // size_buffer_per_thread = (buffer_per_thread*PRECENTAGE_SIZE_BUFFER)/100;
-
-    // global_void_ptr boolean_start = size_start + size_buffer_per_thread;
-    // current_memory->data_buffer->global_boolean_buffer = (__global modelica_boolean*)boolean_start;
-    // boolean_buffer_per_thread = (buffer_per_thread*PRECENTAGE_BOOLEAN_BUFFER)/100;
-
-
-    // current_memory->current_global_state->global_real_buffer_ptr = current_memory->data_buffer->global_real_buffer;
-    // current_memory->current_global_state->global_integer_buffer_ptr = current_memory->data_buffer->global_integer_buffer;
-    // current_memory->current_global_state->global_size_buffer_ptr = current_memory->data_buffer->global_size_buffer;
-    // current_memory->current_global_state->global_boolean_buffer_ptr = current_memory->data_buffer->global_boolean_buffer;
-
-    // /*
-    // if(get_global_id(0) == 0){
-        // printf("execution buffer starts from %d\n", exec_buffer);
-        // printf("execution buffer per thread %d KB\n", buffer_per_thread/1024);
-        // printf("thread %d starts from %d\n", get_global_id(0), thread_buff_start);
-        // //printf("REAL buffer SIZE  %d KB\n", (integer_start - real_start)/1024);
-        // printf("max nr of real elements  %d\n", (integer_start - real_start)/sizeof(modelica_real));
-        // //printf("INTEGER buffer SIZE  %d KB\n", (boolean_start - integer_start)/1024);
-        // printf("max nr of integer elements  %d\n", (boolean_start - integer_start)/sizeof(modelica_integer));
-        // //printf("BOOLEAN buffer SIZE  %d B\n", (size_start - boolean_start));
-        // printf("max nr of boolean elements  %d\n", sizeof(modelica_boolean));
-        // //printf("SIZE buffer SIZE  %d KB\n", (thread_buff_start + buffer_per_thread - size_start)/1024);
-        // printf("max nr of size elements  %d\n", (thread_buff_start + buffer_per_thread - size_start)/sizeof(modelica_integer));
-        // //printf("execution buffer for this thread ends at %d\n", current_memory->data_buffer->global_size_buffer + size_buffer_per_thread);
-        // //printf("thread %d starts from %d\n", get_global_id(0) + 1, thread_buff_start + buffer_per_thread);
-        // print_current_global_state(current_memory);
-    // }
-    // */
-
-// ///////////////////////////////Global Memory initialized!////////////////////////////////////////////////////////////////////////
-
-// }
-
-// // HELL ends here. You made it! yay!
-
-
-
-// /*
-// state get_memory_state(){
-  // return current_state;
-// }
-// */
-
-// #define get_memory_state() (state){*(memory_state->current_global_state), *(memory_state->current_local_state)}; barrier(CLK_LOCAL_MEM_FENCE);
-
-// /*
-// void restore_memory_state(state s){
-    // current_state = s;
-// }
-// */
-
-// #define restore_memory_state(s) *(memory_state->current_global_state) = s.saved_global_state; *(memory_state->current_local_state) = s.saved_local_state; barrier(CLK_LOCAL_MEM_FENCE);
-
-// //memory_pool ends here.
-// ///////////////////////////////////////////////////////////
-
-
-// ///////////////////////////////////////////////////////////
-// //utility + builtin functions
-
-// int in_range_integer(modelica_integer i,
-         // modelica_integer start,
-         // modelica_integer stop)
-// {
-  // if (start <= stop) if ((i >= start) && (i <= stop)) return 1;
-  // if (start > stop) if ((i >= stop) && (i <= start)) return 1;
-  // return 0;
-// }
-
-// int in_range_real(modelica_real i,
-      // modelica_real start,
-      // modelica_real stop)
-// {
-  // if (start <= stop) if ((i >= start) && (i <= stop)) return 1;
-  // if (start > stop) if ((i >= stop) && (i <= start)) return 1;
-  // return 0;
-// }
-
-// modelica_real modelica_div(modelica_real x, modelica_real y)
-// {
-  // return (modelica_real)((modelica_integer)(x/y));
-// }
-
-// modelica_real modelica_mod_real(modelica_real x, modelica_real y)
-// {
-  // return (x - floor(x/y) * y);
-// }
-
-// modelica_integer modelica_mod_integer(modelica_integer x, modelica_integer y)
-// {
-  // return x % y;
-// }
-
-// modelica_real modelica_rem_real(modelica_real x, modelica_real y)
-// {
-  // return x - y*(modelica_div(x,y));
-// }
-
-// modelica_integer modelica_rem_integer(modelica_integer x, modelica_integer y)
-// {
-  // return x - y*((x/y));
-// }
-
-
-// //utility + builtin functions ends here
-// ///////////////////////////////////////////////////////////
-
-
-
-
-
-
-
-// ///////////////////////////////////////////////////////////
-// //Array related utilities
-
-
-// void alloc_integer_array_c99_1(integer_array* dest, int ndims, modelica_integer size_1, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // _index_t start;
-    // dest->ndims = 1;
-
-    // //assert(n>=0);
-    // //assert(n + current_global_state.global_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_global_state->global_size_buffer_ptr + 2 >= memory_state->current_global_state->global_boolean_buffer_ptr){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-
-    // dest->dim_size = memory_state->current_global_state->global_size_buffer_ptr;
-    // memory_state->current_global_state->global_size_buffer_ptr += 1;
-    // dest->dim_size[0] = size_1;
-
-    // elements = integer_array_nr_of_elements(dest);
-    // //assert(n>=0);
-    // //assert(current_global_state.global_integer_buffer_ptr +n < NR_INTEGER_ELEMENTS);
-    // if( memory_state->current_global_state->global_integer_buffer_ptr + elements >= memory_state->current_global_state->global_size_buffer_ptr){
-        // //printf("Integer buffer pointer passed limit\n");
-    // }
-
-    // dest->data = memory_state->current_global_state->global_integer_buffer_ptr;
-    // memory_state->current_global_state->global_integer_buffer_ptr += elements;
-// }
-
-// void alloc_real_array_c99_1(real_array* dest, int ndims, modelica_integer size_1, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // _index_t start;
-    // dest->ndims = 1;
-
-    // //assert(n>=0);
-    // //assert(n + current_global_state.global_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_global_state->global_size_buffer_ptr + 2 >= memory_state->current_global_state->global_boolean_buffer_ptr){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-    // dest->dim_size = memory_state->current_global_state->global_size_buffer_ptr;
-    // memory_state->current_global_state->global_size_buffer_ptr += 1;
-    // dest->dim_size[0] = size_1;
-
-    // elements = real_array_nr_of_elements(dest);
-    // //assert(n>=0);
-    // //assert(current_global_state.global_integer_buffer_ptr +n < NR_INTEGER_ELEMENTS);
-    // if( memory_state->current_global_state->global_real_buffer_ptr + elements >= memory_state->current_global_state->global_integer_buffer_ptr){
-        // //printf("Real buffer pointer passed limit\n");
-    // }
-
-    // dest->data = memory_state->current_global_state->global_real_buffer_ptr;
-    // memory_state->current_global_state->global_real_buffer_ptr += elements;
-
-// }
-
-
-// void alloc_integer_array_c99_2(integer_array* dest, int ndims, modelica_integer size_1, modelica_integer size_2, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // _index_t start;
-    // dest->ndims = 2;
-
-    // //assert(n>=0);
-    // //assert(n + current_global_state->global_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_global_state->global_size_buffer_ptr + 2 >= memory_state->current_global_state->global_boolean_buffer_ptr){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-    // dest->dim_size = memory_state->current_global_state->global_size_buffer_ptr;
-    // memory_state->current_global_state->global_size_buffer_ptr += 2;
-    // dest->dim_size[0] = size_1;
-    // dest->dim_size[1] = size_2;
-
-    // elements = integer_array_nr_of_elements(dest);
-    // //assert(n>=0);
-    // //assert(current_global_state->global_integer_buffer_ptr +n < NR_INTEGER_ELEMENTS);
-
-    // if( memory_state->current_global_state->global_integer_buffer_ptr + elements >= memory_state->current_global_state->global_size_buffer_ptr){
-        // //printf("Integer buffer pointer passed limit\n");
-    // }
-    // dest->data = memory_state->current_global_state->global_integer_buffer_ptr;
-    // memory_state->current_global_state->global_integer_buffer_ptr += elements;
-// }
-
-// void alloc_real_array_c99_2(real_array* dest, int ndims, modelica_integer size_1, modelica_integer size_2, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // _index_t start;
-    // dest->ndims = 2;
-
-    // //assert(n>=0);
-    // //assert(n + current_global_state->global_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_global_state->global_size_buffer_ptr + 2 >= memory_state->current_global_state->global_boolean_buffer_ptr){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-    // dest->dim_size = memory_state->current_global_state->global_size_buffer_ptr;
-    // memory_state->current_global_state->global_size_buffer_ptr += 2;
-    // dest->dim_size[0] = size_1;
-    // dest->dim_size[1] = size_2;
-
-    // elements = real_array_nr_of_elements(dest);
-    // //assert(n>=0);
-    // //assert(current_global_state->global_integer_buffer_ptr +n < NR_INTEGER_ELEMENTS);
-
-    // if( memory_state->current_global_state->global_real_buffer_ptr + elements >= memory_state->current_global_state->global_integer_buffer_ptr){
-        // //printf("Real buffer pointer passed limit\n");
-    // }
-    // dest->data = memory_state->current_global_state->global_real_buffer_ptr;
-    // memory_state->current_global_state->global_real_buffer_ptr += elements;
-// }
-
-// void copy_integer_array_data(integer_array *source, integer_array *dest)
-// {
-    // size_t i, nr_of_elements;
-
-
-    // nr_of_elements = real_array_nr_of_elements(source);
-
-    // for (i = 0; i < nr_of_elements; ++i) {
-        // ((__global modelica_integer *) dest->data)[i] = ((__global modelica_integer *) source->data)[i];
-    // }
-// }
-
-// void copy_real_array_data(real_array *source, real_array *dest)
-// {
-    // size_t i, nr_of_elements;
-
-
-    // nr_of_elements = real_array_nr_of_elements(source);
-
-    // for (i = 0; i < nr_of_elements; ++i) {
-        // ((__global modelica_real *) dest->data)[i] = ((__global modelica_real *) source->data)[i];
-    // }
-// }
-
-// #define real_array_element_addr_c99_1(L, d, i) (((L)->data) + i - 1)
-// /*
-// __global modelica_real* real_array_element_addr_c99_1(real_array* L, int dim, modelica_integer i){
-    // return ((__global modelica_real*)(L->data)) + i - 1;
-// }
-
-// __local modelica_real* local_integer_array_element_addr_c99_1(local_real_array* L, int dim, modelica_integer i){
-    // return ((__local modelica_real*)(L->data)) + i - 1;
-// }
-// */
-
-// #define integer_array_element_addr_c99_1(L, d, i) (((L)->data) + i - 1)
-// /*
-// __global modelica_integer* integer_array_element_addr_c99_1(integer_array* L, int dim, modelica_integer i){
-    // return ((__global modelica_integer*)(L->data)) + i - 1;
-// }
-
-// __local modelica_integer* local_integer_array_element_addr_c99_1(local_integer_array* L, int dim, modelica_integer i){
-    // return ((__local modelica_integer*)(L->data)) + i - 1;
-// }
-// */
-
-// #define real_array_element_addr_c99_2(L, d, i, j) ((((L)->data)) + (i - 1)*((L)->dim_size[1]) + (j - 1))
-// /*
-// __global modelica_real* real_array_element_addr_c99_2(real_array* L, int dim, modelica_integer i, modelica_integer j){
-    // return ((__global modelica_real*)(L->data)) + (i - 1)*L->dim_size[1] + (j - 1);
-// }
-
-// __local modelica_real* real_array_element_addr_c99_2(local_real_array* L, int dim, modelica_integer i, modelica_integer j){
-    // return ((__local modelica_real*)(L->data)) + (i - 1)*L->dim_size[1] + (j - 1);
-// }
-// */
-
-// #define integer_array_element_addr_c99_2(L, d, i, j) ((((L)->data)) + (i - 1)*((L)->dim_size[1]) + (j - 1))
-// /*
-// __global modelica_integer* integer_array_element_addr_c99_2(integer_array* L, int dim, modelica_integer i, modelica_integer j){
-    // return ((__global modelica_integer*)(L->data)) + (i - 1)*L->dim_size[1] + (j - 1);
-// }
-
-// __local modelica_integer* integer_array_element_addr_c99_2(local_integer_array* L, int dim, modelica_integer i, modelica_integer j){
-    // return ((__local modelica_integer*)(L->data)) + (i - 1)*L->dim_size[1] + (j - 1);
-// }
-// */
-
-// #define real_array_element_addr_c99_3(L, d, i, j, k) ((((L)->data)) + (i - 1)*((L)->dim_size[1])*((L)->dim_size[2]) + (j - 1)*((L)->dim_size[2]) + (k - 1))
-// /*
-// __global modelica_real* real_array_element_addr_c99_3(real_array* L, int dim, modelica_integer i, modelica_integer j, modelica_integer k){
-    // return ((__global modelica_real*)(L->data)) + (i - 1)*L->dim_size[1]*L->dim_size[2] + (j - 1)*L->dim_size[2] + (k - 1);
-// }
-
-// __local modelica_real* real_array_element_addr_c99_3(local_real_array* L, int dim, modelica_integer i, modelica_integer j, modelica_integer k){
-    // return ((__local modelica_real*)(L->data)) + (i - 1)*L->dim_size[1]*L->dim_size[2] + (j - 1)*L->dim_size[2] + (k - 1);
-// }
-// */
-
-// #define integer_array_element_addr_c99_3(L, d, i, j, k) ((((L)->data)) + (i - 1)*((L)->dim_size[1])*((L)->dim_size[2]) + (j - 1)*((L)->dim_size[2]) + (k - 1))
-// /*
-// __global modelica_integer* integer_array_element_addr_c99_3(integer_array* L, int dim, modelica_integer i, modelica_integer j, modelica_integer k){
-    // return ((__global modelica_integer*)(L->data)) + (i - 1)*L->dim_size[1]*L->dim_size[2] + (j - 1)*L->dim_size[2] + (k - 1);
-// }
-
-// __local modelica_integer* integer_array_element_addr_c99_3(local_integer_array* L, int dim, modelica_integer i, modelica_integer j, modelica_integer k){
-    // return ((__local modelica_integer*)(L->data)) + (i - 1)*L->dim_size[1]*L->dim_size[2] + (j - 1)*L->dim_size[2] + (k - 1);
-// }
-// */
-
-// //uArray related utilities end here
-// ///////////////////////////////////////////////////////////
-
-
-
-
-// size_t local_integer_array_nr_of_elements(local_integer_array *a)
-// {
-    // int i;
-    // size_t nr_of_elements = 1;
-    // for (i = 0; i < a->ndims; ++i) {
-       // nr_of_elements *= a->dim_size[i];
-    // }
-    // return nr_of_elements;
-// }
-
-// size_t local_real_array_nr_of_elements(local_real_array *a)
-// {
-    // int i;
-    // size_t nr_of_elements = 1;
-    // for (i = 0; i < a->ndims; ++i) {
-       // nr_of_elements *= a->dim_size[i];
-    // }
-    // return nr_of_elements;
-// }
-
-
-// void alloc_local_integer_array_c99_1(local_integer_array* dest, int ndims, modelica_integer size_1, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // dest->ndims = 1;
-
-    // //assert(n>=0);
-    // //assert(n + current_state.local_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_local_state->size_count + 2 >= NR_SIZE_ELEMENTS){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-
-
-    // dest->dim_size = memory_state->current_local_state->local_size_buffer_ptr;
-
-    // memory_state->current_local_state->local_size_buffer_ptr += 1;
-    // memory_state->current_local_state->size_count += 1;
-    // dest->dim_size[0] = size_1;
-
-    // elements = local_integer_array_nr_of_elements(dest);
-
-    // //assert(n>=0);
-    // //assert(current_state.global_integer_buffer_ptr +n < NR_INTEGER_ELEMENTS);
-    // if( memory_state->current_local_state->integer_count + elements >= NR_INTEGER_ELEMENTS){
-        // //printf("Integer buffer pointer passed limit\n");
-    // }
-
-    // dest->data = memory_state->current_local_state->local_integer_buffer_ptr;
-    // memory_state->current_local_state->local_integer_buffer_ptr += elements;
-    // memory_state->current_local_state->integer_count += elements;
-// }
-
-// void alloc_local_integer_array_c99_2(local_integer_array* dest, int ndims, modelica_integer size_1, modelica_integer size_2, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // dest->ndims = 2;
-
-    // //assert(n>=0);
-    // //assert(n + current_state.local_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_local_state->size_count + 2 >= NR_SIZE_ELEMENTS){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-
-
-    // dest->dim_size = memory_state->current_local_state->local_size_buffer_ptr;
-
-    // memory_state->current_local_state->local_size_buffer_ptr += 2;
-    // memory_state->current_local_state->size_count += 2;
-    // dest->dim_size[0] = size_1;
-    // dest->dim_size[1] = size_2;
-
-    // elements = local_integer_array_nr_of_elements(dest);
-
-    // //assert(n>=0);
-    // //assert(current_state.global_integer_buffer_ptr +n < NR_INTEGER_ELEMENTS);
-    // if( memory_state->current_local_state->integer_count + elements >= NR_INTEGER_ELEMENTS){
-        // //printf("Integer buffer pointer passed limit\n");
-    // }
-
-    // dest->data = memory_state->current_local_state->local_integer_buffer_ptr;
-    // memory_state->current_local_state->local_integer_buffer_ptr += elements;
-    // memory_state->current_local_state->integer_count += elements;
-// }
-
-
-// void alloc_local_real_array_c99_1(local_real_array* dest, int ndims, modelica_integer size_1, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // dest->ndims = 1;
-
-    // //assert(n>=0);
-    // //assert(n + current_state.local_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_local_state->size_count + 2 >= NR_SIZE_ELEMENTS){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-
-
-    // dest->dim_size = memory_state->current_local_state->local_size_buffer_ptr;
-
-    // memory_state->current_local_state->local_size_buffer_ptr += 1;
-    // memory_state->current_local_state->size_count += 1;
-    // dest->dim_size[0] = size_1;
-
-    // elements = local_real_array_nr_of_elements(dest);
-
-    // //assert(n>=0);
-    // //assert(current_state.global_real_buffer_ptr +n < NR_REAL_ELEMENTS);
-    // if( memory_state->current_local_state->real_count + elements >= NR_REAL_ELEMENTS){
-        // //printf("Integer buffer pointer passed limit\n");
-    // }
-
-    // dest->data = memory_state->current_local_state->local_real_buffer_ptr;
-    // memory_state->current_local_state->local_real_buffer_ptr += elements;
-    // memory_state->current_local_state->integer_count += elements;
-// }
-
-// void alloc_local_real_array_c99_2(local_real_array* dest, int ndims, modelica_integer size_1, modelica_integer size_2, memory* memory_state)
-// {
-    // size_t elements = 0;
-    // dest->ndims = 2;
-
-    // //assert(n>=0);
-    // //assert(n + current_state.local_size_buffer_ptr < NR_SIZE_ELEMENTS);
-    // if( memory_state->current_local_state->size_count + 2 >= NR_SIZE_ELEMENTS){
-        // //printf("Size buffer pointer passed limit\n");
-    // }
-
-
-    // dest->dim_size = memory_state->current_local_state->local_size_buffer_ptr;
-
-    // memory_state->current_local_state->local_size_buffer_ptr += 2;
-    // memory_state->current_local_state->size_count += 2;
-    // dest->dim_size[0] = size_1;
-    // dest->dim_size[1] = size_2;
-
-    // elements = local_real_array_nr_of_elements(dest);
-
-    // //assert(n>=0);
-    // //assert(current_state.global_real_buffer_ptr +n < NR_REAL_ELEMENTS);
-    // if( memory_state->current_local_state->real_count + elements >= NR_REAL_ELEMENTS){
-        // //printf("Integer buffer pointer passed limit\n");
-    // }
-
-    // dest->data = memory_state->current_local_state->local_real_buffer_ptr;
-    // memory_state->current_local_state->local_real_buffer_ptr += elements;
-    // memory_state->current_local_state->integer_count += elements;
-// }

+ 0 - 116
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/omc_ocl_common_header.h

@@ -1,116 +0,0 @@
-/*
- * This file is part of OpenModelica.
- *
- * Copyright (c) 1998-CurrentYear, Linköping University,
- * Department of Computer and Information Science,
- * SE-58183 Linköping, Sweden.
- *
- * All rights reserved.
- *
- * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3
- * AND THIS OSMC PUBLIC LICENSE (OSMC-PL).
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
- * ACCEPTANCE OF THE OSMC PUBLIC LICENSE.
- *
- * The OpenModelica software and the Open Source Modelica
- * Consortium (OSMC) Public License (OSMC-PL) are obtained
- * from Linköping University, either from the above address,
- * from the URLs: http://www.ida.liu.se/projects/OpenModelica or
- * http://www.openmodelica.org, and in the OpenModelica distribution.
- * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of  MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
- * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS
- * OF OSMC-PL.
- *
- * See the full OSMC Public License conditions for more details.
- *
- */
-
-
-/*
-
- Common hader file included by other headers in the openCLRuntime
-
- Mahder.Gebremedhin@liu.se  2012-03-31
-
-*/
-
-
-
-#ifndef _OMC_OCL_COMMON_HEADER
-#define _OMC_OCL_COMMON_HEADER
-
-#include <stdio.h>
-#ifdef __APPLE__
-#include <OpenCL/cl.h>
-#else
-#include <CL/cl.h>
-#endif
-#include <openmodelica.h>
-#include <stdarg.h>
-#include <sys/time.h>
-
-
-
-#define MAX_DEVICE 4
-#define SHOW_DEVICE_SELECTION
-// #define SHOW_ARG_SET_ERRORS
-#define DEFAULT_DEVICE 1
-#define OCL_BUFFER_SIZE_FRACTION 4
-
-
-// DEFINED IN: omc_ocl_util
-void ocl_initialize();
-void ocl_error_check(int operation, cl_int error_code);
-cl_program ocl_build_p_from_src(const char* source, int isfile);
-cl_kernel ocl_create_kernel(cl_program program, const char* kernel_name);
-
-
-//executes a kernel
-void ocl_execute_kernel(cl_kernel kernel);
-
-
-typedef cl_mem device_integer;
-typedef cl_mem device_real;
-
-
-struct dev_buff{
- cl_mem buffer;
- modelica_integer size;
-};
-
-typedef struct dev_buff device_buffer;
-
-
-typedef struct dev_arr{
- cl_mem data;
- cl_mem info_dev;
- modelica_integer* info;
-} device_array;
-
-typedef device_array device_integer_array;
-typedef device_array device_real_array;
-
-// typedef struct dev_local_arr{
- // cl_mem data;
- // cl_mem info_dev;
- // modelica_integer* info;
-// } device_local_array;
-
-typedef device_array device_local_real_array;
-typedef device_array device_local_integer_array;
-
-
-enum ocl_error {OCL_BUILD_PROGRAM, OCL_CREATE_KERNEL, OCL_CREATE_BUFFER, OCL_CREATE_CONTEXT,
-                OCL_CREATE_COMMAND_QUEUE, OCL_SET_KER_ARGS, OCL_ENQUE_ND_RANGE_KERNEL, OCL_COPY_DEV_TO_DEV,
-                OCL_COPY_HOST_TO_DEV, OCL_COPY_DEV_TO_HOST, OCL_REALEASE_MEM_OBJECT};
-
-
-
-// Defined in: omc_ocl_interface.cpp
-size_t device_array_nr_of_elements(device_array *a);
-
-#endif

+ 0 - 195
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/omc_ocl_interface.h

@@ -1,195 +0,0 @@
-/*
- * This file is part of OpenModelica.
- *
- * Copyright (c) 1998-CurrentYear, Linköping University,
- * Department of Computer and Information Science,
- * SE-58183 Linköping, Sweden.
- *
- * All rights reserved.
- *
- * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3
- * AND THIS OSMC PUBLIC LICENSE (OSMC-PL).
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
- * ACCEPTANCE OF THE OSMC PUBLIC LICENSE.
- *
- * The OpenModelica software and the Open Source Modelica
- * Consortium (OSMC) Public License (OSMC-PL) are obtained
- * from Linköping University, either from the above address,
- * from the URLs: http://www.ida.liu.se/projects/OpenModelica or
- * http://www.openmodelica.org, and in the OpenModelica distribution.
- * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of  MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
- * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS
- * OF OSMC-PL.
- *
- * See the full OSMC Public License conditions for more details.
- *
- */
-
-
-/*
-
- This file contains interfacing functions. Theses are the
- actuall functions that are available for calling by the
- code generated from Modelica source.
- If a function is not called from the generated code please
- don not add it here.
- If the feature involves complex operations then define it
- somewhere else and and just create interface for it here
- (If it needs to be exported.)
-
-
- Mahder.Gebremedhin@liu.se  2012-03-31
-
-*/
-
-
-
-#ifndef _OMC_OCL_INTERFACE_H
-#define _OMC_OCL_INTERFACE_H
-
-
-#include "omc_ocl_common_header.h"
-#include "omc_ocl_memory_ops.h"
-
-
-
-// Just to stick to  OpenModelica's function naming pattern
-#define oclSetNumThreadsOnlyGlobal(...) ocl_set_num_threads( __VA_ARGS__ )
-#define oclSetNumThreadsGlobalLocal(...) ocl_set_num_threads( __VA_ARGS__ )
-#define oclSetNumThreadsGlobalLocal1D(...) ocl_set_num_threads( __VA_ARGS__ )
-#define oclSetNumThreadsGlobalLocal2D(...) ocl_set_num_threads( __VA_ARGS__ )
-#define oclSetNumThreadsGlobalLocal3D(...) ocl_set_num_threads( __VA_ARGS__ )
-
-
-// sets the number of threads for subsequent parallel operations
-// arguments are arrays of work_dim size specifiying each workgroup dimension
-void ocl_set_num_threads(integer_array_t global_threads_in, integer_array_t local_threads_in);
-
-
-// sets the number of threads for subsequent parallel operations.
-// similar to the above function with arrays of size 1 only.
-void ocl_set_num_threads(modelica_integer global_threads_in, modelica_integer local_threads_in);
-
-//sets the number of threads for subsequent parallel operations.
-//This time only the total number of threads desired is given. OpenCL will
-//automatically distribute workitems/threads into work groups.
-//it ca also be used(by passing 0) to reset the number of total threads to the max value of one group (default).
-void ocl_set_num_threads(modelica_integer global_threads_in);
-
-//sets a single Kernel cl_mem (device pointer) argument.
-void ocl_set_kernel_arg(cl_kernel kernel, int arg_nr, cl_mem in_arg);
-//sets a single Kernel Real argument.
-void ocl_set_kernel_arg(cl_kernel kernel, int arg_nr, modelica_real in_arg);
-//sets a single Kernel Integer argument.
-void ocl_set_kernel_arg(cl_kernel kernel, int arg_nr, modelica_integer in_arg);
-
-// sets a __local Kernel argument. The size should be given.
-void ocl_set_local_kernel_arg(cl_kernel kernel, int arg_nr, size_t in_size);
-
-
-
-//overloaded functions from real/integer/boolean _array in the C_runtime library
-//for allocating and copying arrays to openCL device
-
-void alloc_integer_array(device_integer_array *dest, int ndims, ...);
-
-void alloc_real_array(device_integer_array *dest, int ndims, ...);
-
-void alloc_device_local_real_array(device_local_real_array *dest, int ndims, ...);
-
-void copy_real_array_data(device_real_array dev_array_ptr, real_array_t* host_array_ptr);
-
-void copy_real_array_data(real_array_t host_array_ptr, device_real_array* dev_array_ptr);
-
-void copy_real_array_data(device_real_array dev_array_ptr1, device_real_array* dev_array_ptr2);
-
-void copy_integer_array_data(device_integer_array dev_array_ptr, integer_array_t* host_array_ptr);
-
-void copy_integer_array_data(integer_array_t host_array_ptr, device_integer_array* dev_array_ptr);
-
-void copy_integer_array_data(device_integer_array dev_array_ptr1, device_integer_array* dev_array_ptr2);
-
-
-// //functions used for copying scalars. Scalars in the normal(serial C) code genertation
-// //of modelica are copied by assignment (a = b). However to be able to copy them b'n
-// //GPU and host CPU we need to change the assignments to copy functions.
-// void copy_assignment_helper_integer(modelica_integer* i1, modelica_integer* i2);
-
-// void copy_assignment_helper_integer(device_integer* i1, modelica_integer* i2);
-
-// void copy_assignment_helper_integer(modelica_integer* i1, device_integer* i2);
-
-// void copy_assignment_helper_integer(device_integer* i1, device_integer* i2);
-
-// void copy_assignment_helper_real(modelica_real* i1, modelica_real* i2);
-
-// void copy_assignment_helper_real(device_real* i1, modelica_real* i2);
-
-// void copy_assignment_helper_real(modelica_real* i1, device_real* i2);
-
-// void copy_assignment_helper_real(device_real* i1, device_real* i2);
-
-//these functions are added to solve a problem with a memory leak when returning arrays
-//from functions. Arrays used to be assigned just like normal scalar variables. Which causes the
-//allocated memory on the lhs to be lost when the pointer is replaced with the new one.
-//this fixes the problem for parallel arrays. for serial arrays the memory is restored when the
-//function returns(not dynamic allocation), So the only lose in serial case is visible just until
-//the function returns.
-void swap_and_release(device_array* lhs, device_array* rhs);
-
-void swap_and_release(base_array_t* lhs, base_array_t* rhs);
-
-//functions fallowing here are just the same function(the one in real/integer_array.c/h) declared with different names
-//this is done to be able to use the same generated code in normal c runtime and as well as in OpenCL kernels
-//which right now doesn't support overloading or the stdarg standard library.
-//even though the functions have the same body here they will have different body on the OpenCL counterparts
-
-modelica_real* real_array_element_addr_c99_1(real_array_t* source,int ndims,...);
-
-modelica_real* real_array_element_addr_c99_2(real_array_t* source,int ndims,...);
-
-modelica_real* real_array_element_addr_c99_3(real_array_t* source,int ndims,...);
-
-modelica_integer* integer_array_element_addr_c99_1(integer_array_t* source,int ndims,...);
-
-modelica_integer* integer_array_element_addr_c99_2(integer_array_t* source,int ndims,...);
-
-modelica_integer* integer_array_element_addr_c99_3(integer_array_t* source,int ndims,...);
-
-
-//array dimension size functions. returns the size of a given dimension for device real array
-modelica_integer size_of_dimension_real_array(device_real_array dev_arr, modelica_integer dim);
-
-//array dimension size functions. returns the size of a given dimension for device integer array
-modelica_integer size_of_dimension_integer_array(device_integer_array dev_arr, modelica_integer dim);
-
-//Free a device array memory.
-void free_device_array(device_array *dest);
-
-// This is just overloaded to allow the device arrays
-// be freed properly.
-void free_device_array(base_array_t* dest);
-
-//prints information about a device array. useful for debugging.
-void print_array_info(device_real_array* arr);
-
-//prints array. useful for debugging.
-void print_array(real_array_t* arr);
-
-//ATTENTION: printing a device array means copying back and then printing. Exprensive Operation.
-//void print_array(device_real_array* dev_arr);
-
-
-
-
-#endif
-
-
-
-
-
-

+ 0 - 106
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/ParModelica/explicit/openclrt/omc_ocl_memory_ops.h

@@ -1,106 +0,0 @@
-/*
- * This file is part of OpenModelica.
- *
- * Copyright (c) 1998-CurrentYear, Linköping University,
- * Department of Computer and Information Science,
- * SE-58183 Linköping, Sweden.
- *
- * All rights reserved.
- *
- * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3
- * AND THIS OSMC PUBLIC LICENSE (OSMC-PL).
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
- * ACCEPTANCE OF THE OSMC PUBLIC LICENSE.
- *
- * The OpenModelica software and the Open Source Modelica
- * Consortium (OSMC) Public License (OSMC-PL) are obtained
- * from Linköping University, either from the above address,
- * from the URLs: http://www.ida.liu.se/projects/OpenModelica or
- * http://www.openmodelica.org, and in the OpenModelica distribution.
- * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of  MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
- * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS
- * OF OSMC-PL.
- *
- * See the full OSMC Public License conditions for more details.
- *
- */
-
-
-/*
-
- This file contains functions for memory related operations.
- Allocating, initializing, copying of memory on/from GPU/CPU
- to GPU/CPU is handled by this functions.
-
- Mahder.Gebremedhin@liu.se  2012-03-31
-
-*/
-
-
-#ifndef _OMC_OCL_MEMORY_OPS_H
-#define _OMC_OCL_MEMORY_OPS_H
-
-
-#include "omc_ocl_common_header.h"
-
-
-extern cl_command_queue device_comm_queue;
-extern cl_context  device_context;
-extern cl_device_id ocl_device;
-
-
-cl_mem ocl_device_alloc_init(modelica_integer* host_array, size_t size);
-
-cl_mem ocl_device_alloc_init(modelica_real* host_array, size_t size);
-
-cl_mem ocl_device_alloc(size_t size);
-
-
-//allocates memory space on device and returns the handle to the buffer object
-//also initializes if from host memory IF src_data is not NULL.
-//size is the actuall size in bytes.
-cl_mem ocl_alloc_init(void* src_data, size_t size);
-
-//ATTENTION: This function allocates a large amount of memory
-//to be used for creatinfg arrays inside parallel functions.
-//If this fails try reducing the amount by increasing the #define OCL_BUFFER_SIZE_FRACTION
-//which defines the freaction of memory from the availabel GLOBAL_MEM_SIZE to be used as buffer.
-void ocl_create_execution_memory_buffer(device_buffer* d_buff);
-
-//allocates a double array on device and returns the handle to the buffer object
-//also initializes if from host array IF host array is not NULL.
-//Use size 1 to allocate a Scalar.
-cl_mem ocl_alloc_init_real_arr(modelica_real* host_array, int a_size);
-
-//allocates an int array on device and returns the handle to the buffer object
-//also initializes if from host array IF host array is not NULL.
-//Use size 1 to allocate a Scalar.
-cl_mem ocl_alloc_init_integer_arr(modelica_integer* host_array, int a_size);
-
-
-
-//copies a double array to ALREADY allocated device buffer
-//Size is the number of elements in the src array
-void ocl_copy_to_device_real(cl_mem dev_dest_array, modelica_real* src_host_array, int a_size);
-
-//copies one buffer to another on the device
-//Size is the number of elements in the src array
-void ocl_copy_device_to_device_real(cl_mem dev_src_array, cl_mem device_dest_array, int a_size);
-
-//copies a double array back to host
-void ocl_copy_back_to_host_real(cl_mem dev_output_array, modelica_real* dest_host_array, int a_size);
-
-//copies an integer array to ALREADY allocated device buffer
-void ocl_copy_to_device_integer(cl_mem dev_dest_array, modelica_integer* src_host_array, int a_size);
-
-//Size is the number of elements in the src array
-void ocl_copy_device_to_device_integer(cl_mem dev_src_array, cl_mem device_dest_array, int a_size);
-
-//copies an int array back to host
-void ocl_copy_back_to_host_integer(cl_mem dev_output_array, modelica_integer* dest_host_array, int a_size);
-
-#endif

+ 0 - 158
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/blaswrap.h

@@ -1,158 +0,0 @@
-/* CLAPACK 3.0 BLAS wrapper macros
- * Feb 5, 2000
- */
-
-#ifndef __BLASWRAP_H
-#define __BLASWRAP_H
-
-#ifndef NO_BLAS_WRAP
-
-/* BLAS1 routines */
-#define srotg_ f2c_srotg
-#define drotg_ f2c_drotg
-#define srotmg_ f2c_srotmg
-#define drotmg_ f2c_drotmg
-#define srot_ f2c_srot
-#define drot_ f2c_drot
-#define srotm_ f2c_srotm
-#define drotm_ f2c_drotm
-#define sswap_ f2c_sswap
-#define dswap_ f2c_dswap
-#define cswap_ f2c_cswap
-#define zswap_ f2c_zswap
-#define sscal_ f2c_sscal
-#define dscal_ f2c_dscal
-#define cscal_ f2c_cscal
-#define zscal_ f2c_zscal
-#define csscal_ f2c_csscal
-#define zdscal_ f2c_zdscal
-#define scopy_ f2c_scopy
-#define dcopy_ f2c_dcopy
-#define ccopy_ f2c_ccopy
-#define zcopy_ f2c_zcopy
-#define saxpy_ f2c_saxpy
-#define daxpy_ f2c_daxpy
-#define caxpy_ f2c_caxpy
-#define zaxpy_ f2c_zaxpy
-#define sdot_ f2c_sdot
-#define ddot_ f2c_ddot
-#define cdotu_ f2c_cdotu
-#define zdotu_ f2c_zdotu
-#define cdotc_ f2c_cdotc
-#define zdotc_ f2c_zdotc
-#define snrm2_ f2c_snrm2
-#define dnrm2_ f2c_dnrm2
-#define scnrm2_ f2c_scnrm2
-#define dznrm2_ f2c_dznrm2
-#define sasum_ f2c_sasum
-#define dasum_ f2c_dasum
-#define scasum_ f2c_scasum
-#define dzasum_ f2c_dzasum
-#define isamax_ f2c_isamax
-#define idamax_ f2c_idamax
-#define icamax_ f2c_icamax
-#define izamax_ f2c_izamax
-
-/* BLAS2 routines */
-#define sgemv_ f2c_sgemv
-#define dgemv_ f2c_dgemv
-#define cgemv_ f2c_cgemv
-#define zgemv_ f2c_zgemv
-#define sgbmv_ f2c_sgbmv
-#define dgbmv_ f2c_dgbmv
-#define cgbmv_ f2c_cgbmv
-#define zgbmv_ f2c_zgbmv
-#define chemv_ f2c_chemv
-#define zhemv_ f2c_zhemv
-#define chbmv_ f2c_chbmv
-#define zhbmv_ f2c_zhbmv
-#define chpmv_ f2c_chpmv
-#define zhpmv_ f2c_zhpmv
-#define ssymv_ f2c_ssymv
-#define dsymv_ f2c_dsymv
-#define ssbmv_ f2c_ssbmv
-#define dsbmv_ f2c_dsbmv
-#define sspmv_ f2c_sspmv
-#define dspmv_ f2c_dspmv
-#define strmv_ f2c_strmv
-#define dtrmv_ f2c_dtrmv
-#define ctrmv_ f2c_ctrmv
-#define ztrmv_ f2c_ztrmv
-#define stbmv_ f2c_stbmv
-#define dtbmv_ f2c_dtbmv
-#define ctbmv_ f2c_ctbmv
-#define ztbmv_ f2c_ztbmv
-#define stpmv_ f2c_stpmv
-#define dtpmv_ f2c_dtpmv
-#define ctpmv_ f2c_ctpmv
-#define ztpmv_ f2c_ztpmv
-#define strsv_ f2c_strsv
-#define dtrsv_ f2c_dtrsv
-#define ctrsv_ f2c_ctrsv
-#define ztrsv_ f2c_ztrsv
-#define stbsv_ f2c_stbsv
-#define dtbsv_ f2c_dtbsv
-#define ctbsv_ f2c_ctbsv
-#define ztbsv_ f2c_ztbsv
-#define stpsv_ f2c_stpsv
-#define dtpsv_ f2c_dtpsv
-#define ctpsv_ f2c_ctpsv
-#define ztpsv_ f2c_ztpsv
-#define sger_ f2c_sger
-#define dger_ f2c_dger
-#define cgeru_ f2c_cgeru
-#define zgeru_ f2c_zgeru
-#define cgerc_ f2c_cgerc
-#define zgerc_ f2c_zgerc
-#define cher_ f2c_cher
-#define zher_ f2c_zher
-#define chpr_ f2c_chpr
-#define zhpr_ f2c_zhpr
-#define cher2_ f2c_cher2
-#define zher2_ f2c_zher2
-#define chpr2_ f2c_chpr2
-#define zhpr2_ f2c_zhpr2
-#define ssyr_ f2c_ssyr
-#define dsyr_ f2c_dsyr
-#define sspr_ f2c_sspr
-#define dspr_ f2c_dspr
-#define ssyr2_ f2c_ssyr2
-#define dsyr2_ f2c_dsyr2
-#define sspr2_ f2c_sspr2
-#define dspr2_ f2c_dspr2
-
-/* BLAS3 routines */
-#define sgemm_ f2c_sgemm
-#define dgemm_ f2c_dgemm
-#define cgemm_ f2c_cgemm
-#define zgemm_ f2c_zgemm
-#define ssymm_ f2c_ssymm
-#define dsymm_ f2c_dsymm
-#define csymm_ f2c_csymm
-#define zsymm_ f2c_zsymm
-#define chemm_ f2c_chemm
-#define zhemm_ f2c_zhemm
-#define ssyrk_ f2c_ssyrk
-#define dsyrk_ f2c_dsyrk
-#define csyrk_ f2c_csyrk
-#define zsyrk_ f2c_zsyrk
-#define cherk_ f2c_cherk
-#define zherk_ f2c_zherk
-#define ssyr2k_ f2c_ssyr2k
-#define dsyr2k_ f2c_dsyr2k
-#define csyr2k_ f2c_csyr2k
-#define zsyr2k_ f2c_zsyr2k
-#define cher2k_ f2c_cher2k
-#define zher2k_ f2c_zher2k
-#define strmm_ f2c_strmm
-#define dtrmm_ f2c_dtrmm
-#define ctrmm_ f2c_ctrmm
-#define ztrmm_ f2c_ztrmm
-#define strsm_ f2c_strsm
-#define dtrsm_ f2c_dtrsm
-#define ctrsm_ f2c_ctrsm
-#define ztrsm_ f2c_ztrsm
-
-#endif /* NO_BLAS_WRAP */
-
-#endif /* __BLASWRAP_H */

+ 0 - 160
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/blaswrap.h

@@ -1,160 +0,0 @@
-/* CLAPACK 3.0 BLAS wrapper macros
- * Feb 5, 2000
- */
-
-#ifndef __BLASWRAP_H
-#define __BLASWRAP_H
-
-#ifndef NO_BLAS_WRAP
- 
-/* BLAS1 routines */
-#define srotg_ f2c_srotg
-#define crotg_ f2c_crotg
-#define drotg_ f2c_drotg
-#define zrotg_ f2c_zrotg
-#define srotmg_ f2c_srotmg
-#define drotmg_ f2c_drotmg
-#define srot_ f2c_srot
-#define drot_ f2c_drot
-#define srotm_ f2c_srotm
-#define drotm_ f2c_drotm
-#define sswap_ f2c_sswap
-#define dswap_ f2c_dswap
-#define cswap_ f2c_cswap
-#define zswap_ f2c_zswap
-#define sscal_ f2c_sscal
-#define dscal_ f2c_dscal
-#define cscal_ f2c_cscal
-#define zscal_ f2c_zscal
-#define csscal_ f2c_csscal
-#define zdscal_ f2c_zdscal
-#define scopy_ f2c_scopy
-#define dcopy_ f2c_dcopy
-#define ccopy_ f2c_ccopy
-#define zcopy_ f2c_zcopy
-#define saxpy_ f2c_saxpy
-#define daxpy_ f2c_daxpy
-#define caxpy_ f2c_caxpy
-#define zaxpy_ f2c_zaxpy
-#define sdot_ f2c_sdot
-#define ddot_ f2c_ddot
-#define cdotu_ f2c_cdotu
-#define zdotu_ f2c_zdotu
-#define cdotc_ f2c_cdotc
-#define zdotc_ f2c_zdotc
-#define snrm2_ f2c_snrm2
-#define dnrm2_ f2c_dnrm2
-#define scnrm2_ f2c_scnrm2
-#define dznrm2_ f2c_dznrm2
-#define sasum_ f2c_sasum
-#define dasum_ f2c_dasum
-#define scasum_ f2c_scasum
-#define dzasum_ f2c_dzasum
-#define isamax_ f2c_isamax
-#define idamax_ f2c_idamax
-#define icamax_ f2c_icamax
-#define izamax_ f2c_izamax
- 
-/* BLAS2 routines */
-#define sgemv_ f2c_sgemv
-#define dgemv_ f2c_dgemv
-#define cgemv_ f2c_cgemv
-#define zgemv_ f2c_zgemv
-#define sgbmv_ f2c_sgbmv
-#define dgbmv_ f2c_dgbmv
-#define cgbmv_ f2c_cgbmv
-#define zgbmv_ f2c_zgbmv
-#define chemv_ f2c_chemv
-#define zhemv_ f2c_zhemv
-#define chbmv_ f2c_chbmv
-#define zhbmv_ f2c_zhbmv
-#define chpmv_ f2c_chpmv
-#define zhpmv_ f2c_zhpmv
-#define ssymv_ f2c_ssymv
-#define dsymv_ f2c_dsymv
-#define ssbmv_ f2c_ssbmv
-#define dsbmv_ f2c_dsbmv
-#define sspmv_ f2c_sspmv
-#define dspmv_ f2c_dspmv
-#define strmv_ f2c_strmv
-#define dtrmv_ f2c_dtrmv
-#define ctrmv_ f2c_ctrmv
-#define ztrmv_ f2c_ztrmv
-#define stbmv_ f2c_stbmv
-#define dtbmv_ f2c_dtbmv
-#define ctbmv_ f2c_ctbmv
-#define ztbmv_ f2c_ztbmv
-#define stpmv_ f2c_stpmv
-#define dtpmv_ f2c_dtpmv
-#define ctpmv_ f2c_ctpmv
-#define ztpmv_ f2c_ztpmv
-#define strsv_ f2c_strsv
-#define dtrsv_ f2c_dtrsv
-#define ctrsv_ f2c_ctrsv
-#define ztrsv_ f2c_ztrsv
-#define stbsv_ f2c_stbsv
-#define dtbsv_ f2c_dtbsv
-#define ctbsv_ f2c_ctbsv
-#define ztbsv_ f2c_ztbsv
-#define stpsv_ f2c_stpsv
-#define dtpsv_ f2c_dtpsv
-#define ctpsv_ f2c_ctpsv
-#define ztpsv_ f2c_ztpsv
-#define sger_ f2c_sger
-#define dger_ f2c_dger
-#define cgeru_ f2c_cgeru
-#define zgeru_ f2c_zgeru
-#define cgerc_ f2c_cgerc
-#define zgerc_ f2c_zgerc
-#define cher_ f2c_cher
-#define zher_ f2c_zher
-#define chpr_ f2c_chpr
-#define zhpr_ f2c_zhpr
-#define cher2_ f2c_cher2
-#define zher2_ f2c_zher2
-#define chpr2_ f2c_chpr2
-#define zhpr2_ f2c_zhpr2
-#define ssyr_ f2c_ssyr
-#define dsyr_ f2c_dsyr
-#define sspr_ f2c_sspr
-#define dspr_ f2c_dspr
-#define ssyr2_ f2c_ssyr2
-#define dsyr2_ f2c_dsyr2
-#define sspr2_ f2c_sspr2
-#define dspr2_ f2c_dspr2
- 
-/* BLAS3 routines */
-#define sgemm_ f2c_sgemm
-#define dgemm_ f2c_dgemm
-#define cgemm_ f2c_cgemm
-#define zgemm_ f2c_zgemm
-#define ssymm_ f2c_ssymm
-#define dsymm_ f2c_dsymm
-#define csymm_ f2c_csymm
-#define zsymm_ f2c_zsymm
-#define chemm_ f2c_chemm
-#define zhemm_ f2c_zhemm
-#define ssyrk_ f2c_ssyrk
-#define dsyrk_ f2c_dsyrk
-#define csyrk_ f2c_csyrk
-#define zsyrk_ f2c_zsyrk
-#define cherk_ f2c_cherk
-#define zherk_ f2c_zherk
-#define ssyr2k_ f2c_ssyr2k
-#define dsyr2k_ f2c_dsyr2k
-#define csyr2k_ f2c_csyr2k
-#define zsyr2k_ f2c_zsyr2k
-#define cher2k_ f2c_cher2k
-#define zher2k_ f2c_zher2k
-#define strmm_ f2c_strmm
-#define dtrmm_ f2c_dtrmm
-#define ctrmm_ f2c_ctrmm
-#define ztrmm_ f2c_ztrmm
-#define strsm_ f2c_strsm
-#define dtrsm_ f2c_dtrsm
-#define ctrsm_ f2c_ctrsm
-#define ztrsm_ f2c_ztrsm
-
-#endif /* NO_BLAS_WRAP */
-
-#endif /* __BLASWRAP_H */

File diff suppressed because it is too large
+ 0 - 7262
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/clapack.h


+ 0 - 370
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/cminpack.h

@@ -1,370 +0,0 @@
-/* Header file for cminpack, by Frederic Devernay.
-   The documentation for all functions can be found in the file
-   minpack-documentation.txt from the distribution, or in the source
-   code of each function. */
-
-#ifndef __CMINPACK_H__
-#define __CMINPACK_H__
-
-/* The default floating-point type is "double" for C/C++ and "float" for CUDA,
-   but you can change this by defining one of the following symbols when
-   compiling the library, and before including cminpack.h when using it:
-   __cminpack_double__ for double
-   __cminpack_float__ for float
-   __cminpack_half__ for half from the OpenEXR library (in this case, you must
-                     compile cminpack with a C++ compiler)
-*/
-#ifdef __cminpack_double__
-#define __cminpack_real__ double
-#endif
-
-#ifdef __cminpack_float__
-#define __cminpack_real__ float
-#endif
-
-#ifdef __cminpack_half__
-#include <OpenEXR/half.h>
-#define __cminpack_real__ half
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Cmake will define cminpack_EXPORTS on Windows when it
-configures to build a shared library. If you are going to use
-another build system on windows or create the visual studio
-projects by hand you need to define cminpack_EXPORTS when
-building a DLL on windows.
-*/
-#if defined (__GNUC__)
-#define CMINPACK_DECLSPEC_EXPORT  __declspec(__dllexport__)
-#define CMINPACK_DECLSPEC_IMPORT  __declspec(__dllimport__)
-#endif
-#if defined (_MSC_VER) || defined (__BORLANDC__)
-#define CMINPACK_DECLSPEC_EXPORT  __declspec(dllexport)
-#define CMINPACK_DECLSPEC_IMPORT  __declspec(dllimport)
-#endif
-#ifdef __WATCOMC__
-#define CMINPACK_DECLSPEC_EXPORT  __export
-#define CMINPACK_DECLSPEC_IMPORT  __import
-#endif
-#ifdef __IBMC__
-#define CMINPACK_DECLSPEC_EXPORT  _Export
-#define CMINPACK_DECLSPEC_IMPORT  _Import
-#endif
-
-#if !defined(CMINPACK_NO_DLL) && (defined(__WIN32__) || defined(WIN32) || defined (_WIN32))
-#if defined(cminpack_EXPORTS) || defined(CMINPACK_EXPORTS) || defined(CMINPACK_DLL_EXPORTS)
-    #define  CMINPACK_EXPORT CMINPACK_DECLSPEC_EXPORT
-  #else
-    #define  CMINPACK_EXPORT CMINPACK_DECLSPEC_IMPORT
-  #endif /* cminpack_EXPORTS */
-#else /* defined (_WIN32) */
- #define CMINPACK_EXPORT
-#endif
-
-#if defined(__CUDA_ARCH__) || defined(__CUDACC__)
-#define __cminpack_attr__ __device__
-#ifndef __cminpack_real__
-#define __cminpack_float__
-#define __cminpack_real__ float
-#endif
-#define __cminpack_type_fcn_nn__        __cminpack_attr__ int fcn_nn
-#define __cminpack_type_fcnder_nn__     __cminpack_attr__ int fcnder_nn
-#define __cminpack_type_fcn_mn__        __cminpack_attr__ int fcn_mn
-#define __cminpack_type_fcnder_mn__     __cminpack_attr__ int fcnder_mn
-#define __cminpack_type_fcnderstr_mn__  __cminpack_attr__ int fcnderstr_mn
-#define __cminpack_decl_fcn_nn__
-#define __cminpack_decl_fcnder_nn__
-#define __cminpack_decl_fcn_mn__
-#define __cminpack_decl_fcnder_mn__
-#define __cminpack_decl_fcnderstr_mn__
-#define __cminpack_param_fcn_nn__
-#define __cminpack_param_fcnder_nn__
-#define __cminpack_param_fcn_mn__
-#define __cminpack_param_fcnder_mn__
-#define __cminpack_param_fcnderstr_mn__
-#else
-#define __cminpack_attr__
-#ifndef __cminpack_real__
-#define __cminpack_double__
-#define __cminpack_real__ double
-#endif
-#define __cminpack_type_fcn_nn__        typedef int (*cminpack_func_nn)
-#define __cminpack_type_fcnder_nn__     typedef int (*cminpack_funcder_nn)
-#define __cminpack_type_fcn_mn__        typedef int (*cminpack_func_mn)
-#define __cminpack_type_fcnder_mn__     typedef int (*cminpack_funcder_mn)
-#define __cminpack_type_fcnderstr_mn__  typedef int (*cminpack_funcderstr_mn)
-#define __cminpack_decl_fcn_nn__        cminpack_func_nn fcn_nn,
-#define __cminpack_decl_fcnder_nn__     cminpack_funcder_nn fcnder_nn,
-#define __cminpack_decl_fcn_mn__        cminpack_func_mn fcn_mn,
-#define __cminpack_decl_fcnder_mn__     cminpack_funcder_mn fcnder_mn,
-#define __cminpack_decl_fcnderstr_mn__  cminpack_funcderstr_mn fcnderstr_mn,
-#define __cminpack_param_fcn_nn__       fcn_nn,
-#define __cminpack_param_fcnder_nn__    fcnder_nn,
-#define __cminpack_param_fcn_mn__       fcn_mn,
-#define __cminpack_param_fcnder_mn__    fcnder_mn,
-#define __cminpack_param_fcnderstr_mn__ fcnderstr_mn,
-#endif
-
-#ifdef __cminpack_double__
-#define __cminpack_func__(func) func
-#endif
-
-#ifdef __cminpack_float__
-#define __cminpack_func__(func) s ## func
-#endif
-
-#ifdef __cminpack_half__
-#define __cminpack_func__(func) h ## func
-#endif
-
-/* Declarations for minpack */
-
-/* Function types: */
-/* The first argument can be used to store extra function parameters, thus */
-/* avoiding the use of global variables. */
-/* the iflag parameter is input-only (with respect to the FORTRAN */
-/*  version), the output iflag value is the return value of the function. */
-/* If iflag=0, the function shoulkd just print the current values (see */
-/* the nprint parameters below). */
-  
-/* for hybrd1 and hybrd: */
-/*         calculate the functions at x and */
-/*         return this vector in fvec. */
-/* return a negative value to terminate hybrd1/hybrd */
-__cminpack_type_fcn_nn__(void *p, int n, const __cminpack_real__ *x, __cminpack_real__ *fvec, int iflag );
-
-/* for hybrj1 and hybrj */
-/*         if iflag = 1 calculate the functions at x and */
-/*         return this vector in fvec. do not alter fjac. */
-/*         if iflag = 2 calculate the jacobian at x and */
-/*         return this matrix in fjac. do not alter fvec. */
-/* return a negative value to terminate hybrj1/hybrj */
-__cminpack_type_fcnder_nn__(void *p, int n, const __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ *fjac,
-                                  int ldfjac, int iflag, void *user_data );
-
-/* for lmdif1 and lmdif */
-/*         calculate the functions at x and */
-/*         return this vector in fvec. */
-/*         if iflag = 1 the result is used to compute the residuals. */
-/*         if iflag = 2 the result is used to compute the Jacobian by finite differences. */
-/*         Jacobian computation requires exactly n function calls with iflag = 2. */
-/* return a negative value to terminate lmdif1/lmdif */
-__cminpack_type_fcn_mn__(void *p, int m, int n, const __cminpack_real__ *x, __cminpack_real__ *fvec,
-                               int iflag );
-
-/* for lmder1 and lmder */
-/*         if iflag = 1 calculate the functions at x and */
-/*         return this vector in fvec. do not alter fjac. */
-/*         if iflag = 2 calculate the jacobian at x and */
-/*         return this matrix in fjac. do not alter fvec. */
-/* return a negative value to terminate lmder1/lmder */
-__cminpack_type_fcnder_mn__(void *p, int m, int n, const __cminpack_real__ *x, __cminpack_real__ *fvec,
-                                  __cminpack_real__ *fjac, int ldfjac, int iflag );
-
-/* for lmstr1 and lmstr */
-/*         if iflag = 1 calculate the functions at x and */
-/*         return this vector in fvec. */
-/*         if iflag = i calculate the (i-1)-st row of the */
-/*         jacobian at x and return this vector in fjrow. */
-/* return a negative value to terminate lmstr1/lmstr */
-__cminpack_type_fcnderstr_mn__(void *p, int m, int n, const __cminpack_real__ *x, __cminpack_real__ *fvec,
-                                     __cminpack_real__ *fjrow, int iflag );
-
-
-
-
-
-
-/* MINPACK functions: */
-/* the info parameter was removed from most functions: the return */
-/* value of the function is used instead. */
-/* The argument 'p' can be used to store extra function parameters, thus */
-/* avoiding the use of global variables. You can also think of it as a */
-/* 'this' pointer a la C++. */
-
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (Jacobian calculated by
-   a forward-difference approximation) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(hybrd1)( __cminpack_decl_fcn_nn__ 
-	       void *p, int n, __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ tol,
-	       __cminpack_real__ *wa, int lwa );
-
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (Jacobian calculated by
-   a forward-difference approximation, more general). */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(hybrd)( __cminpack_decl_fcn_nn__
-	      void *p, int n, __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ xtol, int maxfev,
-	      int ml, int mu, __cminpack_real__ epsfcn, __cminpack_real__ *diag, int mode,
-	      __cminpack_real__ factor, int nprint, int *nfev,
-	      __cminpack_real__ *fjac, int ldfjac, __cminpack_real__ *r, int lr, __cminpack_real__ *qtf,
-	      __cminpack_real__ *wa1, __cminpack_real__ *wa2, __cminpack_real__ *wa3, __cminpack_real__ *wa4);
-  
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (user-supplied Jacobian) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(hybrj1)( __cminpack_decl_fcnder_nn__ void *p, int n, __cminpack_real__ *x,
-	       __cminpack_real__ *fvec, __cminpack_real__ *fjac, int ldfjac, __cminpack_real__ tol,
-	       __cminpack_real__ *wa, int lwa, void *user_data );
-          
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (user-supplied Jacobian,
-   more general) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(hybrj)( __cminpack_decl_fcnder_nn__ void *p, int n, __cminpack_real__ *x,
-	      __cminpack_real__ *fvec, __cminpack_real__ *fjac, int ldfjac, __cminpack_real__ xtol,
-	      int maxfev, __cminpack_real__ *diag, int mode, __cminpack_real__ factor,
-	      int nprint, int *nfev, int *njev, __cminpack_real__ *r,
-	      int lr, __cminpack_real__ *qtf, __cminpack_real__ *wa1, __cminpack_real__ *wa2,
-	      __cminpack_real__ *wa3, __cminpack_real__ *wa4, void *user_data );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (Jacobian calculated by a forward-difference approximation) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(lmdif1)( __cminpack_decl_fcn_mn__
-	       void *p, int m, int n, __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ tol,
-	       int *iwa, __cminpack_real__ *wa, int lwa );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (Jacobian calculated by a forward-difference approximation, more
-   general) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(lmdif)( __cminpack_decl_fcn_mn__
-	      void *p, int m, int n, __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ ftol,
-	      __cminpack_real__ xtol, __cminpack_real__ gtol, int maxfev, __cminpack_real__ epsfcn,
-	      __cminpack_real__ *diag, int mode, __cminpack_real__ factor, int nprint,
-	      int *nfev, __cminpack_real__ *fjac, int ldfjac, int *ipvt,
-	      __cminpack_real__ *qtf, __cminpack_real__ *wa1, __cminpack_real__ *wa2, __cminpack_real__ *wa3,
-	      __cminpack_real__ *wa4 );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(lmder1)( __cminpack_decl_fcnder_mn__
-	       void *p, int m, int n, __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ *fjac,
-	       int ldfjac, __cminpack_real__ tol, int *ipvt,
-	       __cminpack_real__ *wa, int lwa );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian, more general) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(lmder)( __cminpack_decl_fcnder_mn__
-	      void *p, int m, int n, __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ *fjac,
-	      int ldfjac, __cminpack_real__ ftol, __cminpack_real__ xtol, __cminpack_real__ gtol,
-	      int maxfev, __cminpack_real__ *diag, int mode, __cminpack_real__ factor,
-	      int nprint, int *nfev, int *njev, int *ipvt,
-	      __cminpack_real__ *qtf, __cminpack_real__ *wa1, __cminpack_real__ *wa2, __cminpack_real__ *wa3,
-	      __cminpack_real__ *wa4 );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian, minimal storage) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(lmstr1)( __cminpack_decl_fcnderstr_mn__ void *p, int m, int n,
-	       __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ *fjac, int ldfjac,
-	       __cminpack_real__ tol, int *ipvt, __cminpack_real__ *wa, int lwa );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian, minimal storage, more general) */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(lmstr)(  __cminpack_decl_fcnderstr_mn__ void *p, int m,
-	      int n, __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ *fjac,
-	      int ldfjac, __cminpack_real__ ftol, __cminpack_real__ xtol, __cminpack_real__ gtol,
-	      int maxfev, __cminpack_real__ *diag, int mode, __cminpack_real__ factor,
-	      int nprint, int *nfev, int *njev, int *ipvt,
-	      __cminpack_real__ *qtf, __cminpack_real__ *wa1, __cminpack_real__ *wa2, __cminpack_real__ *wa3,
-	      __cminpack_real__ *wa4 );
- 
-__cminpack_attr__
-void CMINPACK_EXPORT __cminpack_func__(chkder)( int m, int n, const __cminpack_real__ *x, __cminpack_real__ *fvec, __cminpack_real__ *fjac,
-	       int ldfjac, __cminpack_real__ *xp, __cminpack_real__ *fvecp, int mode,
-	       __cminpack_real__ *err  );
-
-__cminpack_attr__
-__cminpack_real__ CMINPACK_EXPORT __cminpack_func__(dpmpar)( int i );
-
-__cminpack_attr__
-__cminpack_real__ CMINPACK_EXPORT __cminpack_func__(enorm)( int n, const __cminpack_real__ *x );
-
-/* compute a forward-difference approximation to the m by n jacobian
-   matrix associated with a specified problem of m functions in n
-   variables. */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(fdjac2)(__cminpack_decl_fcn_mn__
-	     void *p, int m, int n, __cminpack_real__ *x, const __cminpack_real__ *fvec, __cminpack_real__ *fjac,
-	     int ldfjac, __cminpack_real__ epsfcn, __cminpack_real__ *wa);
-
-/* compute a forward-difference approximation to the n by n jacobian
-   matrix associated with a specified problem of n functions in n
-   variables. if the jacobian has a banded form, then function
-   evaluations are saved by only approximating the nonzero terms. */
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(fdjac1)(__cminpack_decl_fcn_nn__
-	     void *p, int n, __cminpack_real__ *x, const __cminpack_real__ *fvec, __cminpack_real__ *fjac, int ldfjac,
-	     int ml, int mu, __cminpack_real__ epsfcn, __cminpack_real__ *wa1,
-	     __cminpack_real__ *wa2);
-
-/* compute inverse(JtJ) after a run of lmdif or lmder. The covariance matrix is obtained
-   by scaling the result by enorm(y)**2/(m-n). If JtJ is singular and k = rank(J), the
-   pseudo-inverse is computed, and the result has to be scaled by enorm(y)**2/(m-k). */
-__cminpack_attr__
-void CMINPACK_EXPORT __cminpack_func__(covar)(int n, __cminpack_real__ *r, int ldr, 
-           const int *ipvt, __cminpack_real__ tol, __cminpack_real__ *wa);
-
-/* covar1 estimates the variance-covariance matrix:
-   C = sigma**2 (JtJ)**+
-   where (JtJ)**+ is the inverse of JtJ or the pseudo-inverse of JtJ (in case J does not have full rank),
-   and sigma**2 = fsumsq / (m - k)
-   where fsumsq is the residual sum of squares and k is the rank of J.
-   The function returns 0 if J has full rank, else the rank of J.
-*/
-__cminpack_attr__
-int CMINPACK_EXPORT __cminpack_func__(covar1)(int m, int n, __cminpack_real__ fsumsq, __cminpack_real__ *r, int ldr, 
-                           const int *ipvt, __cminpack_real__ tol, __cminpack_real__ *wa);
-
-/* internal MINPACK subroutines */
-__cminpack_attr__
-void __cminpack_func__(dogleg)(int n, const __cminpack_real__ *r, int lr, 
-             const __cminpack_real__ *diag, const __cminpack_real__ *qtb, __cminpack_real__ delta, __cminpack_real__ *x, 
-             __cminpack_real__ *wa1, __cminpack_real__ *wa2);
-__cminpack_attr__
-void __cminpack_func__(qrfac)(int m, int n, __cminpack_real__ *a, int
-            lda, int pivot, int *ipvt, int lipvt, __cminpack_real__ *rdiag,
-            __cminpack_real__ *acnorm, __cminpack_real__ *wa);
-__cminpack_attr__
-void __cminpack_func__(qrsolv)(int n, __cminpack_real__ *r, int ldr, 
-             const int *ipvt, const __cminpack_real__ *diag, const __cminpack_real__ *qtb, __cminpack_real__ *x, 
-             __cminpack_real__ *sdiag, __cminpack_real__ *wa);
-__cminpack_attr__
-void __cminpack_func__(qform)(int m, int n, __cminpack_real__ *q, int
-            ldq, __cminpack_real__ *wa);
-__cminpack_attr__
-void __cminpack_func__(r1updt)(int m, int n, __cminpack_real__ *s, int
-             ls, const __cminpack_real__ *u, __cminpack_real__ *v, __cminpack_real__ *w, int *sing);
-__cminpack_attr__
-void __cminpack_func__(r1mpyq)(int m, int n, __cminpack_real__ *a, int
-             lda, const __cminpack_real__ *v, const __cminpack_real__ *w);
-__cminpack_attr__
-void __cminpack_func__(lmpar)(int n, __cminpack_real__ *r, int ldr, 
-            const int *ipvt, const __cminpack_real__ *diag, const __cminpack_real__ *qtb, __cminpack_real__ delta, 
-            __cminpack_real__ *par, __cminpack_real__ *x, __cminpack_real__ *sdiag, __cminpack_real__ *wa1, 
-            __cminpack_real__ *wa2);
-__cminpack_attr__
-void __cminpack_func__(rwupdt)(int n, __cminpack_real__ *r, int ldr, 
-             const __cminpack_real__ *w, __cminpack_real__ *b, __cminpack_real__ *alpha, __cminpack_real__ *cos, 
-             __cminpack_real__ *sin);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __CMINPACK_H__ */

+ 0 - 389
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgemm.c

@@ -1,389 +0,0 @@
-/* dgemm.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Subroutine */ int dgemm_(char *transa, char *transb, integer *m, integer *
-	n, integer *k, doublereal *alpha, doublereal *a, integer *lda, 
-	doublereal *b, integer *ldb, doublereal *beta, doublereal *c__, 
-	integer *ldc)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2, 
-	    i__3;
-
-    /* Local variables */
-    integer i__, j, l, info;
-    logical nota, notb;
-    doublereal temp;
-    integer ncola;
-    extern logical lsame_(char *, char *);
-    integer nrowa, nrowb;
-    extern /* Subroutine */ int xerbla_(char *, integer *);
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DGEMM  performs one of the matrix-matrix operations */
-
-/*     C := alpha*op( A )*op( B ) + beta*C, */
-
-/*  where  op( X ) is one of */
-
-/*     op( X ) = X   or   op( X ) = X', */
-
-/*  alpha and beta are scalars, and A, B and C are matrices, with op( A ) */
-/*  an m by k matrix,  op( B )  a  k by n matrix and  C an m by n matrix. */
-
-/*  Arguments */
-/*  ========== */
-
-/*  TRANSA - CHARACTER*1. */
-/*           On entry, TRANSA specifies the form of op( A ) to be used in */
-/*           the matrix multiplication as follows: */
-
-/*              TRANSA = 'N' or 'n',  op( A ) = A. */
-
-/*              TRANSA = 'T' or 't',  op( A ) = A'. */
-
-/*              TRANSA = 'C' or 'c',  op( A ) = A'. */
-
-/*           Unchanged on exit. */
-
-/*  TRANSB - CHARACTER*1. */
-/*           On entry, TRANSB specifies the form of op( B ) to be used in */
-/*           the matrix multiplication as follows: */
-
-/*              TRANSB = 'N' or 'n',  op( B ) = B. */
-
-/*              TRANSB = 'T' or 't',  op( B ) = B'. */
-
-/*              TRANSB = 'C' or 'c',  op( B ) = B'. */
-
-/*           Unchanged on exit. */
-
-/*  M      - INTEGER. */
-/*           On entry,  M  specifies  the number  of rows  of the  matrix */
-/*           op( A )  and of the  matrix  C.  M  must  be at least  zero. */
-/*           Unchanged on exit. */
-
-/*  N      - INTEGER. */
-/*           On entry,  N  specifies the number  of columns of the matrix */
-/*           op( B ) and the number of columns of the matrix C. N must be */
-/*           at least zero. */
-/*           Unchanged on exit. */
-
-/*  K      - INTEGER. */
-/*           On entry,  K  specifies  the number of columns of the matrix */
-/*           op( A ) and the number of rows of the matrix op( B ). K must */
-/*           be at least  zero. */
-/*           Unchanged on exit. */
-
-/*  ALPHA  - DOUBLE PRECISION. */
-/*           On entry, ALPHA specifies the scalar alpha. */
-/*           Unchanged on exit. */
-
-/*  A      - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is */
-/*           k  when  TRANSA = 'N' or 'n',  and is  m  otherwise. */
-/*           Before entry with  TRANSA = 'N' or 'n',  the leading  m by k */
-/*           part of the array  A  must contain the matrix  A,  otherwise */
-/*           the leading  k by m  part of the array  A  must contain  the */
-/*           matrix A. */
-/*           Unchanged on exit. */
-
-/*  LDA    - INTEGER. */
-/*           On entry, LDA specifies the first dimension of A as declared */
-/*           in the calling (sub) program. When  TRANSA = 'N' or 'n' then */
-/*           LDA must be at least  lmax( 1, m ), otherwise  LDA must be at */
-/*           least  lmax( 1, k ). */
-/*           Unchanged on exit. */
-
-/*  B      - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is */
-/*           n  when  TRANSB = 'N' or 'n',  and is  k  otherwise. */
-/*           Before entry with  TRANSB = 'N' or 'n',  the leading  k by n */
-/*           part of the array  B  must contain the matrix  B,  otherwise */
-/*           the leading  n by k  part of the array  B  must contain  the */
-/*           matrix B. */
-/*           Unchanged on exit. */
-
-/*  LDB    - INTEGER. */
-/*           On entry, LDB specifies the first dimension of B as declared */
-/*           in the calling (sub) program. When  TRANSB = 'N' or 'n' then */
-/*           LDB must be at least  lmax( 1, k ), otherwise  LDB must be at */
-/*           least  lmax( 1, n ). */
-/*           Unchanged on exit. */
-
-/*  BETA   - DOUBLE PRECISION. */
-/*           On entry,  BETA  specifies the scalar  beta.  When  BETA  is */
-/*           supplied as zero then C need not be set on input. */
-/*           Unchanged on exit. */
-
-/*  C      - DOUBLE PRECISION array of DIMENSION ( LDC, n ). */
-/*           Before entry, the leading  m by n  part of the array  C must */
-/*           contain the matrix  C,  except when  beta  is zero, in which */
-/*           case C need not be set on entry. */
-/*           On exit, the array  C  is overwritten by the  m by n  matrix */
-/*           ( alpha*op( A )*op( B ) + beta*C ). */
-
-/*  LDC    - INTEGER. */
-/*           On entry, LDC specifies the first dimension of C as declared */
-/*           in  the  calling  (sub)  program.   LDC  must  be  at  least */
-/*           lmax( 1, m ). */
-/*           Unchanged on exit. */
-
-
-/*  Level 3 Blas routine. */
-
-/*  -- Written on 8-February-1989. */
-/*     Jack Dongarra, Argonne National Laboratory. */
-/*     Iain Duff, AERE Harwell. */
-/*     Jeremy Du Croz, Numerical Algorithms Group Ltd. */
-/*     Sven Hammarling, Numerical Algorithms Group Ltd. */
-
-
-/*     .. External Functions .. */
-/*     .. */
-/*     .. External Subroutines .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Parameters .. */
-/*     .. */
-
-/*     Set  NOTA  and  NOTB  as  true if  A  and  B  respectively are not */
-/*     transposed and set  NROWA, NCOLA and  NROWB  as the number of rows */
-/*     and  columns of  A  and the  number of  rows  of  B  respectively. */
-
-    /* Parameter adjustments */
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-    b_dim1 = *ldb;
-    b_offset = 1 + b_dim1;
-    b -= b_offset;
-    c_dim1 = *ldc;
-    c_offset = 1 + c_dim1;
-    c__ -= c_offset;
-
-    /* Function Body */
-    nota = lsame_(transa, "N");
-    notb = lsame_(transb, "N");
-    if (nota) {
-	nrowa = *m;
-	ncola = *k;
-    } else {
-	nrowa = *k;
-	ncola = *m;
-    }
-    if (notb) {
-	nrowb = *k;
-    } else {
-	nrowb = *n;
-    }
-
-/*     Test the input parameters. */
-
-    info = 0;
-    if (! nota && ! lsame_(transa, "C") && ! lsame_(
-	    transa, "T")) {
-	info = 1;
-    } else if (! notb && ! lsame_(transb, "C") && ! 
-	    lsame_(transb, "T")) {
-	info = 2;
-    } else if (*m < 0) {
-	info = 3;
-    } else if (*n < 0) {
-	info = 4;
-    } else if (*k < 0) {
-	info = 5;
-    } else if (*lda < lmax(1,nrowa)) {
-	info = 8;
-    } else if (*ldb < lmax(1,nrowb)) {
-	info = 10;
-    } else if (*ldc < lmax(1,*m)) {
-	info = 13;
-    }
-    if (info != 0) {
-	xerbla_("DGEMM ", &info);
-	return 0;
-    }
-
-/*     Quick return if possible. */
-
-    if (*m == 0 || *n == 0 || (*alpha == 0. || *k == 0) && *beta == 1.) {
-	return 0;
-    }
-
-/*     And if  alpha.eq.zero. */
-
-    if (*alpha == 0.) {
-	if (*beta == 0.) {
-	    i__1 = *n;
-	    for (j = 1; j <= i__1; ++j) {
-		i__2 = *m;
-		for (i__ = 1; i__ <= i__2; ++i__) {
-		    c__[i__ + j * c_dim1] = 0.;
-/* L10: */
-		}
-/* L20: */
-	    }
-	} else {
-	    i__1 = *n;
-	    for (j = 1; j <= i__1; ++j) {
-		i__2 = *m;
-		for (i__ = 1; i__ <= i__2; ++i__) {
-		    c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
-/* L30: */
-		}
-/* L40: */
-	    }
-	}
-	return 0;
-    }
-
-/*     Start the operations. */
-
-    if (notb) {
-	if (nota) {
-
-/*           Form  C := alpha*A*B + beta*C. */
-
-	    i__1 = *n;
-	    for (j = 1; j <= i__1; ++j) {
-		if (*beta == 0.) {
-		    i__2 = *m;
-		    for (i__ = 1; i__ <= i__2; ++i__) {
-			c__[i__ + j * c_dim1] = 0.;
-/* L50: */
-		    }
-		} else if (*beta != 1.) {
-		    i__2 = *m;
-		    for (i__ = 1; i__ <= i__2; ++i__) {
-			c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
-/* L60: */
-		    }
-		}
-		i__2 = *k;
-		for (l = 1; l <= i__2; ++l) {
-		    if (b[l + j * b_dim1] != 0.) {
-			temp = *alpha * b[l + j * b_dim1];
-			i__3 = *m;
-			for (i__ = 1; i__ <= i__3; ++i__) {
-			    c__[i__ + j * c_dim1] += temp * a[i__ + l * 
-				    a_dim1];
-/* L70: */
-			}
-		    }
-/* L80: */
-		}
-/* L90: */
-	    }
-	} else {
-
-/*           Form  C := alpha*A'*B + beta*C */
-
-	    i__1 = *n;
-	    for (j = 1; j <= i__1; ++j) {
-		i__2 = *m;
-		for (i__ = 1; i__ <= i__2; ++i__) {
-		    temp = 0.;
-		    i__3 = *k;
-		    for (l = 1; l <= i__3; ++l) {
-			temp += a[l + i__ * a_dim1] * b[l + j * b_dim1];
-/* L100: */
-		    }
-		    if (*beta == 0.) {
-			c__[i__ + j * c_dim1] = *alpha * temp;
-		    } else {
-			c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
-				i__ + j * c_dim1];
-		    }
-/* L110: */
-		}
-/* L120: */
-	    }
-	}
-    } else {
-	if (nota) {
-
-/*           Form  C := alpha*A*B' + beta*C */
-
-	    i__1 = *n;
-	    for (j = 1; j <= i__1; ++j) {
-		if (*beta == 0.) {
-		    i__2 = *m;
-		    for (i__ = 1; i__ <= i__2; ++i__) {
-			c__[i__ + j * c_dim1] = 0.;
-/* L130: */
-		    }
-		} else if (*beta != 1.) {
-		    i__2 = *m;
-		    for (i__ = 1; i__ <= i__2; ++i__) {
-			c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
-/* L140: */
-		    }
-		}
-		i__2 = *k;
-		for (l = 1; l <= i__2; ++l) {
-		    if (b[j + l * b_dim1] != 0.) {
-			temp = *alpha * b[j + l * b_dim1];
-			i__3 = *m;
-			for (i__ = 1; i__ <= i__3; ++i__) {
-			    c__[i__ + j * c_dim1] += temp * a[i__ + l * 
-				    a_dim1];
-/* L150: */
-			}
-		    }
-/* L160: */
-		}
-/* L170: */
-	    }
-	} else {
-
-/*           Form  C := alpha*A'*B' + beta*C */
-
-	    i__1 = *n;
-	    for (j = 1; j <= i__1; ++j) {
-		i__2 = *m;
-		for (i__ = 1; i__ <= i__2; ++i__) {
-		    temp = 0.;
-		    i__3 = *k;
-		    for (l = 1; l <= i__3; ++l) {
-			temp += a[l + i__ * a_dim1] * b[j + l * b_dim1];
-/* L180: */
-		    }
-		    if (*beta == 0.) {
-			c__[i__ + j * c_dim1] = *alpha * temp;
-		    } else {
-			c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
-				i__ + j * c_dim1];
-		    }
-/* L190: */
-		}
-/* L200: */
-	    }
-	}
-    }
-
-    return 0;
-
-/*     End of DGEMM . */
-
-} /* dgemm_ */

+ 0 - 194
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dger.c

@@ -1,194 +0,0 @@
-/* dger.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Subroutine */ int dger_(integer *m, integer *n, doublereal *alpha, 
-	doublereal *x, integer *incx, doublereal *y, integer *incy, 
-	doublereal *a, integer *lda)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, i__1, i__2;
-
-    /* Local variables */
-    integer i__, j, ix, jy, kx, info;
-    doublereal temp;
-    extern /* Subroutine */ int xerbla_(char *, integer *);
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DGER   performs the rank 1 operation */
-
-/*     A := alpha*x*y' + A, */
-
-/*  where alpha is a scalar, x is an m element vector, y is an n element */
-/*  vector and A is an m by n matrix. */
-
-/*  Arguments */
-/*  ========== */
-
-/*  M      - INTEGER. */
-/*           On entry, M specifies the number of rows of the matrix A. */
-/*           M must be at least zero. */
-/*           Unchanged on exit. */
-
-/*  N      - INTEGER. */
-/*           On entry, N specifies the number of columns of the matrix A. */
-/*           N must be at least zero. */
-/*           Unchanged on exit. */
-
-/*  ALPHA  - DOUBLE PRECISION. */
-/*           On entry, ALPHA specifies the scalar alpha. */
-/*           Unchanged on exit. */
-
-/*  X      - DOUBLE PRECISION array of dimension at least */
-/*           ( 1 + ( m - 1 )*abs( INCX ) ). */
-/*           Before entry, the incremented array X must contain the m */
-/*           element vector x. */
-/*           Unchanged on exit. */
-
-/*  INCX   - INTEGER. */
-/*           On entry, INCX specifies the increment for the elements of */
-/*           X. INCX must not be zero. */
-/*           Unchanged on exit. */
-
-/*  Y      - DOUBLE PRECISION array of dimension at least */
-/*           ( 1 + ( n - 1 )*abs( INCY ) ). */
-/*           Before entry, the incremented array Y must contain the n */
-/*           element vector y. */
-/*           Unchanged on exit. */
-
-/*  INCY   - INTEGER. */
-/*           On entry, INCY specifies the increment for the elements of */
-/*           Y. INCY must not be zero. */
-/*           Unchanged on exit. */
-
-/*  A      - DOUBLE PRECISION array of DIMENSION ( LDA, n ). */
-/*           Before entry, the leading m by n part of the array A must */
-/*           contain the matrix of coefficients. On exit, A is */
-/*           overwritten by the updated matrix. */
-
-/*  LDA    - INTEGER. */
-/*           On entry, LDA specifies the first dimension of A as declared */
-/*           in the calling (sub) program. LDA must be at least */
-/*           lmax( 1, m ). */
-/*           Unchanged on exit. */
-
-
-/*  Level 2 Blas routine. */
-
-/*  -- Written on 22-October-1986. */
-/*     Jack Dongarra, Argonne National Lab. */
-/*     Jeremy Du Croz, Nag Central Office. */
-/*     Sven Hammarling, Nag Central Office. */
-/*     Richard Hanson, Sandia National Labs. */
-
-
-/*     .. Parameters .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. External Subroutines .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-
-/*     Test the input parameters. */
-
-    /* Parameter adjustments */
-    --x;
-    --y;
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-
-    /* Function Body */
-    info = 0;
-    if (*m < 0) {
-	info = 1;
-    } else if (*n < 0) {
-	info = 2;
-    } else if (*incx == 0) {
-	info = 5;
-    } else if (*incy == 0) {
-	info = 7;
-    } else if (*lda < lmax(1,*m)) {
-	info = 9;
-    }
-    if (info != 0) {
-	xerbla_("DGER  ", &info);
-	return 0;
-    }
-
-/*     Quick return if possible. */
-
-    if (*m == 0 || *n == 0 || *alpha == 0.) {
-	return 0;
-    }
-
-/*     Start the operations. In this version the elements of A are */
-/*     accessed sequentially with one pass through A. */
-
-    if (*incy > 0) {
-	jy = 1;
-    } else {
-	jy = 1 - (*n - 1) * *incy;
-    }
-    if (*incx == 1) {
-	i__1 = *n;
-	for (j = 1; j <= i__1; ++j) {
-	    if (y[jy] != 0.) {
-		temp = *alpha * y[jy];
-		i__2 = *m;
-		for (i__ = 1; i__ <= i__2; ++i__) {
-		    a[i__ + j * a_dim1] += x[i__] * temp;
-/* L10: */
-		}
-	    }
-	    jy += *incy;
-/* L20: */
-	}
-    } else {
-	if (*incx > 0) {
-	    kx = 1;
-	} else {
-	    kx = 1 - (*m - 1) * *incx;
-	}
-	i__1 = *n;
-	for (j = 1; j <= i__1; ++j) {
-	    if (y[jy] != 0.) {
-		temp = *alpha * y[jy];
-		ix = kx;
-		i__2 = *m;
-		for (i__ = 1; i__ <= i__2; ++i__) {
-		    a[i__ + j * a_dim1] += x[ix] * temp;
-		    ix += *incx;
-/* L30: */
-		}
-	    }
-	    jy += *incy;
-/* L40: */
-	}
-    }
-
-    return 0;
-
-/*     End of DGER  . */
-
-} /* dger_ */

+ 0 - 138
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgesv.c

@@ -1,138 +0,0 @@
-/* dgesv.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Subroutine */ int dgesv_(integer *n, integer *nrhs, doublereal *a, integer 
-	*lda, integer *ipiv, doublereal *b, integer *ldb, integer *info)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, b_dim1, b_offset, i__1;
-
-    /* Local variables */
-    extern /* Subroutine */ int dgetrf_(integer *, integer *, doublereal *, 
-	    integer *, integer *, integer *), xerbla_(char *, integer *), dgetrs_(char *, integer *, integer *, doublereal *, 
-	    integer *, integer *, doublereal *, integer *, integer *);
-
-
-/*  -- LAPACK driver routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DGESV computes the solution to a real system of linear equations */
-/*     A * X = B, */
-/*  where A is an N-by-N matrix and X and B are N-by-NRHS matrices. */
-
-/*  The LU decomposition with partial pivoting and row interchanges is */
-/*  used to factor A as */
-/*     A = P * L * U, */
-/*  where P is a permutation matrix, L is unit lower triangular, and U is */
-/*  upper triangular.  The factored form of A is then used to solve the */
-/*  system of equations A * X = B. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  N       (input) INTEGER */
-/*          The number of linear equations, i.e., the order of the */
-/*          matrix A.  N >= 0. */
-
-/*  NRHS    (input) INTEGER */
-/*          The number of right hand sides, i.e., the number of columns */
-/*          of the matrix B.  NRHS >= 0. */
-
-/*  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N) */
-/*          On entry, the N-by-N coefficient matrix A. */
-/*          On exit, the factors L and U from the factorization */
-/*          A = P*L*U; the unit diagonal elements of L are not stored. */
-
-/*  LDA     (input) INTEGER */
-/*          The leading dimension of the array A.  LDA >= lmax(1,N). */
-
-/*  IPIV    (output) INTEGER array, dimension (N) */
-/*          The pivot indices that define the permutation matrix P; */
-/*          row i of the matrix was interchanged with row IPIV(i). */
-
-/*  B       (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) */
-/*          On entry, the N-by-NRHS matrix of right hand side matrix B. */
-/*          On exit, if INFO = 0, the N-by-NRHS solution matrix X. */
-
-/*  LDB     (input) INTEGER */
-/*          The leading dimension of the array B.  LDB >= lmax(1,N). */
-
-/*  INFO    (output) INTEGER */
-/*          = 0:  successful exit */
-/*          < 0:  if INFO = -i, the i-th argument had an illegal value */
-/*          > 0:  if INFO = i, U(i,i) is exactly zero.  The factorization */
-/*                has been completed, but the factor U is exactly */
-/*                singular, so the solution could not be computed. */
-
-/*  ===================================================================== */
-
-/*     .. External Subroutines .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Executable Statements .. */
-
-/*     Test the input parameters. */
-
-    /* Parameter adjustments */
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-    --ipiv;
-    b_dim1 = *ldb;
-    b_offset = 1 + b_dim1;
-    b -= b_offset;
-
-    /* Function Body */
-    *info = 0;
-    if (*n < 0) {
-	*info = -1;
-    } else if (*nrhs < 0) {
-	*info = -2;
-    } else if (*lda < lmax(1,*n)) {
-	*info = -4;
-    } else if (*ldb < lmax(1,*n)) {
-	*info = -7;
-    }
-    if (*info != 0) {
-	i__1 = -(*info);
-	xerbla_("DGESV ", &i__1);
-	return 0;
-    }
-
-/*     Compute the LU factorization of A. */
-
-    dgetrf_(n, n, &a[a_offset], lda, &ipiv[1], info);
-    if (*info == 0) {
-
-/*        Solve the system A*X = B, overwriting B with X. */
-
-	dgetrs_("No transpose", n, nrhs, &a[a_offset], lda, &ipiv[1], &b[
-		b_offset], ldb, info);
-    }
-    return 0;
-
-/*     End of DGESV */
-
-} /* dgesv_ */

+ 0 - 194
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgetf2.c

@@ -1,194 +0,0 @@
-/* dgetf2.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-  on Microsoft Windows system, link with libf2c.lib;
-  on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-  or, if you install libf2c.a in a standard place, with -lf2c -lm
-  -- in that order, at the end of the command line, as in
-    cc *.o -lf2c -lm
-  Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-    http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-#include <math.h>
-
-/* Table of constant values */
-
-static integer c__1 = 1;
-static doublereal c_b8 = -1.;
-
-/* Subroutine */ int dgetf2_(integer *m, integer *n, doublereal *a, integer *
-  lda, integer *ipiv, integer *info)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, i__1, i__2, i__3;
-    doublereal d__1;
-
-    /* Local variables */
-    integer i__, j, jp;
-    extern /* Subroutine */ int dger_(integer *, integer *, doublereal *,
-      doublereal *, integer *, doublereal *, integer *, doublereal *,
-      integer *), dscal_(integer *, doublereal *, doublereal *, integer
-      *);
-    doublereal sfmin;
-    extern /* Subroutine */ int dswap_(integer *, doublereal *, integer *,
-      doublereal *, integer *);
-    extern doublereal dlamch_(char *);
-    extern integer idamax_(integer *, doublereal *, integer *);
-    extern /* Subroutine */ int xerbla_(char *, integer *);
-
-
-/*  -- LAPACK routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DGETF2 computes an LU factorization of a general m-by-n matrix A */
-/*  using partial pivoting with row interchanges. */
-
-/*  The factorization has the form */
-/*     A = P * L * U */
-/*  where P is a permutation matrix, L is lower triangular with unit */
-/*  diagonal elements (lower trapezoidal if m > n), and U is upper */
-/*  triangular (upper trapezoidal if m < n). */
-
-/*  This is the right-looking Level 2 BLAS version of the algorithm. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  M       (input) INTEGER */
-/*          The number of rows of the matrix A.  M >= 0. */
-
-/*  N       (input) INTEGER */
-/*          The number of columns of the matrix A.  N >= 0. */
-
-/*  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N) */
-/*          On entry, the m by n matrix to be factored. */
-/*          On exit, the factors L and U from the factorization */
-/*          A = P*L*U; the unit diagonal elements of L are not stored. */
-
-/*  LDA     (input) INTEGER */
-/*          The leading dimension of the array A.  LDA >= lmax(1,M). */
-
-/*  IPIV    (output) INTEGER array, dimension (min(M,N)) */
-/*          The pivot indices; for 1 <= i <= lmin(M,N), row i of the */
-/*          matrix was interchanged with row IPIV(i). */
-
-/*  INFO    (output) INTEGER */
-/*          = 0: successful exit */
-/*          < 0: if INFO = -k, the k-th argument had an illegal value */
-/*          > 0: if INFO = k, U(k,k) is exactly zero. The factorization */
-/*               has been completed, but the factor U is exactly */
-/*               singular, and division by zero will occur if it is used */
-/*               to solve a system of equations. */
-
-/*  ===================================================================== */
-
-/*     .. Parameters .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. External Functions .. */
-/*     .. */
-/*     .. External Subroutines .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Executable Statements .. */
-
-/*     Test the input parameters. */
-
-    /* Parameter adjustments */
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-    --ipiv;
-
-    /* Function Body */
-    *info = 0;
-    if (*m < 0) {
-  *info = -1;
-    } else if (*n < 0) {
-  *info = -2;
-    } else if (*lda < lmax(1,*m)) {
-  *info = -4;
-    }
-    if (*info != 0) {
-  i__1 = -(*info);
-  xerbla_("DGETF2", &i__1);
-  return 0;
-    }
-
-/*     Quick return if possible */
-
-    if (*m == 0 || *n == 0) {
-  return 0;
-    }
-
-/*     Compute machine safe minimum */
-
-    sfmin = dlamch_("S");
-
-    i__1 = lmin(*m,*n);
-    for (j = 1; j <= i__1; ++j) {
-
-/*        Find pivot and test for singularity. */
-
-  i__2 = *m - j + 1;
-  jp = j - 1 + idamax_(&i__2, &a[j + j * a_dim1], &c__1);
-  ipiv[j] = jp;
-  if (a[jp + j * a_dim1] != 0.) {
-
-/*           Apply the interchange to columns 1:N. */
-
-      if (jp != j) {
-    dswap_(n, &a[j + a_dim1], lda, &a[jp + a_dim1], lda);
-      }
-
-/*           Compute elements J+1:M of J-th column. */
-
-      if (j < *m) {
-    if ((d__1 = a[j + j * a_dim1], fabs(d__1)) >= sfmin) {
-        i__2 = *m - j;
-        d__1 = 1. / a[j + j * a_dim1];
-        dscal_(&i__2, &d__1, &a[j + 1 + j * a_dim1], &c__1);
-    } else {
-        i__2 = *m - j;
-        for (i__ = 1; i__ <= i__2; ++i__) {
-      a[j + i__ + j * a_dim1] /= a[j + j * a_dim1];
-/* L20: */
-        }
-    }
-      }
-
-  } else if (*info == 0) {
-
-      *info = j;
-  }
-
-  if (j < lmin(*m,*n)) {
-
-/*           Update trailing submatrix. */
-
-      i__2 = *m - j;
-      i__3 = *n - j;
-      dger_(&i__2, &i__3, &c_b8, &a[j + 1 + j * a_dim1], &c__1, &a[j + (
-        j + 1) * a_dim1], lda, &a[j + 1 + (j + 1) * a_dim1], lda);
-  }
-/* L10: */
-    }
-    return 0;
-
-/*     End of DGETF2 */
-
-} /* dgetf2_ */

+ 0 - 219
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgetrf.c

@@ -1,219 +0,0 @@
-/* dgetrf.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Table of constant values */
-
-static integer c__1 = 1;
-static integer c_n1 = -1;
-static doublereal c_b16 = 1.;
-static doublereal c_b19 = -1.;
-
-/* Subroutine */ int dgetrf_(integer *m, integer *n, doublereal *a, integer *
-	lda, integer *ipiv, integer *info)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
-
-    /* Local variables */
-    integer i__, j, jb, nb;
-    extern /* Subroutine */ int dgemm_(char *, char *, integer *, integer *, 
-	    integer *, doublereal *, doublereal *, integer *, doublereal *, 
-	    integer *, doublereal *, doublereal *, integer *);
-    integer iinfo;
-    extern /* Subroutine */ int dtrsm_(char *, char *, char *, char *, 
-	    integer *, integer *, doublereal *, doublereal *, integer *, 
-	    doublereal *, integer *), dgetf2_(
-	    integer *, integer *, doublereal *, integer *, integer *, integer 
-	    *), xerbla_(char *, integer *);
-    extern integer ilaenv_(integer *, char *, char *, integer *, integer *, 
-	    integer *, integer *);
-    extern /* Subroutine */ int dlaswp_(integer *, doublereal *, integer *, 
-	    integer *, integer *, integer *, integer *);
-
-
-/*  -- LAPACK routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DGETRF computes an LU factorization of a general M-by-N matrix A */
-/*  using partial pivoting with row interchanges. */
-
-/*  The factorization has the form */
-/*     A = P * L * U */
-/*  where P is a permutation matrix, L is lower triangular with unit */
-/*  diagonal elements (lower trapezoidal if m > n), and U is upper */
-/*  triangular (upper trapezoidal if m < n). */
-
-/*  This is the right-looking Level 3 BLAS version of the algorithm. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  M       (input) INTEGER */
-/*          The number of rows of the matrix A.  M >= 0. */
-
-/*  N       (input) INTEGER */
-/*          The number of columns of the matrix A.  N >= 0. */
-
-/*  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N) */
-/*          On entry, the M-by-N matrix to be factored. */
-/*          On exit, the factors L and U from the factorization */
-/*          A = P*L*U; the unit diagonal elements of L are not stored. */
-
-/*  LDA     (input) INTEGER */
-/*          The leading dimension of the array A.  LDA >= lmax(1,M). */
-
-/*  IPIV    (output) INTEGER array, dimension (min(M,N)) */
-/*          The pivot indices; for 1 <= i <= lmin(M,N), row i of the */
-/*          matrix was interchanged with row IPIV(i). */
-
-/*  INFO    (output) INTEGER */
-/*          = 0:  successful exit */
-/*          < 0:  if INFO = -i, the i-th argument had an illegal value */
-/*          > 0:  if INFO = i, U(i,i) is exactly zero. The factorization */
-/*                has been completed, but the factor U is exactly */
-/*                singular, and division by zero will occur if it is used */
-/*                to solve a system of equations. */
-
-/*  ===================================================================== */
-
-/*     .. Parameters .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. External Subroutines .. */
-/*     .. */
-/*     .. External Functions .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Executable Statements .. */
-
-/*     Test the input parameters. */
-
-    /* Parameter adjustments */
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-    --ipiv;
-
-    /* Function Body */
-    *info = 0;
-    if (*m < 0) {
-	*info = -1;
-    } else if (*n < 0) {
-	*info = -2;
-    } else if (*lda < lmax(1,*m)) {
-	*info = -4;
-    }
-    if (*info != 0) {
-	i__1 = -(*info);
-	xerbla_("DGETRF", &i__1);
-	return 0;
-    }
-
-/*     Quick return if possible */
-
-    if (*m == 0 || *n == 0) {
-	return 0;
-    }
-
-/*     Determine the block size for this environment. */
-
-    nb = ilaenv_(&c__1, "DGETRF", " ", m, n, &c_n1, &c_n1);
-    if (nb <= 1 || nb >= lmin(*m,*n)) {
-
-/*        Use unblocked code. */
-
-	dgetf2_(m, n, &a[a_offset], lda, &ipiv[1], info);
-    } else {
-
-/*        Use blocked code. */
-
-	i__1 = lmin(*m,*n);
-	i__2 = nb;
-	for (j = 1; i__2 < 0 ? j >= i__1 : j <= i__1; j += i__2) {
-/* Computing MIN */
-	    i__3 = lmin(*m,*n) - j + 1;
-	    jb = lmin(i__3,nb);
-
-/*           Factor diagonal and subdiagonal blocks and test for exact */
-/*           singularity. */
-
-	    i__3 = *m - j + 1;
-	    dgetf2_(&i__3, &jb, &a[j + j * a_dim1], lda, &ipiv[j], &iinfo);
-
-/*           Adjust INFO and the pivot indices. */
-
-	    if (*info == 0 && iinfo > 0) {
-		*info = iinfo + j - 1;
-	    }
-/* Computing MIN */
-	    i__4 = *m, i__5 = j + jb - 1;
-	    i__3 = lmin(i__4,i__5);
-	    for (i__ = j; i__ <= i__3; ++i__) {
-		ipiv[i__] = j - 1 + ipiv[i__];
-/* L10: */
-	    }
-
-/*           Apply interchanges to columns 1:J-1. */
-
-	    i__3 = j - 1;
-	    i__4 = j + jb - 1;
-	    dlaswp_(&i__3, &a[a_offset], lda, &j, &i__4, &ipiv[1], &c__1);
-
-	    if (j + jb <= *n) {
-
-/*              Apply interchanges to columns J+JB:N. */
-
-		i__3 = *n - j - jb + 1;
-		i__4 = j + jb - 1;
-		dlaswp_(&i__3, &a[(j + jb) * a_dim1 + 1], lda, &j, &i__4, &
-			ipiv[1], &c__1);
-
-/*              Compute block row of U. */
-
-		i__3 = *n - j - jb + 1;
-		dtrsm_("Left", "Lower", "No transpose", "Unit", &jb, &i__3, &
-			c_b16, &a[j + j * a_dim1], lda, &a[j + (j + jb) * 
-			a_dim1], lda);
-		if (j + jb <= *m) {
-
-/*                 Update trailing submatrix. */
-
-		    i__3 = *m - j - jb + 1;
-		    i__4 = *n - j - jb + 1;
-		    dgemm_("No transpose", "No transpose", &i__3, &i__4, &jb, 
-			    &c_b19, &a[j + jb + j * a_dim1], lda, &a[j + (j + 
-			    jb) * a_dim1], lda, &c_b16, &a[j + jb + (j + jb) *
-			     a_dim1], lda);
-		}
-	    }
-/* L20: */
-	}
-    }
-    return 0;
-
-/*     End of DGETRF */
-
-} /* dgetrf_ */

+ 0 - 186
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dgetrs.c

@@ -1,186 +0,0 @@
-/* dgetrs.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Table of constant values */
-
-static integer c__1 = 1;
-static doublereal c_b12 = 1.;
-static integer c_n1 = -1;
-
-/* Subroutine */ int dgetrs_(char *trans, integer *n, integer *nrhs, 
-	doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer *
-	ldb, integer *info)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, b_dim1, b_offset, i__1;
-
-    /* Local variables */
-    extern logical lsame_(char *, char *);
-    extern /* Subroutine */ int dtrsm_(char *, char *, char *, char *, 
-	    integer *, integer *, doublereal *, doublereal *, integer *, 
-	    doublereal *, integer *), xerbla_(
-	    char *, integer *), dlaswp_(integer *, doublereal *, 
-	    integer *, integer *, integer *, integer *, integer *);
-    logical notran;
-
-
-/*  -- LAPACK routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DGETRS solves a system of linear equations */
-/*     A * X = B  or  A' * X = B */
-/*  with a general N-by-N matrix A using the LU factorization computed */
-/*  by DGETRF. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  TRANS   (input) CHARACTER*1 */
-/*          Specifies the form of the system of equations: */
-/*          = 'N':  A * X = B  (No transpose) */
-/*          = 'T':  A'* X = B  (Transpose) */
-/*          = 'C':  A'* X = B  (Conjugate transpose = Transpose) */
-
-/*  N       (input) INTEGER */
-/*          The order of the matrix A.  N >= 0. */
-
-/*  NRHS    (input) INTEGER */
-/*          The number of right hand sides, i.e., the number of columns */
-/*          of the matrix B.  NRHS >= 0. */
-
-/*  A       (input) DOUBLE PRECISION array, dimension (LDA,N) */
-/*          The factors L and U from the factorization A = P*L*U */
-/*          as computed by DGETRF. */
-
-/*  LDA     (input) INTEGER */
-/*          The leading dimension of the array A.  LDA >= lmax(1,N). */
-
-/*  IPIV    (input) INTEGER array, dimension (N) */
-/*          The pivot indices from DGETRF; for 1<=i<=N, row i of the */
-/*          matrix was interchanged with row IPIV(i). */
-
-/*  B       (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) */
-/*          On entry, the right hand side matrix B. */
-/*          On exit, the solution matrix X. */
-
-/*  LDB     (input) INTEGER */
-/*          The leading dimension of the array B.  LDB >= lmax(1,N). */
-
-/*  INFO    (output) INTEGER */
-/*          = 0:  successful exit */
-/*          < 0:  if INFO = -i, the i-th argument had an illegal value */
-
-/*  ===================================================================== */
-
-/*     .. Parameters .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. External Functions .. */
-/*     .. */
-/*     .. External Subroutines .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Executable Statements .. */
-
-/*     Test the input parameters. */
-
-    /* Parameter adjustments */
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-    --ipiv;
-    b_dim1 = *ldb;
-    b_offset = 1 + b_dim1;
-    b -= b_offset;
-
-    /* Function Body */
-    *info = 0;
-    notran = lsame_(trans, "N");
-    if (! notran && ! lsame_(trans, "T") && ! lsame_(
-	    trans, "C")) {
-	*info = -1;
-    } else if (*n < 0) {
-	*info = -2;
-    } else if (*nrhs < 0) {
-	*info = -3;
-    } else if (*lda < lmax(1,*n)) {
-	*info = -5;
-    } else if (*ldb < lmax(1,*n)) {
-	*info = -8;
-    }
-    if (*info != 0) {
-	i__1 = -(*info);
-	xerbla_("DGETRS", &i__1);
-	return 0;
-    }
-
-/*     Quick return if possible */
-
-    if (*n == 0 || *nrhs == 0) {
-	return 0;
-    }
-
-    if (notran) {
-
-/*        Solve A * X = B. */
-
-/*        Apply row interchanges to the right hand sides. */
-
-	dlaswp_(nrhs, &b[b_offset], ldb, &c__1, n, &ipiv[1], &c__1);
-
-/*        Solve L*X = B, overwriting B with X. */
-
-	dtrsm_("Left", "Lower", "No transpose", "Unit", n, nrhs, &c_b12, &a[
-		a_offset], lda, &b[b_offset], ldb);
-
-/*        Solve U*X = B, overwriting B with X. */
-
-	dtrsm_("Left", "Upper", "No transpose", "Non-unit", n, nrhs, &c_b12, &
-		a[a_offset], lda, &b[b_offset], ldb);
-    } else {
-
-/*        Solve A' * X = B. */
-
-/*        Solve U'*X = B, overwriting B with X. */
-
-	dtrsm_("Left", "Upper", "Transpose", "Non-unit", n, nrhs, &c_b12, &a[
-		a_offset], lda, &b[b_offset], ldb);
-
-/*        Solve L'*X = B, overwriting B with X. */
-
-	dtrsm_("Left", "Lower", "Transpose", "Unit", n, nrhs, &c_b12, &a[
-		a_offset], lda, &b[b_offset], ldb);
-
-/*        Apply row interchanges to the solution vectors. */
-
-	dlaswp_(nrhs, &b[b_offset], ldb, &c__1, n, &ipiv[1], &c_n1);
-    }
-
-    return 0;
-
-/*     End of DGETRS */
-
-} /* dgetrs_ */

File diff suppressed because it is too large
+ 0 - 1006
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dlamch.c


+ 0 - 158
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dlaswp.c

@@ -1,158 +0,0 @@
-/* dlaswp.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Subroutine */ int dlaswp_(integer *n, doublereal *a, integer *lda, integer 
-	*k1, integer *k2, integer *ipiv, integer *incx)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
-
-    /* Local variables */
-    integer i__, j, k, i1, i2, n32, ip, ix, ix0, inc;
-    doublereal temp;
-
-
-/*  -- LAPACK auxiliary routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DLASWP performs a series of row interchanges on the matrix A. */
-/*  One row interchange is initiated for each of rows K1 through K2 of A. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  N       (input) INTEGER */
-/*          The number of columns of the matrix A. */
-
-/*  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N) */
-/*          On entry, the matrix of column dimension N to which the row */
-/*          interchanges will be applied. */
-/*          On exit, the permuted matrix. */
-
-/*  LDA     (input) INTEGER */
-/*          The leading dimension of the array A. */
-
-/*  K1      (input) INTEGER */
-/*          The first element of IPIV for which a row interchange will */
-/*          be done. */
-
-/*  K2      (input) INTEGER */
-/*          The last element of IPIV for which a row interchange will */
-/*          be done. */
-
-/*  IPIV    (input) INTEGER array, dimension (K2*abs(INCX)) */
-/*          The vector of pivot indices.  Only the elements in positions */
-/*          K1 through K2 of IPIV are accessed. */
-/*          IPIV(K) = L implies rows K and L are to be interchanged. */
-
-/*  INCX    (input) INTEGER */
-/*          The increment between successive values of IPIV.  If IPIV */
-/*          is negative, the pivots are applied in reverse order. */
-
-/*  Further Details */
-/*  =============== */
-
-/*  Modified by */
-/*   R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA */
-
-/* ===================================================================== */
-
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Executable Statements .. */
-
-/*     Interchange row I with row IPIV(I) for each of rows K1 through K2. */
-
-    /* Parameter adjustments */
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-    --ipiv;
-
-    /* Function Body */
-    if (*incx > 0) {
-	ix0 = *k1;
-	i1 = *k1;
-	i2 = *k2;
-	inc = 1;
-    } else if (*incx < 0) {
-	ix0 = (1 - *k2) * *incx + 1;
-	i1 = *k2;
-	i2 = *k1;
-	inc = -1;
-    } else {
-	return 0;
-    }
-
-    n32 = *n / 32 << 5;
-    if (n32 != 0) {
-	i__1 = n32;
-	for (j = 1; j <= i__1; j += 32) {
-	    ix = ix0;
-	    i__2 = i2;
-	    i__3 = inc;
-	    for (i__ = i1; i__3 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__3) 
-		    {
-		ip = ipiv[ix];
-		if (ip != i__) {
-		    i__4 = j + 31;
-		    for (k = j; k <= i__4; ++k) {
-			temp = a[i__ + k * a_dim1];
-			a[i__ + k * a_dim1] = a[ip + k * a_dim1];
-			a[ip + k * a_dim1] = temp;
-/* L10: */
-		    }
-		}
-		ix += *incx;
-/* L20: */
-	    }
-/* L30: */
-	}
-    }
-    if (n32 != *n) {
-	++n32;
-	ix = ix0;
-	i__1 = i2;
-	i__3 = inc;
-	for (i__ = i1; i__3 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__3) {
-	    ip = ipiv[ix];
-	    if (ip != i__) {
-		i__2 = *n;
-		for (k = n32; k <= i__2; ++k) {
-		    temp = a[i__ + k * a_dim1];
-		    a[i__ + k * a_dim1] = a[ip + k * a_dim1];
-		    a[ip + k * a_dim1] = temp;
-/* L40: */
-		}
-	    }
-	    ix += *incx;
-/* L50: */
-	}
-    }
-
-    return 0;
-
-/*     End of DLASWP */
-
-} /* dlaswp_ */

+ 0 - 253
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dogleg_.c

@@ -1,253 +0,0 @@
-/* dogleg.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <math.h>
-#define real __minpack_real__
-
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-
-/* Table of constant values */
-
-__minpack_attr__
-void __minpack_func__(dogleg)(const int *n, const real *r__, const int *lr, 
-	const real *diag, const real *qtb, const real *delta, real *x, 
-	real *wa1, real *wa2)
-{
-    /* System generated locals */
-    int i__1, i__2;
-    real d__1, d__2, d__3, d__4;
-
-    /* Local variables */
-    int i__, j, k, l, jj, jp1;
-    real sum, temp, alpha, bnorm;
-    real gnorm, qnorm, epsmch;
-    real sgnorm;
-    const int c__1 = 1;
-
-/*     ********** */
-
-/*     subroutine dogleg */
-
-/*     given an m by n matrix a, an n by n nonsingular diagonal */
-/*     matrix d, an m-vector b, and a positive number delta, the */
-/*     problem is to determine the convex combination x of the */
-/*     gauss-newton and scaled gradient directions that minimizes */
-/*     (a*x - b) in the least squares sense, subject to the */
-/*     restriction that the euclidean norm of d*x be at most delta. */
-
-/*     this subroutine completes the solution of the problem */
-/*     if it is provided with the necessary information from the */
-/*     qr factorization of a. that is, if a = q*r, where q has */
-/*     orthogonal columns and r is an upper triangular matrix, */
-/*     then dogleg expects the full upper triangle of r and */
-/*     the first n components of (q transpose)*b. */
-
-/*     the subroutine statement is */
-
-/*       subroutine dogleg(n,r,lr,diag,qtb,delta,x,wa1,wa2) */
-
-/*     where */
-
-/*       n is a positive integer input variable set to the order of r. */
-
-/*       r is an input array of length lr which must contain the upper */
-/*         triangular matrix r stored by rows. */
-
-/*       lr is a positive integer input variable not less than */
-/*         (n*(n+1))/2. */
-
-/*       diag is an input array of length n which must contain the */
-/*         diagonal elements of the matrix d. */
-
-/*       qtb is an input array of length n which must contain the first */
-/*         n elements of the vector (q transpose)*b. */
-
-/*       delta is a positive input variable which specifies an upper */
-/*         bound on the euclidean norm of d*x. */
-
-/*       x is an output array of length n which contains the desired */
-/*         convex combination of the gauss-newton direction and the */
-/*         scaled gradient direction. */
-
-/*       wa1 and wa2 are work arrays of length n. */
-
-/*     subprograms called */
-
-/*       minpack-supplied ... dpmpar,enorm */
-
-/*       fortran-supplied ... dabs,dmax1,dmin1,dsqrt */
-
-/*     argonne national laboratory. minpack project. march 1980. */
-/*     burton s. garbow, kenneth e. hillstrom, jorge j. more */
-
-/*     ********** */
-    /* Parameter adjustments */
-    --wa2;
-    --wa1;
-    --x;
-    --qtb;
-    --diag;
-    --r__;
-    (void)lr;
-
-    /* Function Body */
-
-/*     epsmch is the machine precision. */
-
-    epsmch = __minpack_func__(dpmpar)(&c__1);
-
-/*     first, calculate the gauss-newton direction. */
-
-    jj = *n * (*n + 1) / 2 + 1;
-    i__1 = *n;
-    for (k = 1; k <= i__1; ++k) {
-	j = *n - k + 1;
-	jp1 = j + 1;
-	jj -= k;
-	l = jj + 1;
-	sum = 0.;
-	if (*n < jp1) {
-	    goto L20;
-	}
-	i__2 = *n;
-	for (i__ = jp1; i__ <= i__2; ++i__) {
-	    sum += r__[l] * x[i__];
-	    ++l;
-/* L10: */
-	}
-L20:
-	temp = r__[jj];
-	if (temp != 0.) {
-	    goto L40;
-	}
-	l = j;
-	i__2 = j;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-/* Computing MAX */
-	    d__2 = temp, d__3 = fabs(r__[l]);
-	    temp = max(d__2,d__3);
-	    l = l + *n - i__;
-/* L30: */
-	}
-	temp = epsmch * temp;
-	if (temp == 0.) {
-	    temp = epsmch;
-	}
-L40:
-	x[j] = (qtb[j] - sum) / temp;
-/* L50: */
-    }
-
-/*     test whether the gauss-newton direction is acceptable. */
-
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	wa1[j] = 0.;
-	wa2[j] = diag[j] * x[j];
-/* L60: */
-    }
-    qnorm = __minpack_func__(enorm)(n, &wa2[1]);
-    if (qnorm <= *delta) {
-	/* goto L140; */
-        return;
-    }
-
-/*     the gauss-newton direction is not acceptable. */
-/*     next, calculate the scaled gradient direction. */
-
-    l = 1;
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	temp = qtb[j];
-	i__2 = *n;
-	for (i__ = j; i__ <= i__2; ++i__) {
-	    wa1[i__] += r__[l] * temp;
-	    ++l;
-/* L70: */
-	}
-	wa1[j] /= diag[j];
-/* L80: */
-    }
-
-/*     calculate the norm of the scaled gradient and test for */
-/*     the special case in which the scaled gradient is zero. */
-
-    gnorm = __minpack_func__(enorm)(n, &wa1[1]);
-    sgnorm = 0.;
-    alpha = *delta / qnorm;
-    if (gnorm == 0.) {
-	goto L120;
-    }
-
-/*     calculate the point along the scaled gradient */
-/*     at which the quadratic is minimized. */
-
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	wa1[j] = wa1[j] / gnorm / diag[j];
-/* L90: */
-    }
-    l = 1;
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	sum = 0.;
-	i__2 = *n;
-	for (i__ = j; i__ <= i__2; ++i__) {
-	    sum += r__[l] * wa1[i__];
-	    ++l;
-/* L100: */
-	}
-	wa2[j] = sum;
-/* L110: */
-    }
-    temp = __minpack_func__(enorm)(n, &wa2[1]);
-    sgnorm = gnorm / temp / temp;
-
-/*     test whether the scaled gradient direction is acceptable. */
-
-    alpha = 0.;
-    if (sgnorm >= *delta) {
-	goto L120;
-    }
-
-/*     the scaled gradient direction is not acceptable. */
-/*     finally, calculate the point along the dogleg */
-/*     at which the quadratic is minimized. */
-
-    bnorm = __minpack_func__(enorm)(n, &qtb[1]);
-    temp = bnorm / gnorm * (bnorm / qnorm) * (sgnorm / *delta);
-/* Computing 2nd power */
-    d__1 = sgnorm / *delta;
-/* Computing 2nd power */
-    d__2 = temp - *delta / qnorm;
-/* Computing 2nd power */
-    d__3 = *delta / qnorm;
-/* Computing 2nd power */
-    d__4 = sgnorm / *delta;
-    temp = temp - *delta / qnorm * (d__1 * d__1) + sqrt(d__2 * d__2 + (1. - 
-	    d__3 * d__3) * (1. - d__4 * d__4));
-/* Computing 2nd power */
-    d__1 = sgnorm / *delta;
-    alpha = *delta / qnorm * (1. - d__1 * d__1) / temp;
-L120:
-
-/*     form appropriate convex combination of the gauss-newton */
-/*     direction and the scaled gradient direction. */
-
-    temp = (1. - alpha) * min(sgnorm,*delta);
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	x[j] = temp * wa1[j] + alpha * x[j];
-/* L130: */
-    }
-/* L140: */
-    return;
-
-/*     last card of subroutine dogleg. */
-
-} /* dogleg_ */
-

+ 0 - 207
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dpmpar_.c

@@ -1,207 +0,0 @@
-/* dpmpar.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <float.h>
-#define real __minpack_real__
-
-#define double_EPSILON DBL_EPSILON
-#define double_MIN DBL_MIN
-#define double_MAX DBL_MAX
-#define float_EPSILON FLT_EPSILON
-#define float_MIN FLT_MIN
-#define float_MAX FLT_MAX
-#define half_EPSILON HALF_EPSILON
-#define half_MIN HALF_NRM_MIN
-#define half_MAX HALF_MAX
-
-#define DPMPAR(type,X) _DPMPAR(type,X)
-#define _DPMPAR(type,X) type ## _ ## X
-
-__minpack_attr__
-real __minpack_func__(dpmpar)(const int *i)
-{
-/*     ********** */
-
-/*     Function dpmpar */
-
-/*     This function provides double precision machine parameters */
-/*     when the appropriate set of data statements is activated (by */
-/*     removing the c from column 1) and all other data statements are */
-/*     rendered inactive. Most of the parameter values were obtained */
-/*     from the corresponding Bell Laboratories Port Library function. */
-
-/*     The function statement is */
-
-/*       double precision function dpmpar(i) */
-
-/*     where */
-
-/*       i is an integer input variable set to 1, 2, or 3 which */
-/*         selects the desired machine parameter. If the machine has */
-/*         t base b digits and its smallest and largest exponents are */
-/*         emin and emax, respectively, then these parameters are */
-
-/*         dpmpar(1) = b**(1 - t), the machine precision, */
-
-/*         dpmpar(2) = b**(emin - 1), the smallest magnitude, */
-
-/*         dpmpar(3) = b**emax*(1 - b**(-t)), the largest magnitude. */
-
-/*     Argonne National Laboratory. MINPACK Project. November 1996. */
-/*     Burton S. Garbow, Kenneth E. Hillstrom, Jorge J. More' */
-
-/*     ********** */
-
-/*     Machine constants for the IBM 360/370 series, */
-/*     the Amdahl 470/V6, the ICL 2900, the Itel AS/6, */
-/*     the Xerox Sigma 5/7/9 and the Sel systems 85/86. */
-
-/*     data mcheps(1),mcheps(2) / z34100000, z00000000 / */
-/*     data minmag(1),minmag(2) / z00100000, z00000000 / */
-/*     data maxmag(1),maxmag(2) / z7fffffff, zffffffff / */
-
-/*     Machine constants for the Honeywell 600/6000 series. */
-
-/*     data mcheps(1),mcheps(2) / o606400000000, o000000000000 / */
-/*     data minmag(1),minmag(2) / o402400000000, o000000000000 / */
-/*     data maxmag(1),maxmag(2) / o376777777777, o777777777777 / */
-
-/*     Machine constants for the CDC 6000/7000 series. */
-
-/*     data mcheps(1) / 15614000000000000000b / */
-/*     data mcheps(2) / 15010000000000000000b / */
-
-/*     data minmag(1) / 00604000000000000000b / */
-/*     data minmag(2) / 00000000000000000000b / */
-
-/*     data maxmag(1) / 37767777777777777777b / */
-/*     data maxmag(2) / 37167777777777777777b / */
-
-/*     Machine constants for the PDP-10 (KA processor). */
-
-/*     data mcheps(1),mcheps(2) / "114400000000, "000000000000 / */
-/*     data minmag(1),minmag(2) / "033400000000, "000000000000 / */
-/*     data maxmag(1),maxmag(2) / "377777777777, "344777777777 / */
-
-/*     Machine constants for the PDP-10 (KI processor). */
-
-/*     data mcheps(1),mcheps(2) / "104400000000, "000000000000 / */
-/*     data minmag(1),minmag(2) / "000400000000, "000000000000 / */
-/*     data maxmag(1),maxmag(2) / "377777777777, "377777777777 / */
-
-/*     Machine constants for the PDP-11. */
-
-/*     data mcheps(1),mcheps(2) /   9472,      0 / */
-/*     data mcheps(3),mcheps(4) /      0,      0 / */
-
-/*     data minmag(1),minmag(2) /    128,      0 / */
-/*     data minmag(3),minmag(4) /      0,      0 / */
-
-/*     data maxmag(1),maxmag(2) /  32767,     -1 / */
-/*     data maxmag(3),maxmag(4) /     -1,     -1 / */
-
-/*     Machine constants for the Burroughs 6700/7700 systems. */
-
-/*     data mcheps(1) / o1451000000000000 / */
-/*     data mcheps(2) / o0000000000000000 / */
-
-/*     data minmag(1) / o1771000000000000 / */
-/*     data minmag(2) / o7770000000000000 / */
-
-/*     data maxmag(1) / o0777777777777777 / */
-/*     data maxmag(2) / o7777777777777777 / */
-
-/*     Machine constants for the Burroughs 5700 system. */
-
-/*     data mcheps(1) / o1451000000000000 / */
-/*     data mcheps(2) / o0000000000000000 / */
-
-/*     data minmag(1) / o1771000000000000 / */
-/*     data minmag(2) / o0000000000000000 / */
-
-/*     data maxmag(1) / o0777777777777777 / */
-/*     data maxmag(2) / o0007777777777777 / */
-
-/*     Machine constants for the Burroughs 1700 system. */
-
-/*     data mcheps(1) / zcc6800000 / */
-/*     data mcheps(2) / z000000000 / */
-
-/*     data minmag(1) / zc00800000 / */
-/*     data minmag(2) / z000000000 / */
-
-/*     data maxmag(1) / zdffffffff / */
-/*     data maxmag(2) / zfffffffff / */
-
-/*     Machine constants for the Univac 1100 series. */
-
-/*     data mcheps(1),mcheps(2) / o170640000000, o000000000000 / */
-/*     data minmag(1),minmag(2) / o000040000000, o000000000000 / */
-/*     data maxmag(1),maxmag(2) / o377777777777, o777777777777 / */
-
-/*     Machine constants for the Data General Eclipse S/200. */
-
-/*     Note - it may be appropriate to include the following card - */
-/*     static dmach(3) */
-
-/*     data minmag/20k,3*0/,maxmag/77777k,3*177777k/ */
-/*     data mcheps/32020k,3*0/ */
-
-/*     Machine constants for the Harris 220. */
-
-/*     data mcheps(1),mcheps(2) / '20000000, '00000334 / */
-/*     data minmag(1),minmag(2) / '20000000, '00000201 / */
-/*     data maxmag(1),maxmag(2) / '37777777, '37777577 / */
-
-/*     Machine constants for the Cray-1. */
-
-/*     data mcheps(1) / 0376424000000000000000b / */
-/*     data mcheps(2) / 0000000000000000000000b / */
-
-/*     data minmag(1) / 0200034000000000000000b / */
-/*     data minmag(2) / 0000000000000000000000b / */
-
-/*     data maxmag(1) / 0577777777777777777777b / */
-/*     data maxmag(2) / 0000007777777777777776b / */
-
-/*     Machine constants for the Prime 400. */
-
-/*     data mcheps(1),mcheps(2) / :10000000000, :00000000123 / */
-/*     data minmag(1),minmag(2) / :10000000000, :00000100000 / */
-/*     data maxmag(1),maxmag(2) / :17777777777, :37777677776 / */
-
-/*     Machine constants for the VAX-11. */
-
-/*     data mcheps(1),mcheps(2) /   9472,  0 / */
-/*     data minmag(1),minmag(2) /    128,  0 / */
-/*     data maxmag(1),maxmag(2) / -32769, -1 / */
-
-/*     Machine constants for IEEE machines. */
-
-/*    data dmach(1) /2.22044604926d-16/ */
-/*    data dmach(2) /2.22507385852d-308/ */
-/*    data dmach(3) /1.79769313485d+308/ */
-
-
-    switch(*i) {
-        case 1:
-            return DPMPAR(real,EPSILON); /* 2.2204460492503131e-16 | 1.19209290e-07F */
-        case 2:
-            return DPMPAR(real,MIN);    /* 2.2250738585072014e-308 | 1.17549435e-38F */
-        default:
-            return DPMPAR(real,MAX);    /* 1.7976931348623157e+308 | 3.40282347e+38F */
-    }
-
-/*     Last card of function dpmpar. */
-
-} /* dpmpar_ */
-
-#undef mcheps
-#undef maxmag
-#undef minmag
-#undef dmach
-
-

+ 0 - 96
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dscal.c

@@ -1,96 +0,0 @@
-/* dscal.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Subroutine */ int dscal_(integer *n, doublereal *da, doublereal *dx, 
-	integer *incx)
-{
-    /* System generated locals */
-    integer i__1, i__2;
-
-    /* Local variables */
-    integer i__, m, mp1, nincx;
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-/* * */
-/*     scales a vector by a constant. */
-/*     uses unrolled loops for increment equal to one. */
-/*     jack dongarra, linpack, 3/11/78. */
-/*     modified 3/93 to return if incx .le. 0. */
-/*     modified 12/3/93, array(1) declarations changed to array(*) */
-
-
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-    /* Parameter adjustments */
-    --dx;
-
-    /* Function Body */
-    if (*n <= 0 || *incx <= 0) {
-	return 0;
-    }
-    if (*incx == 1) {
-	goto L20;
-    }
-
-/*        code for increment not equal to 1 */
-
-    nincx = *n * *incx;
-    i__1 = nincx;
-    i__2 = *incx;
-    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
-	dx[i__] = *da * dx[i__];
-/* L10: */
-    }
-    return 0;
-
-/*        code for increment equal to 1 */
-
-
-/*        clean-up loop */
-
-L20:
-    m = *n % 5;
-    if (m == 0) {
-	goto L40;
-    }
-    i__2 = m;
-    for (i__ = 1; i__ <= i__2; ++i__) {
-	dx[i__] = *da * dx[i__];
-/* L30: */
-    }
-    if (*n < 5) {
-	return 0;
-    }
-L40:
-    mp1 = m + 1;
-    i__2 = *n;
-    for (i__ = mp1; i__ <= i__2; i__ += 5) {
-	dx[i__] = *da * dx[i__];
-	dx[i__ + 1] = *da * dx[i__ + 1];
-	dx[i__ + 2] = *da * dx[i__ + 2];
-	dx[i__ + 3] = *da * dx[i__ + 3];
-	dx[i__ + 4] = *da * dx[i__ + 4];
-/* L50: */
-    }
-    return 0;
-} /* dscal_ */

+ 0 - 114
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dswap.c

@@ -1,114 +0,0 @@
-/* dswap.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Subroutine */ int dswap_(integer *n, doublereal *dx, integer *incx, 
-	doublereal *dy, integer *incy)
-{
-    /* System generated locals */
-    integer i__1;
-
-    /* Local variables */
-    integer i__, m, ix, iy, mp1;
-    doublereal dtemp;
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*     interchanges two vectors. */
-/*     uses unrolled loops for increments equal one. */
-/*     jack dongarra, linpack, 3/11/78. */
-/*     modified 12/3/93, array(1) declarations changed to array(*) */
-
-
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-    /* Parameter adjustments */
-    --dy;
-    --dx;
-
-    /* Function Body */
-    if (*n <= 0) {
-	return 0;
-    }
-    if (*incx == 1 && *incy == 1) {
-	goto L20;
-    }
-
-/*       code for unequal increments or equal increments not equal */
-/*         to 1 */
-
-    ix = 1;
-    iy = 1;
-    if (*incx < 0) {
-	ix = (-(*n) + 1) * *incx + 1;
-    }
-    if (*incy < 0) {
-	iy = (-(*n) + 1) * *incy + 1;
-    }
-    i__1 = *n;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-	dtemp = dx[ix];
-	dx[ix] = dy[iy];
-	dy[iy] = dtemp;
-	ix += *incx;
-	iy += *incy;
-/* L10: */
-    }
-    return 0;
-
-/*       code for both increments equal to 1 */
-
-
-/*       clean-up loop */
-
-L20:
-    m = *n % 3;
-    if (m == 0) {
-	goto L40;
-    }
-    i__1 = m;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-	dtemp = dx[i__];
-	dx[i__] = dy[i__];
-	dy[i__] = dtemp;
-/* L30: */
-    }
-    if (*n < 3) {
-	return 0;
-    }
-L40:
-    mp1 = m + 1;
-    i__1 = *n;
-    for (i__ = mp1; i__ <= i__1; i__ += 3) {
-	dtemp = dx[i__];
-	dx[i__] = dy[i__];
-	dy[i__] = dtemp;
-	dtemp = dx[i__ + 1];
-	dx[i__ + 1] = dy[i__ + 1];
-	dy[i__ + 1] = dtemp;
-	dtemp = dx[i__ + 2];
-	dx[i__ + 2] = dy[i__ + 2];
-	dy[i__ + 2] = dtemp;
-/* L50: */
-    }
-    return 0;
-} /* dswap_ */

+ 0 - 490
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/dtrsm.c

@@ -1,490 +0,0 @@
-/* dtrsm.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-/* Subroutine */ int dtrsm_(char *side, char *uplo, char *transa, char *diag, 
-	integer *m, integer *n, doublereal *alpha, doublereal *a, integer *
-	lda, doublereal *b, integer *ldb)
-{
-    /* System generated locals */
-    integer a_dim1, a_offset, b_dim1, b_offset, i__1, i__2, i__3;
-
-    /* Local variables */
-    integer i__, j, k, info;
-    doublereal temp;
-    logical lside;
-    extern logical lsame_(char *, char *);
-    integer nrowa;
-    logical upper;
-    extern /* Subroutine */ int xerbla_(char *, integer *);
-    logical nounit;
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  DTRSM  solves one of the matrix equations */
-
-/*     op( A )*X = alpha*B,   or   X*op( A ) = alpha*B, */
-
-/*  where alpha is a scalar, X and B are m by n matrices, A is a unit, or */
-/*  non-unit,  upper or lower triangular matrix  and  op( A )  is one  of */
-
-/*     op( A ) = A   or   op( A ) = A'. */
-
-/*  The matrix X is overwritten on B. */
-
-/*  Arguments */
-/*  ========== */
-
-/*  SIDE   - CHARACTER*1. */
-/*           On entry, SIDE specifies whether op( A ) appears on the left */
-/*           or right of X as follows: */
-
-/*              SIDE = 'L' or 'l'   op( A )*X = alpha*B. */
-
-/*              SIDE = 'R' or 'r'   X*op( A ) = alpha*B. */
-
-/*           Unchanged on exit. */
-
-/*  UPLO   - CHARACTER*1. */
-/*           On entry, UPLO specifies whether the matrix A is an upper or */
-/*           lower triangular matrix as follows: */
-
-/*              UPLO = 'U' or 'u'   A is an upper triangular matrix. */
-
-/*              UPLO = 'L' or 'l'   A is a lower triangular matrix. */
-
-/*           Unchanged on exit. */
-
-/*  TRANSA - CHARACTER*1. */
-/*           On entry, TRANSA specifies the form of op( A ) to be used in */
-/*           the matrix multiplication as follows: */
-
-/*              TRANSA = 'N' or 'n'   op( A ) = A. */
-
-/*              TRANSA = 'T' or 't'   op( A ) = A'. */
-
-/*              TRANSA = 'C' or 'c'   op( A ) = A'. */
-
-/*           Unchanged on exit. */
-
-/*  DIAG   - CHARACTER*1. */
-/*           On entry, DIAG specifies whether or not A is unit triangular */
-/*           as follows: */
-
-/*              DIAG = 'U' or 'u'   A is assumed to be unit triangular. */
-
-/*              DIAG = 'N' or 'n'   A is not assumed to be unit */
-/*                                  triangular. */
-
-/*           Unchanged on exit. */
-
-/*  M      - INTEGER. */
-/*           On entry, M specifies the number of rows of B. M must be at */
-/*           least zero. */
-/*           Unchanged on exit. */
-
-/*  N      - INTEGER. */
-/*           On entry, N specifies the number of columns of B.  N must be */
-/*           at least zero. */
-/*           Unchanged on exit. */
-
-/*  ALPHA  - DOUBLE PRECISION. */
-/*           On entry,  ALPHA specifies the scalar  alpha. When  alpha is */
-/*           zero then  A is not referenced and  B need not be set before */
-/*           entry. */
-/*           Unchanged on exit. */
-
-/*  A      - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m */
-/*           when  SIDE = 'L' or 'l'  and is  n  when  SIDE = 'R' or 'r'. */
-/*           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k */
-/*           upper triangular part of the array  A must contain the upper */
-/*           triangular matrix  and the strictly lower triangular part of */
-/*           A is not referenced. */
-/*           Before entry  with  UPLO = 'L' or 'l',  the  leading  k by k */
-/*           lower triangular part of the array  A must contain the lower */
-/*           triangular matrix  and the strictly upper triangular part of */
-/*           A is not referenced. */
-/*           Note that when  DIAG = 'U' or 'u',  the diagonal elements of */
-/*           A  are not referenced either,  but are assumed to be  unity. */
-/*           Unchanged on exit. */
-
-/*  LDA    - INTEGER. */
-/*           On entry, LDA specifies the first dimension of A as declared */
-/*           in the calling (sub) program.  When  SIDE = 'L' or 'l'  then */
-/*           LDA  must be at least  lmax( 1, m ),  when  SIDE = 'R' or 'r' */
-/*           then LDA must be at least lmax( 1, n ). */
-/*           Unchanged on exit. */
-
-/*  B      - DOUBLE PRECISION array of DIMENSION ( LDB, n ). */
-/*           Before entry,  the leading  m by n part of the array  B must */
-/*           contain  the  right-hand  side  matrix  B,  and  on exit  is */
-/*           overwritten by the solution matrix  X. */
-
-/*  LDB    - INTEGER. */
-/*           On entry, LDB specifies the first dimension of B as declared */
-/*           in  the  calling  (sub)  program.   LDB  must  be  at  least */
-/*           lmax( 1, m ). */
-/*           Unchanged on exit. */
-
-
-/*  Level 3 Blas routine. */
-
-
-/*  -- Written on 8-February-1989. */
-/*     Jack Dongarra, Argonne National Laboratory. */
-/*     Iain Duff, AERE Harwell. */
-/*     Jeremy Du Croz, Numerical Algorithms Group Ltd. */
-/*     Sven Hammarling, Numerical Algorithms Group Ltd. */
-
-
-/*     .. External Functions .. */
-/*     .. */
-/*     .. External Subroutines .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Parameters .. */
-/*     .. */
-
-/*     Test the input parameters. */
-
-    /* Parameter adjustments */
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1;
-    a -= a_offset;
-    b_dim1 = *ldb;
-    b_offset = 1 + b_dim1;
-    b -= b_offset;
-
-    /* Function Body */
-    lside = lsame_(side, "L");
-    if (lside) {
-	nrowa = *m;
-    } else {
-	nrowa = *n;
-    }
-    nounit = lsame_(diag, "N");
-    upper = lsame_(uplo, "U");
-
-    info = 0;
-    if (! lside && ! lsame_(side, "R")) {
-	info = 1;
-    } else if (! upper && ! lsame_(uplo, "L")) {
-	info = 2;
-    } else if (! lsame_(transa, "N") && ! lsame_(transa, 
-	     "T") && ! lsame_(transa, "C")) {
-	info = 3;
-    } else if (! lsame_(diag, "U") && ! lsame_(diag, 
-	    "N")) {
-	info = 4;
-    } else if (*m < 0) {
-	info = 5;
-    } else if (*n < 0) {
-	info = 6;
-    } else if (*lda < lmax(1,nrowa)) {
-	info = 9;
-    } else if (*ldb < lmax(1,*m)) {
-	info = 11;
-    }
-    if (info != 0) {
-	xerbla_("DTRSM ", &info);
-	return 0;
-    }
-
-/*     Quick return if possible. */
-
-    if (*m == 0 || *n == 0) {
-	return 0;
-    }
-
-/*     And when  alpha.eq.zero. */
-
-    if (*alpha == 0.) {
-	i__1 = *n;
-	for (j = 1; j <= i__1; ++j) {
-	    i__2 = *m;
-	    for (i__ = 1; i__ <= i__2; ++i__) {
-		b[i__ + j * b_dim1] = 0.;
-/* L10: */
-	    }
-/* L20: */
-	}
-	return 0;
-    }
-
-/*     Start the operations. */
-
-    if (lside) {
-	if (lsame_(transa, "N")) {
-
-/*           Form  B := alpha*inv( A )*B. */
-
-	    if (upper) {
-		i__1 = *n;
-		for (j = 1; j <= i__1; ++j) {
-		    if (*alpha != 1.) {
-			i__2 = *m;
-			for (i__ = 1; i__ <= i__2; ++i__) {
-			    b[i__ + j * b_dim1] = *alpha * b[i__ + j * b_dim1]
-				    ;
-/* L30: */
-			}
-		    }
-		    for (k = *m; k >= 1; --k) {
-			if (b[k + j * b_dim1] != 0.) {
-			    if (nounit) {
-				b[k + j * b_dim1] /= a[k + k * a_dim1];
-			    }
-			    i__2 = k - 1;
-			    for (i__ = 1; i__ <= i__2; ++i__) {
-				b[i__ + j * b_dim1] -= b[k + j * b_dim1] * a[
-					i__ + k * a_dim1];
-/* L40: */
-			    }
-			}
-/* L50: */
-		    }
-/* L60: */
-		}
-	    } else {
-		i__1 = *n;
-		for (j = 1; j <= i__1; ++j) {
-		    if (*alpha != 1.) {
-			i__2 = *m;
-			for (i__ = 1; i__ <= i__2; ++i__) {
-			    b[i__ + j * b_dim1] = *alpha * b[i__ + j * b_dim1]
-				    ;
-/* L70: */
-			}
-		    }
-		    i__2 = *m;
-		    for (k = 1; k <= i__2; ++k) {
-			if (b[k + j * b_dim1] != 0.) {
-			    if (nounit) {
-				b[k + j * b_dim1] /= a[k + k * a_dim1];
-			    }
-			    i__3 = *m;
-			    for (i__ = k + 1; i__ <= i__3; ++i__) {
-				b[i__ + j * b_dim1] -= b[k + j * b_dim1] * a[
-					i__ + k * a_dim1];
-/* L80: */
-			    }
-			}
-/* L90: */
-		    }
-/* L100: */
-		}
-	    }
-	} else {
-
-/*           Form  B := alpha*inv( A' )*B. */
-
-	    if (upper) {
-		i__1 = *n;
-		for (j = 1; j <= i__1; ++j) {
-		    i__2 = *m;
-		    for (i__ = 1; i__ <= i__2; ++i__) {
-			temp = *alpha * b[i__ + j * b_dim1];
-			i__3 = i__ - 1;
-			for (k = 1; k <= i__3; ++k) {
-			    temp -= a[k + i__ * a_dim1] * b[k + j * b_dim1];
-/* L110: */
-			}
-			if (nounit) {
-			    temp /= a[i__ + i__ * a_dim1];
-			}
-			b[i__ + j * b_dim1] = temp;
-/* L120: */
-		    }
-/* L130: */
-		}
-	    } else {
-		i__1 = *n;
-		for (j = 1; j <= i__1; ++j) {
-		    for (i__ = *m; i__ >= 1; --i__) {
-			temp = *alpha * b[i__ + j * b_dim1];
-			i__2 = *m;
-			for (k = i__ + 1; k <= i__2; ++k) {
-			    temp -= a[k + i__ * a_dim1] * b[k + j * b_dim1];
-/* L140: */
-			}
-			if (nounit) {
-			    temp /= a[i__ + i__ * a_dim1];
-			}
-			b[i__ + j * b_dim1] = temp;
-/* L150: */
-		    }
-/* L160: */
-		}
-	    }
-	}
-    } else {
-	if (lsame_(transa, "N")) {
-
-/*           Form  B := alpha*B*inv( A ). */
-
-	    if (upper) {
-		i__1 = *n;
-		for (j = 1; j <= i__1; ++j) {
-		    if (*alpha != 1.) {
-			i__2 = *m;
-			for (i__ = 1; i__ <= i__2; ++i__) {
-			    b[i__ + j * b_dim1] = *alpha * b[i__ + j * b_dim1]
-				    ;
-/* L170: */
-			}
-		    }
-		    i__2 = j - 1;
-		    for (k = 1; k <= i__2; ++k) {
-			if (a[k + j * a_dim1] != 0.) {
-			    i__3 = *m;
-			    for (i__ = 1; i__ <= i__3; ++i__) {
-				b[i__ + j * b_dim1] -= a[k + j * a_dim1] * b[
-					i__ + k * b_dim1];
-/* L180: */
-			    }
-			}
-/* L190: */
-		    }
-		    if (nounit) {
-			temp = 1. / a[j + j * a_dim1];
-			i__2 = *m;
-			for (i__ = 1; i__ <= i__2; ++i__) {
-			    b[i__ + j * b_dim1] = temp * b[i__ + j * b_dim1];
-/* L200: */
-			}
-		    }
-/* L210: */
-		}
-	    } else {
-		for (j = *n; j >= 1; --j) {
-		    if (*alpha != 1.) {
-			i__1 = *m;
-			for (i__ = 1; i__ <= i__1; ++i__) {
-			    b[i__ + j * b_dim1] = *alpha * b[i__ + j * b_dim1]
-				    ;
-/* L220: */
-			}
-		    }
-		    i__1 = *n;
-		    for (k = j + 1; k <= i__1; ++k) {
-			if (a[k + j * a_dim1] != 0.) {
-			    i__2 = *m;
-			    for (i__ = 1; i__ <= i__2; ++i__) {
-				b[i__ + j * b_dim1] -= a[k + j * a_dim1] * b[
-					i__ + k * b_dim1];
-/* L230: */
-			    }
-			}
-/* L240: */
-		    }
-		    if (nounit) {
-			temp = 1. / a[j + j * a_dim1];
-			i__1 = *m;
-			for (i__ = 1; i__ <= i__1; ++i__) {
-			    b[i__ + j * b_dim1] = temp * b[i__ + j * b_dim1];
-/* L250: */
-			}
-		    }
-/* L260: */
-		}
-	    }
-	} else {
-
-/*           Form  B := alpha*B*inv( A' ). */
-
-	    if (upper) {
-		for (k = *n; k >= 1; --k) {
-		    if (nounit) {
-			temp = 1. / a[k + k * a_dim1];
-			i__1 = *m;
-			for (i__ = 1; i__ <= i__1; ++i__) {
-			    b[i__ + k * b_dim1] = temp * b[i__ + k * b_dim1];
-/* L270: */
-			}
-		    }
-		    i__1 = k - 1;
-		    for (j = 1; j <= i__1; ++j) {
-			if (a[j + k * a_dim1] != 0.) {
-			    temp = a[j + k * a_dim1];
-			    i__2 = *m;
-			    for (i__ = 1; i__ <= i__2; ++i__) {
-				b[i__ + j * b_dim1] -= temp * b[i__ + k * 
-					b_dim1];
-/* L280: */
-			    }
-			}
-/* L290: */
-		    }
-		    if (*alpha != 1.) {
-			i__1 = *m;
-			for (i__ = 1; i__ <= i__1; ++i__) {
-			    b[i__ + k * b_dim1] = *alpha * b[i__ + k * b_dim1]
-				    ;
-/* L300: */
-			}
-		    }
-/* L310: */
-		}
-	    } else {
-		i__1 = *n;
-		for (k = 1; k <= i__1; ++k) {
-		    if (nounit) {
-			temp = 1. / a[k + k * a_dim1];
-			i__2 = *m;
-			for (i__ = 1; i__ <= i__2; ++i__) {
-			    b[i__ + k * b_dim1] = temp * b[i__ + k * b_dim1];
-/* L320: */
-			}
-		    }
-		    i__2 = *n;
-		    for (j = k + 1; j <= i__2; ++j) {
-			if (a[j + k * a_dim1] != 0.) {
-			    temp = a[j + k * a_dim1];
-			    i__3 = *m;
-			    for (i__ = 1; i__ <= i__3; ++i__) {
-				b[i__ + j * b_dim1] -= temp * b[i__ + k * 
-					b_dim1];
-/* L330: */
-			    }
-			}
-/* L340: */
-		    }
-		    if (*alpha != 1.) {
-			i__2 = *m;
-			for (i__ = 1; i__ <= i__2; ++i__) {
-			    b[i__ + k * b_dim1] = *alpha * b[i__ + k * b_dim1]
-				    ;
-/* L350: */
-			}
-		    }
-/* L360: */
-		}
-	    }
-	}
-    }
-
-    return 0;
-
-/*     End of DTRSM . */
-
-} /* dtrsm_ */

+ 0 - 196
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/enorm_.c

@@ -1,196 +0,0 @@
-/* enorm.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <math.h>
-#define real __minpack_real__
-
-/*
-  About the values for rdwarf and rgiant.
-
-  The original values, both in single-precision FORTRAN source code and in double-precision code were:
-#define rdwarf 3.834e-20
-#define rgiant 1.304e19
-  See for example:
-    http://www.netlib.org/slatec/src/denorm.f
-    http://www.netlib.org/slatec/src/enorm.f
-  However, rdwarf is smaller than sqrt(FLT_MIN) = 1.0842021724855044e-19, so that rdwarf**2 will
-  underflow. This contradicts the constraints expressed in the comments below.
-
-  We changed these constants to those proposed by the
-  implementation found in MPFIT http://cow.physics.wisc.edu/~craigm/idl/fitting.html
-
- cmpfit-1.2 proposes the following definitions:
-  rdwarf = sqrt(dpmpar(2)*1.5) * 10
-  rgiant = sqrt(dpmpar(3)) * 0.1
-
- The half version does not really worked that way, so we use for half:
-  rdwarf = sqrt(dpmpar(2)) * 2
-  rgiant = sqrt(dpmpar(3)) * 0.5
- Any suggestion is welcome. Half CMINPACK is really only a
- proof-of-concept anyway.
-
- See the example/tenorm*c, which computes these values 
-*/
-#define double_dwarf (1.82691291192569e-153)
-#define double_giant (1.34078079299426e+153)
-#define float_dwarf (1.327871072777421e-18f)
-#define float_giant (1.844674297419792e+18f)
-#define half_dwarf (0.015625f)
-#define half_giant (127.9375f)
-
-#define dwarf(type) _dwarf(type)
-#define _dwarf(type) type ## _dwarf
-#define giant(type) _giant(type)
-#define _giant(type) type ## _giant
-
-#define rdwarf dwarf(real)
-#define rgiant giant(real)
-
-__minpack_attr__
-real __minpack_func__(enorm)(const int *n, const real *x)
-{
-    /* System generated locals */
-    int i__1;
-    real ret_val, d__1;
-
-    /* Local variables */
-    int i__;
-    real s1, s2, s3, xabs, x1max, x3max, agiant, floatn;
-
-/*     ********** */
-
-/*     function enorm */
-
-/*     given an n-vector x, this function calculates the */
-/*     euclidean norm of x. */
-
-/*     the euclidean norm is computed by accumulating the sum of */
-/*     squares in three different sums. the sums of squares for the */
-/*     small and large components are scaled so that no overflows */
-/*     occur. non-destructive underflows are permitted. underflows */
-/*     and overflows do not occur in the computation of the unscaled */
-/*     sum of squares for the intermediate components. */
-/*     the definitions of small, intermediate and large components */
-/*     depend on two constants, rdwarf and rgiant. the main */
-/*     restrictions on these constants are that rdwarf**2 not */
-/*     underflow and rgiant**2 not overflow. the constants */
-/*     given here are suitable for every known computer. */
-
-/*     the function statement is */
-
-/*       double precision function enorm(n,x) */
-
-/*     where */
-
-/*       n is a positive integer input variable. */
-
-/*       x is an input array of length n. */
-
-/*     subprograms called */
-
-/*       fortran-supplied ... dabs,dsqrt */
-
-/*     argonne national laboratory. minpack project. march 1980. */
-/*     burton s. garbow, kenneth e. hillstrom, jorge j. more */
-
-/*     ********** */
-    /* Parameter adjustments */
-    --x;
-
-    /* Function Body */
-    s1 = 0.;
-    s2 = 0.;
-    s3 = 0.;
-    x1max = 0.;
-    x3max = 0.;
-    floatn = (real) (*n);
-    agiant = rgiant / floatn;
-    i__1 = *n;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-	xabs = fabs(x[i__]);
-	if (xabs > rdwarf && xabs < agiant) {
-	    goto L70;
-	}
-	if (xabs <= rdwarf) {
-	    goto L30;
-	}
-
-/*              sum for large components. */
-
-	if (xabs <= x1max) {
-	    goto L10;
-	}
-/* Computing 2nd power */
-	d__1 = x1max / xabs;
-	s1 = 1. + s1 * (d__1 * d__1);
-	x1max = xabs;
-	goto L20;
-L10:
-/* Computing 2nd power */
-	d__1 = xabs / x1max;
-	s1 += d__1 * d__1;
-L20:
-	goto L60;
-L30:
-
-/*              sum for small components. */
-
-	if (xabs <= x3max) {
-	    goto L40;
-	}
-/* Computing 2nd power */
-	d__1 = x3max / xabs;
-	s3 = 1. + s3 * (d__1 * d__1);
-	x3max = xabs;
-	goto L50;
-L40:
-	if (xabs != 0.) {
-/* Computing 2nd power */
-	    d__1 = xabs / x3max;
-	    s3 += d__1 * d__1;
-	}
-L50:
-L60:
-	goto L80;
-L70:
-
-/*           sum for intermediate components. */
-
-/* Computing 2nd power */
-	d__1 = xabs;
-	s2 += d__1 * d__1;
-L80:
-/* L90: */
-	;
-    }
-
-/*     calculation of norm. */
-
-    if (s1 == 0.) {
-	goto L100;
-    }
-    ret_val = x1max * sqrt(s1 + s2 / x1max / x1max);
-    goto L130;
-L100:
-    if (s2 == 0.) {
-	goto L110;
-    }
-    if (s2 >= x3max) {
-	ret_val = sqrt(s2 * (1. + x3max / s2 * (x3max * s3)));
-    } else {
-	ret_val = sqrt(x3max * (s2 / x3max + x3max * s3));
-    }
-    goto L120;
-L110:
-    ret_val = x3max * sqrt(s3);
-L120:
-L130:
-    return ret_val;
-
-/*     last card of function enorm. */
-
-} /* enorm_ */
-

+ 0 - 225
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/f2c.h

@@ -1,225 +0,0 @@
-/* f2c.h  --  Standard Fortran to C header file */
-
-/**  barf  [ba:rf]  2.  "He suggested using FORTRAN, and everybody barfed."
-
-  - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
-
-#ifndef F2C_INCLUDE
-#define F2C_INCLUDE
-
-#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
-typedef int integer;
-typedef unsigned int uinteger;
-#else
-typedef long int integer;
-typedef unsigned long int uinteger;
-#endif
-typedef char *address;
-typedef short int shortint;
-typedef float real;
-typedef double doublereal;
-typedef struct { real r, i; } complex;
-typedef struct { doublereal r, i; } doublecomplex;
-typedef long int logical;
-typedef short int shortlogical;
-typedef char logical1;
-typedef char integer1;
-#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
-typedef long long longint;    /* system-dependent */
-typedef unsigned long long ulongint;  /* system-dependent */
-#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
-#define qbit_set(a,b) ((a) |  ((ulongint)1 << (b)))
-#endif
-
-#define TRUE_ (1)
-#define FALSE_ (0)
-
-/* Extern is for use with -E */
-#ifndef Extern
-#define Extern extern
-#endif
-
-/* I/O stuff */
-
-#ifdef f2c_i2
-/* for -i2 */
-typedef short flag;
-typedef short ftnlen;
-typedef short ftnint;
-#else
-typedef long int flag;
-typedef long int ftnlen;
-typedef long int ftnint;
-#endif
-
-/*external read, write*/
-typedef struct
-{ flag cierr;
-  ftnint ciunit;
-  flag ciend;
-  char *cifmt;
-  ftnint cirec;
-} cilist;
-
-/*internal read, write*/
-typedef struct
-{ flag icierr;
-  char *iciunit;
-  flag iciend;
-  char *icifmt;
-  ftnint icirlen;
-  ftnint icirnum;
-} icilist;
-
-/*open*/
-typedef struct
-{ flag oerr;
-  ftnint ounit;
-  char *ofnm;
-  ftnlen ofnmlen;
-  char *osta;
-  char *oacc;
-  char *ofm;
-  ftnint orl;
-  char *oblnk;
-} olist;
-
-/*close*/
-typedef struct
-{ flag cerr;
-  ftnint cunit;
-  char *csta;
-} cllist;
-
-/*rewind, backspace, endfile*/
-typedef struct
-{ flag aerr;
-  ftnint aunit;
-} alist;
-
-/* inquire */
-typedef struct
-{ flag inerr;
-  ftnint inunit;
-  char *infile;
-  ftnlen infilen;
-  ftnint  *inex;  /*parameters in standard's order*/
-  ftnint  *inopen;
-  ftnint  *innum;
-  ftnint  *innamed;
-  char  *inname;
-  ftnlen  innamlen;
-  char  *inacc;
-  ftnlen  inacclen;
-  char  *inseq;
-  ftnlen  inseqlen;
-  char  *indir;
-  ftnlen  indirlen;
-  char  *infmt;
-  ftnlen  infmtlen;
-  char  *inform;
-  ftnint  informlen;
-  char  *inunf;
-  ftnlen  inunflen;
-  ftnint  *inrecl;
-  ftnint  *innrec;
-  char  *inblank;
-  ftnlen  inblanklen;
-} inlist;
-
-#define VOID void
-
-union Multitype { /* for multiple entry points */
-  integer1 g;
-  shortint h;
-  integer i;
-  /* longint j; */
-  real r;
-  doublereal d;
-  complex c;
-  doublecomplex z;
-  };
-
-typedef union Multitype Multitype;
-
-/*typedef long int Long;*/  /* No longer used; formerly in Namelist */
-
-struct Vardesc {  /* for Namelist */
-  char *name;
-  char *addr;
-  ftnlen *dims;
-  int  type;
-  };
-typedef struct Vardesc Vardesc;
-
-struct Namelist {
-  char *name;
-  Vardesc **vars;
-  int nvars;
-  };
-typedef struct Namelist Namelist;
-
-#include <math.h>
-static integer lmin(long a, long b) {return ((a) <= (b) ? (a) : (b));}
-static integer lmax(long a, long b) {return ((a) >= (b) ? (a) : (b));}
-#define bit_test(a,b) ((a) >> (b) & 1)
-#define bit_clear(a,b)  ((a) & ~((uinteger)1 << (b)))
-#define bit_set(a,b)  ((a) |  ((uinteger)1 << (b)))
-
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef int /* Unknown procedure type */ (*U_fp)(...);
-typedef shortint (*J_fp)(...);
-typedef integer (*I_fp)(...);
-typedef real (*R_fp)(...);
-typedef doublereal (*D_fp)(...), (*E_fp)(...);
-typedef /* Complex */ VOID (*C_fp)(...);
-typedef /* Double Complex */ VOID (*Z_fp)(...);
-typedef logical (*L_fp)(...);
-typedef shortlogical (*K_fp)(...);
-typedef /* Character */ VOID (*H_fp)(...);
-typedef /* Subroutine */ int (*S_fp)(...);
-#else
-typedef int /* Unknown procedure type */ (*U_fp)();
-typedef shortint (*J_fp)();
-typedef integer (*I_fp)();
-typedef real (*R_fp)();
-typedef doublereal (*D_fp)(), (*E_fp)();
-typedef /* Complex */ VOID (*C_fp)();
-typedef /* Double Complex */ VOID (*Z_fp)();
-typedef logical (*L_fp)();
-typedef shortlogical (*K_fp)();
-typedef /* Character */ VOID (*H_fp)();
-typedef /* Subroutine */ int (*S_fp)();
-#endif
-/* E_fp is for real functions when -R is not specified */
-typedef VOID C_f; /* complex function */
-typedef VOID H_f; /* character function */
-typedef VOID Z_f; /* double complex function */
-typedef doublereal E_f; /* real function with -R not specified */
-
-/* undef any lower-case symbols that your C compiler predefines, e.g.: */
-
-#ifndef Skip_f2c_Undefs
-#undef cray
-#undef gcos
-#undef mc68010
-#undef mc68020
-#undef mips
-#undef pdp11
-#undef sgi
-#undef sparc
-#undef sun
-#undef sun2
-#undef sun3
-#undef sun4
-#undef u370
-#undef u3b
-#undef u3b2
-#undef u3b5
-#undef unix
-#undef vax
-#endif
-#endif

+ 0 - 612
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/hybrj_.c

@@ -1,612 +0,0 @@
-/* hybrj.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <math.h>
-#define real __minpack_real__
-
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-#define TRUE_ (1)
-#define FALSE_ (0)
-
-__minpack_attr__
-void __minpack_func__(hybrj)(__minpack_decl_fcnder_nn__  const int *n, real *x, real *
-	fvec, real *fjac, const int *ldfjac, const real *xtol, const int *
-	maxfev, real *diag, const int *mode, const real *factor, const int *
-	nprint, int *info, int *nfev, int *njev, real *r__, 
-	const int *lr, real *qtf, real *wa1, real *wa2, 
-	real *wa3, real *wa4, void* user_data)
-{
-    /* Initialized data */
-
-#define p1 .1
-#define p5 .5
-#define p001 .001
-#define p0001 1e-4
-    const int c_false = FALSE_;
-    const int c__1 = 1;
-
-    /* System generated locals */
-    int fjac_dim1, fjac_offset, i__1, i__2;
-    real d__1, d__2;
-
-    /* Local variables */
-    int i__, j, l, jm1, iwa[1];
-    real sum;
-    int sing;
-    int iter;
-    real temp;
-    int iflag;
-    real delta;
-    int jeval;
-    int ncsuc;
-    real ratio;
-    real fnorm;
-    real pnorm, xnorm = 0, fnorm1;
-    int nslow1, nslow2;
-    int ncfail;
-    real actred, epsmch, prered;
-
-/*     ********** */
-
-/*     subroutine hybrj */
-
-/*     the purpose of hybrj is to find a zero of a system of */
-/*     n nonlinear functions in n variables by a modification */
-/*     of the powell hybrid method. the user must provide a */
-/*     subroutine which calculates the functions and the jacobian. */
-
-/*     the subroutine statement is */
-
-/*       subroutine hybrj(fcn,n,x,fvec,fjac,ldfjac,xtol,maxfev,diag, */
-/*                        mode,factor,nprint,info,nfev,njev,r,lr,qtf, */
-/*                        wa1,wa2,wa3,wa4) */
-
-/*     where */
-
-/*       fcn is the name of the user-supplied subroutine which */
-/*         calculates the functions and the jacobian. fcn must */
-/*         be declared in an external statement in the user */
-/*         calling program, and should be written as follows. */
-
-/*         subroutine fcn(n,x,fvec,fjac,ldfjac,iflag) */
-/*         integer n,ldfjac,iflag */
-/*         double precision x(n),fvec(n),fjac(ldfjac,n) */
-/*         ---------- */
-/*         if iflag = 1 calculate the functions at x and */
-/*         return this vector in fvec. do not alter fjac. */
-/*         if iflag = 2 calculate the jacobian at x and */
-/*         return this matrix in fjac. do not alter fvec. */
-/*         --------- */
-/*         return */
-/*         end */
-
-/*         the value of iflag should not be changed by fcn unless */
-/*         the user wants to terminate execution of hybrj. */
-/*         in this case set iflag to a negative integer. */
-
-/*       n is a positive integer input variable set to the number */
-/*         of functions and variables. */
-
-/*       x is an array of length n. on input x must contain */
-/*         an initial estimate of the solution vector. on output x */
-/*         contains the final estimate of the solution vector. */
-
-/*       fvec is an output array of length n which contains */
-/*         the functions evaluated at the output x. */
-
-/*       fjac is an output n by n array which contains the */
-/*         orthogonal matrix q produced by the qr factorization */
-/*         of the final approximate jacobian. */
-
-/*       ldfjac is a positive integer input variable not less than n */
-/*         which specifies the leading dimension of the array fjac. */
-
-/*       xtol is a nonnegative input variable. termination */
-/*         occurs when the relative error between two consecutive */
-/*         iterates is at most xtol. */
-
-/*       maxfev is a positive integer input variable. termination */
-/*         occurs when the number of calls to fcn with iflag = 1 */
-/*         has reached maxfev. */
-
-/*       diag is an array of length n. if mode = 1 (see */
-/*         below), diag is internally set. if mode = 2, diag */
-/*         must contain positive entries that serve as */
-/*         multiplicative scale factors for the variables. */
-
-/*       mode is an integer input variable. if mode = 1, the */
-/*         variables will be scaled internally. if mode = 2, */
-/*         the scaling is specified by the input diag. other */
-/*         values of mode are equivalent to mode = 1. */
-
-/*       factor is a positive input variable used in determining the */
-/*         initial step bound. this bound is set to the product of */
-/*         factor and the euclidean norm of diag*x if nonzero, or else */
-/*         to factor itself. in most cases factor should lie in the */
-/*         interval (.1,100.). 100. is a generally recommended value. */
-
-/*       nprint is an integer input variable that enables controlled */
-/*         printing of iterates if it is positive. in this case, */
-/*         fcn is called with iflag = 0 at the beginning of the first */
-/*         iteration and every nprint iterations thereafter and */
-/*         immediately prior to return, with x and fvec available */
-/*         for printing. fvec and fjac should not be altered. */
-/*         if nprint is not positive, no special calls of fcn */
-/*         with iflag = 0 are made. */
-
-/*       info is an integer output variable. if the user has */
-/*         terminated execution, info is set to the (negative) */
-/*         value of iflag. see description of fcn. otherwise, */
-/*         info is set as follows. */
-
-/*         info = 0   improper input parameters. */
-
-/*         info = 1   relative error between two consecutive iterates */
-/*                    is at most xtol. */
-
-/*         info = 2   number of calls to fcn with iflag = 1 has */
-/*                    reached maxfev. */
-
-/*         info = 3   xtol is too small. no further improvement in */
-/*                    the approximate solution x is possible. */
-
-/*         info = 4   iteration is not making good progress, as */
-/*                    measured by the improvement from the last */
-/*                    five jacobian evaluations. */
-
-/*         info = 5   iteration is not making good progress, as */
-/*                    measured by the improvement from the last */
-/*                    ten iterations. */
-
-/*       nfev is an integer output variable set to the number of */
-/*         calls to fcn with iflag = 1. */
-
-/*       njev is an integer output variable set to the number of */
-/*         calls to fcn with iflag = 2. */
-
-/*       r is an output array of length lr which contains the */
-/*         upper triangular matrix produced by the qr factorization */
-/*         of the final approximate jacobian, stored rowwise. */
-
-/*       lr is a positive integer input variable not less than */
-/*         (n*(n+1))/2. */
-
-/*       qtf is an output array of length n which contains */
-/*         the vector (q transpose)*fvec. */
-
-/*       wa1, wa2, wa3, and wa4 are work arrays of length n. */
-
-/*     subprograms called */
-
-/*       user-supplied ...... fcn */
-
-/*       minpack-supplied ... dogleg,dpmpar,enorm, */
-/*                            qform,qrfac,r1mpyq,r1updt */
-
-/*       fortran-supplied ... dabs,dmax1,dmin1,mod */
-
-/*     argonne national laboratory. minpack project. march 1980. */
-/*     burton s. garbow, kenneth e. hillstrom, jorge j. more */
-
-/*     ********** */
-    /* Parameter adjustments */
-    --wa4;
-    --wa3;
-    --wa2;
-    --wa1;
-    --qtf;
-    --diag;
-    --fvec;
-    --x;
-    fjac_dim1 = *ldfjac;
-    fjac_offset = 1 + fjac_dim1 * 1;
-    fjac -= fjac_offset;
-    --r__;
-
-    /* Function Body */
-
-/*     epsmch is the machine precision. */
-
-    epsmch = __minpack_func__(dpmpar)(&c__1);
-
-    *info = 0;
-    iflag = 0;
-    *nfev = 0;
-    *njev = 0;
-
-/*     check the input parameters for errors. */
-
-    if (*n <= 0 || *ldfjac < *n || *xtol < 0. || *maxfev <= 0 || *factor <= 
-	    0. || *lr < *n * (*n + 1) / 2) {
-	goto L300;
-    }
-    if (*mode != 2) {
-	goto L20;
-    }
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	if (diag[j] <= 0.) {
-	    goto L300;
-	}
-/* L10: */
-    }
-L20:
-
-/*     evaluate the function at the starting point */
-/*     and calculate its norm. */
-
-    iflag = 1;
-    fcnder_nn(n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, &iflag, user_data);
-    *nfev = 1;
-    if (iflag < 0) {
-	goto L300;
-    }
-    fnorm = __minpack_func__(enorm)(n, &fvec[1]);
-
-/*     initialize iteration counter and monitors. */
-
-    iter = 1;
-    ncsuc = 0;
-    ncfail = 0;
-    nslow1 = 0;
-    nslow2 = 0;
-
-/*     beginning of the outer loop. */
-
-L30:
-    jeval = TRUE_;
-
-/*        calculate the jacobian matrix. */
-
-    iflag = 2;
-    fcnder_nn(n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, &iflag, user_data);
-    ++(*njev);
-    if (iflag < 0) {
-	goto L300;
-    }
-
-/*        compute the qr factorization of the jacobian. */
-
-    __minpack_func__(qrfac)(n, n, &fjac[fjac_offset], ldfjac, &c_false, iwa, &c__1, &wa1[1], &
-	    wa2[1], &wa3[1]);
-
-/*        on the first iteration and if mode is 1, scale according */
-/*        to the norms of the columns of the initial jacobian. */
-
-    if (iter != 1) {
-	goto L70;
-    }
-    if (*mode == 2) {
-	goto L50;
-    }
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	diag[j] = wa2[j];
-	if (wa2[j] == 0.) {
-	    diag[j] = 1.;
-	}
-/* L40: */
-    }
-L50:
-
-/*        on the first iteration, calculate the norm of the scaled x */
-/*        and initialize the step bound delta. */
-
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	wa3[j] = diag[j] * x[j];
-/* L60: */
-    }
-    xnorm = __minpack_func__(enorm)(n, &wa3[1]);
-    delta = *factor * xnorm;
-    if (delta == 0.) {
-	delta = *factor;
-    }
-L70:
-
-/*        form (q transpose)*fvec and store in qtf. */
-
-    i__1 = *n;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-	qtf[i__] = fvec[i__];
-/* L80: */
-    }
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	if (fjac[j + j * fjac_dim1] == 0.) {
-	    goto L110;
-	}
-	sum = 0.;
-	i__2 = *n;
-	for (i__ = j; i__ <= i__2; ++i__) {
-	    sum += fjac[i__ + j * fjac_dim1] * qtf[i__];
-/* L90: */
-	}
-	temp = -sum / fjac[j + j * fjac_dim1];
-	i__2 = *n;
-	for (i__ = j; i__ <= i__2; ++i__) {
-	    qtf[i__] += fjac[i__ + j * fjac_dim1] * temp;
-/* L100: */
-	}
-L110:
-/* L120: */
-	;
-    }
-
-/*        copy the triangular factor of the qr factorization into r. */
-
-    sing = FALSE_;
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	l = j;
-	jm1 = j - 1;
-	if (jm1 < 1) {
-	    goto L140;
-	}
-	i__2 = jm1;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-	    r__[l] = fjac[i__ + j * fjac_dim1];
-	    l = l + *n - i__;
-/* L130: */
-	}
-L140:
-	r__[l] = wa1[j];
-	if (wa1[j] == 0.) {
-	    sing = TRUE_;
-	}
-/* L150: */
-    }
-
-/*        accumulate the orthogonal factor in fjac. */
-
-    __minpack_func__(qform)(n, n, &fjac[fjac_offset], ldfjac, &wa1[1]);
-
-/*        rescale if necessary. */
-
-    if (*mode == 2) {
-	goto L170;
-    }
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-/* Computing MAX */
-	d__1 = diag[j], d__2 = wa2[j];
-	diag[j] = max(d__1,d__2);
-/* L160: */
-    }
-L170:
-
-/*        beginning of the inner loop. */
-
-L180:
-
-/*           if requested, call fcn to enable printing of iterates. */
-
-    if (*nprint <= 0) {
-	goto L190;
-    }
-    iflag = 0;
-    if ((iter - 1) % *nprint == 0) {
-	fcnder_nn(n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, &iflag, user_data);
-    }
-    if (iflag < 0) {
-	goto L300;
-    }
-L190:
-
-/*           determine the direction p. */
-
-    __minpack_func__(dogleg)(n, &r__[1], lr, &diag[1], &qtf[1], &delta, &wa1[1], &wa2[1], &wa3[
-	    1]);
-
-/*           store the direction p and x + p. calculate the norm of p. */
-
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	wa1[j] = -wa1[j];
-	wa2[j] = x[j] + wa1[j];
-	wa3[j] = diag[j] * wa1[j];
-/* L200: */
-    }
-    pnorm = __minpack_func__(enorm)(n, &wa3[1]);
-
-/*           on the first iteration, adjust the initial step bound. */
-
-    if (iter == 1) {
-	delta = min(delta,pnorm);
-    }
-
-/*           evaluate the function at x + p and calculate its norm. */
-
-    iflag = 1;
-    fcnder_nn(n, &wa2[1], &wa4[1], &fjac[fjac_offset], ldfjac, &iflag, user_data);
-    ++(*nfev);
-    if (iflag < 0) {
-	goto L300;
-    }
-    fnorm1 = __minpack_func__(enorm)(n, &wa4[1]);
-
-/*           compute the scaled actual reduction. */
-
-    actred = -1.;
-    if (fnorm1 < fnorm) {
-/* Computing 2nd power */
-	d__1 = fnorm1 / fnorm;
-	actred = 1. - d__1 * d__1;
-    }
-
-/*           compute the scaled predicted reduction. */
-
-    l = 1;
-    i__1 = *n;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-	sum = 0.;
-	i__2 = *n;
-	for (j = i__; j <= i__2; ++j) {
-	    sum += r__[l] * wa1[j];
-	    ++l;
-/* L210: */
-	}
-	wa3[i__] = qtf[i__] + sum;
-/* L220: */
-    }
-    temp = __minpack_func__(enorm)(n, &wa3[1]);
-    prered = 0.;
-    if (temp < fnorm) {
-/* Computing 2nd power */
-	d__1 = temp / fnorm;
-	prered = 1. - d__1 * d__1;
-    }
-
-/*           compute the ratio of the actual to the predicted */
-/*           reduction. */
-
-    ratio = 0.;
-    if (prered > 0.) {
-	ratio = actred / prered;
-    }
-
-/*           update the step bound. */
-
-    if (ratio >= p1) {
-	goto L230;
-    }
-    ncsuc = 0;
-    ++ncfail;
-    delta = p5 * delta;
-    goto L240;
-L230:
-    ncfail = 0;
-    ++ncsuc;
-    if (ratio >= p5 || ncsuc > 1) {
-/* Computing MAX */
-	d__1 = delta, d__2 = pnorm / p5;
-	delta = max(d__1,d__2);
-    }
-    if (fabs(ratio - 1.) <= p1) {
-	delta = pnorm / p5;
-    }
-L240:
-
-/*           test for successful iteration. */
-
-    if (ratio < p0001) {
-	goto L260;
-    }
-
-/*           successful iteration. update x, fvec, and their norms. */
-
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	x[j] = wa2[j];
-	wa2[j] = diag[j] * x[j];
-	fvec[j] = wa4[j];
-/* L250: */
-    }
-    xnorm = __minpack_func__(enorm)(n, &wa2[1]);
-    fnorm = fnorm1;
-    ++iter;
-L260:
-
-/*           determine the progress of the iteration. */
-
-    ++nslow1;
-    if (actred >= p001) {
-	nslow1 = 0;
-    }
-    if (jeval) {
-	++nslow2;
-    }
-    if (actred >= p1) {
-	nslow2 = 0;
-    }
-
-/*           test for convergence. */
-
-    if (delta <= *xtol * xnorm || fnorm == 0.) {
-	*info = 1;
-    }
-    if (*info != 0) {
-	goto L300;
-    }
-
-/*           tests for termination and stringent tolerances. */
-
-    if (*nfev >= *maxfev) {
-	*info = 2;
-    }
-/* Computing MAX */
-    d__1 = p1 * delta;
-    if (p1 * max(d__1,pnorm) <= epsmch * xnorm) {
-	*info = 3;
-    }
-    if (nslow2 == 5) {
-	*info = 4;
-    }
-    if (nslow1 == 10) {
-	*info = 5;
-    }
-    if (*info != 0) {
-	goto L300;
-    }
-
-/*           criterion for recalculating jacobian. */
-
-    if (ncfail == 2) {
-	goto L290;
-    }
-
-/*           calculate the rank one modification to the jacobian */
-/*           and update qtf if necessary. */
-
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	sum = 0.;
-	i__2 = *n;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-	    sum += fjac[i__ + j * fjac_dim1] * wa4[i__];
-/* L270: */
-	}
-	wa2[j] = (sum - wa3[j]) / pnorm;
-	wa1[j] = diag[j] * (diag[j] * wa1[j] / pnorm);
-	if (ratio >= p0001) {
-	    qtf[j] = sum;
-	}
-/* L280: */
-    }
-
-/*           compute the qr factorization of the updated jacobian. */
-
-    __minpack_func__(r1updt)(n, n, &r__[1], lr, &wa1[1], &wa2[1], &wa3[1], &sing);
-    __minpack_func__(r1mpyq)(n, n, &fjac[fjac_offset], ldfjac, &wa2[1], &wa3[1]);
-    __minpack_func__(r1mpyq)(&c__1, n, &qtf[1], &c__1, &wa2[1], &wa3[1]);
-
-/*           end of the inner loop. */
-
-    jeval = FALSE_;
-    goto L180;
-L290:
-
-/*        end of the outer loop. */
-
-    goto L30;
-L300:
-
-/*     termination, either normal or user imposed. */
-
-    if (iflag < 0) {
-	*info = iflag;
-    }
-    iflag = 0;
-    if (*nprint > 0) {
-	fcnder_nn(n, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac, &iflag, user_data);
-    }
-    return;
-
-/*     last card of subroutine hybrj. */
-
-} /* hybrj_ */
-

+ 0 - 19
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/i_nint.c

@@ -1,19 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-integer i_nint(x) real *x;
-#else
-#undef abs
-#include "math.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-integer i_nint(real *x)
-#endif
-{
-return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
-}
-#ifdef __cplusplus
-}
-#endif

+ 0 - 93
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/idamax.c

@@ -1,93 +0,0 @@
-/* idamax.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-  on Microsoft Windows system, link with libf2c.lib;
-  on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-  or, if you install libf2c.a in a standard place, with -lf2c -lm
-  -- in that order, at the end of the command line, as in
-    cc *.o -lf2c -lm
-  Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-    http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-integer idamax_(integer *n, doublereal *dx, integer *incx)
-{
-    /* System generated locals */
-    integer ret_val, i__1;
-    doublereal d__1;
-
-    /* Local variables */
-    integer i__, ix;
-    doublereal dmax__;
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-/*     .. Array Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*     finds the index of element having max. absolute value. */
-/*     jack dongarra, linpack, 3/11/78. */
-/*     modified 3/93 to return if incx .le. 0. */
-/*     modified 12/3/93, array(1) declarations changed to array(*) */
-
-
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-    /* Parameter adjustments */
-    --dx;
-
-    /* Function Body */
-    ret_val = 0;
-    if (*n < 1 || *incx <= 0) {
-  return ret_val;
-    }
-    ret_val = 1;
-    if (*n == 1) {
-  return ret_val;
-    }
-    if (*incx == 1) {
-  goto L20;
-    }
-
-/*        code for increment not equal to 1 */
-
-    ix = 1;
-    dmax__ = fabs(dx[1]);
-    ix += *incx;
-    i__1 = *n;
-    for (i__ = 2; i__ <= i__1; ++i__) {
-  if ((d__1 = dx[ix], fabs(d__1)) <= dmax__) {
-      goto L5;
-  }
-  ret_val = i__;
-  dmax__ = (d__1 = dx[ix], fabs(d__1));
-L5:
-  ix += *incx;
-/* L10: */
-    }
-    return ret_val;
-
-/*        code for increment equal to 1 */
-
-L20:
-    dmax__ = fabs(dx[1]);
-    i__1 = *n;
-    for (i__ = 2; i__ <= i__1; ++i__) {
-  if ((d__1 = dx[i__], fabs(d__1)) <= dmax__) {
-      goto L30;
-  }
-  ret_val = i__;
-  dmax__ = (d__1 = dx[i__], fabs(d__1));
-L30:
-  ;
-    }
-    return ret_val;
-} /* idamax_ */

+ 0 - 166
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/ieeeck.c

@@ -1,166 +0,0 @@
-/* ieeeck.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-integer ieeeck_(integer *ispec, real *zero, real *one)
-{
-    /* System generated locals */
-    integer ret_val;
-
-    /* Local variables */
-    real nan1, nan2, nan3, nan4, nan5, nan6, neginf, posinf, negzro, newzro;
-
-
-/*  -- LAPACK auxiliary routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  IEEECK is called from the ILAENV to verify that Infinity and */
-/*  possibly NaN arithmetic is safe (i.e. will not trap). */
-
-/*  Arguments */
-/*  ========= */
-
-/*  ISPEC   (input) INTEGER */
-/*          Specifies whether to test just for inifinity arithmetic */
-/*          or whether to test for infinity and NaN arithmetic. */
-/*          = 0: Verify infinity arithmetic only. */
-/*          = 1: Verify infinity and NaN arithmetic. */
-
-/*  ZERO    (input) REAL */
-/*          Must contain the value 0.0 */
-/*          This is passed to prevent the compiler from optimizing */
-/*          away this code. */
-
-/*  ONE     (input) REAL */
-/*          Must contain the value 1.0 */
-/*          This is passed to prevent the compiler from optimizing */
-/*          away this code. */
-
-/*  RETURN VALUE:  INTEGER */
-/*          = 0:  Arithmetic failed to produce the correct answers */
-/*          = 1:  Arithmetic produced the correct answers */
-
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Executable Statements .. */
-    ret_val = 1;
-
-    posinf = *one / *zero;
-    if (posinf <= *one) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    neginf = -(*one) / *zero;
-    if (neginf >= *zero) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    negzro = *one / (neginf + *one);
-    if (negzro != *zero) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    neginf = *one / negzro;
-    if (neginf >= *zero) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    newzro = negzro + *zero;
-    if (newzro != *zero) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    posinf = *one / newzro;
-    if (posinf <= *one) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    neginf *= posinf;
-    if (neginf >= *zero) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    posinf *= posinf;
-    if (posinf <= *one) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-
-
-
-/*     Return if we were only asked to check infinity arithmetic */
-
-    if (*ispec == 0) {
-	return ret_val;
-    }
-
-    nan1 = posinf + neginf;
-
-    nan2 = posinf / neginf;
-
-    nan3 = posinf / posinf;
-
-    nan4 = posinf * *zero;
-
-    nan5 = neginf * negzro;
-
-    nan6 = nan5 * 0.f;
-
-    if (nan1 == nan1) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    if (nan2 == nan2) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    if (nan3 == nan3) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    if (nan4 == nan4) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    if (nan5 == nan5) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    if (nan6 == nan6) {
-	ret_val = 0;
-	return ret_val;
-    }
-
-    return ret_val;
-} /* ieeeck_ */

+ 0 - 654
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/ilaenv.c

@@ -1,654 +0,0 @@
-/* ilaenv.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-#include "string.h"
-
-/* Table of constant values */
-
-static integer c__1 = 1;
-static real c_b163 = 0.f;
-static real c_b164 = 1.f;
-static integer c__0 = 0;
-
-integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1, 
-	integer *n2, integer *n3, integer *n4)
-{
-    /* System generated locals */
-    integer ret_val;
-
-    /* Builtin functions */
-    /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
-    integer s_cmp(char *, char *, ftnlen, ftnlen);
-
-    /* Local variables */
-    integer i__;
-    char c1[1], c2[1], c3[1], c4[1];
-    integer ic, nb, iz, nx;
-    logical cname;
-    integer nbmin;
-    logical sname;
-    extern integer ieeeck_(integer *, real *, real *);
-    char subnam[1];
-    extern integer iparmq_(integer *, char *, char *, integer *, integer *, 
-	    integer *, integer *);
-
-    ftnlen name_len, opts_len;
-
-    name_len = strlen (name__);
-    opts_len = strlen (opts);
-
-/*  -- LAPACK auxiliary routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     January 2007 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  ILAENV is called from the LAPACK routines to choose problem-dependent */
-/*  parameters for the local environment.  See ISPEC for a description of */
-/*  the parameters. */
-
-/*  ILAENV returns an INTEGER */
-/*  if ILAENV >= 0: ILAENV returns the value of the parameter specified by ISPEC */
-/*  if ILAENV < 0:  if ILAENV = -k, the k-th argument had an illegal value. */
-
-/*  This version provides a set of parameters which should give good, */
-/*  but not optimal, performance on many of the currently available */
-/*  computers.  Users are encouraged to modify this subroutine to set */
-/*  the tuning parameters for their particular machine using the option */
-/*  and problem size information in the arguments. */
-
-/*  This routine will not function correctly if it is converted to all */
-/*  lower case.  Converting it to all upper case is allowed. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  ISPEC   (input) INTEGER */
-/*          Specifies the parameter to be returned as the value of */
-/*          ILAENV. */
-/*          = 1: the optimal blocksize; if this value is 1, an unblocked */
-/*               algorithm will give the best performance. */
-/*          = 2: the minimum block size for which the block routine */
-/*               should be used; if the usable block size is less than */
-/*               this value, an unblocked routine should be used. */
-/*          = 3: the crossover point (in a block routine, for N less */
-/*               than this value, an unblocked routine should be used) */
-/*          = 4: the number of shifts, used in the nonsymmetric */
-/*               eigenvalue routines (DEPRECATED) */
-/*          = 5: the minimum column dimension for blocking to be used; */
-/*               rectangular blocks must have dimension at least k by m, */
-/*               where k is given by ILAENV(2,...) and m by ILAENV(5,...) */
-/*          = 6: the crossover point for the SVD (when reducing an m by n */
-/*               matrix to bidiagonal form, if lmax(m,n)/min(m,n) exceeds */
-/*               this value, a QR factorization is used first to reduce */
-/*               the matrix to a triangular form.) */
-/*          = 7: the number of processors */
-/*          = 8: the crossover point for the multishift QR method */
-/*               for nonsymmetric eigenvalue problems (DEPRECATED) */
-/*          = 9: maximum size of the subproblems at the bottom of the */
-/*               computation tree in the divide-and-conquer algorithm */
-/*               (used by xGELSD and xGESDD) */
-/*          =10: ieee NaN arithmetic can be trusted not to trap */
-/*          =11: infinity arithmetic can be trusted not to trap */
-/*          12 <= ISPEC <= 16: */
-/*               xHSEQR or one of its subroutines, */
-/*               see IPARMQ for detailed explanation */
-
-/*  NAME    (input) CHARACTER*(*) */
-/*          The name of the calling subroutine, in either upper case or */
-/*          lower case. */
-
-/*  OPTS    (input) CHARACTER*(*) */
-/*          The character options to the subroutine NAME, concatenated */
-/*          into a single character string.  For example, UPLO = 'U', */
-/*          TRANS = 'T', and DIAG = 'N' for a triangular routine would */
-/*          be specified as OPTS = 'UTN'. */
-
-/*  N1      (input) INTEGER */
-/*  N2      (input) INTEGER */
-/*  N3      (input) INTEGER */
-/*  N4      (input) INTEGER */
-/*          Problem dimensions for the subroutine NAME; these may not all */
-/*          be required. */
-
-/*  Further Details */
-/*  =============== */
-
-/*  The following conventions have been used when calling ILAENV from the */
-/*  LAPACK routines: */
-/*  1)  OPTS is a concatenation of all of the character options to */
-/*      subroutine NAME, in the same order that they appear in the */
-/*      argument list for NAME, even if they are not used in determining */
-/*      the value of the parameter specified by ISPEC. */
-/*  2)  The problem dimensions N1, N2, N3, N4 are specified in the order */
-/*      that they appear in the argument list for NAME.  N1 is used */
-/*      first, N2 second, and so on, and unused problem dimensions are */
-/*      passed a value of -1. */
-/*  3)  The parameter value returned by ILAENV is checked for validity in */
-/*      the calling subroutine.  For example, ILAENV is used to retrieve */
-/*      the optimal blocksize for STRTRI as follows: */
-
-/*      NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) */
-/*      IF( NB.LE.1 ) NB = MAX( 1, N ) */
-
-/*  ===================================================================== */
-
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. External Functions .. */
-/*     .. */
-/*     .. Executable Statements .. */
-
-    switch (*ispec) {
-	case 1:  goto L10;
-	case 2:  goto L10;
-	case 3:  goto L10;
-	case 4:  goto L80;
-	case 5:  goto L90;
-	case 6:  goto L100;
-	case 7:  goto L110;
-	case 8:  goto L120;
-	case 9:  goto L130;
-	case 10:  goto L140;
-	case 11:  goto L150;
-	case 12:  goto L160;
-	case 13:  goto L160;
-	case 14:  goto L160;
-	case 15:  goto L160;
-	case 16:  goto L160;
-    }
-
-/*     Invalid value for ISPEC */
-
-    ret_val = -1;
-    return ret_val;
-
-L10:
-
-/*     Convert NAME to upper case if the first character is lower case. */
-
-    ret_val = 1;
-    s_copy(subnam, name__, (ftnlen)1, name_len);
-    ic = *(unsigned char *)subnam;
-    iz = 'Z';
-    if (iz == 90 || iz == 122) {
-
-/*        ASCII character set */
-
-	if (ic >= 97 && ic <= 122) {
-	    *(unsigned char *)subnam = (char) (ic - 32);
-	    for (i__ = 2; i__ <= 6; ++i__) {
-		ic = *(unsigned char *)&subnam[i__ - 1];
-		if (ic >= 97 && ic <= 122) {
-		    *(unsigned char *)&subnam[i__ - 1] = (char) (ic - 32);
-		}
-/* L20: */
-	    }
-	}
-
-    } else if (iz == 233 || iz == 169) {
-
-/*        EBCDIC character set */
-
-	if (ic >= 129 && ic <= 137 || ic >= 145 && ic <= 153 || ic >= 162 && 
-		ic <= 169) {
-	    *(unsigned char *)subnam = (char) (ic + 64);
-	    for (i__ = 2; i__ <= 6; ++i__) {
-		ic = *(unsigned char *)&subnam[i__ - 1];
-		if (ic >= 129 && ic <= 137 || ic >= 145 && ic <= 153 || ic >= 
-			162 && ic <= 169) {
-		    *(unsigned char *)&subnam[i__ - 1] = (char) (ic + 64);
-		}
-/* L30: */
-	    }
-	}
-
-    } else if (iz == 218 || iz == 250) {
-
-/*        Prime machines:  ASCII+128 */
-
-	if (ic >= 225 && ic <= 250) {
-	    *(unsigned char *)subnam = (char) (ic - 32);
-	    for (i__ = 2; i__ <= 6; ++i__) {
-		ic = *(unsigned char *)&subnam[i__ - 1];
-		if (ic >= 225 && ic <= 250) {
-		    *(unsigned char *)&subnam[i__ - 1] = (char) (ic - 32);
-		}
-/* L40: */
-	    }
-	}
-    }
-
-    *(unsigned char *)c1 = *(unsigned char *)subnam;
-    sname = *(unsigned char *)c1 == 'S' || *(unsigned char *)c1 == 'D';
-    cname = *(unsigned char *)c1 == 'C' || *(unsigned char *)c1 == 'Z';
-    if (! (cname || sname)) {
-	return ret_val;
-    }
-    s_copy(c2, subnam + 1, (ftnlen)1, (ftnlen)2);
-    s_copy(c3, subnam + 3, (ftnlen)1, (ftnlen)3);
-    s_copy(c4, c3 + 1, (ftnlen)1, (ftnlen)2);
-
-    switch (*ispec) {
-	case 1:  goto L50;
-	case 2:  goto L60;
-	case 3:  goto L70;
-    }
-
-L50:
-
-/*     ISPEC = 1:  block size */
-
-/*     In these examples, separate code is provided for setting NB for */
-/*     real and complex.  We assume that NB will take the same value in */
-/*     single or double precision. */
-
-    nb = 1;
-
-    if (s_cmp(c2, "GE", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRF", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 64;
-	    } else {
-		nb = 64;
-	    }
-	} else if (s_cmp(c3, "QRF", (ftnlen)1, (ftnlen)3) == 0 || s_cmp(c3, 
-		"RQF", (ftnlen)1, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)
-		1, (ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)1, (ftnlen)3) 
-		== 0) {
-	    if (sname) {
-		nb = 32;
-	    } else {
-		nb = 32;
-	    }
-	} else if (s_cmp(c3, "HRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 32;
-	    } else {
-		nb = 32;
-	    }
-	} else if (s_cmp(c3, "BRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 32;
-	    } else {
-		nb = 32;
-	    }
-	} else if (s_cmp(c3, "TRI", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 64;
-	    } else {
-		nb = 64;
-	    }
-	}
-    } else if (s_cmp(c2, "PO", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRF", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 64;
-	    } else {
-		nb = 64;
-	    }
-	}
-    } else if (s_cmp(c2, "SY", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRF", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 64;
-	    } else {
-		nb = 64;
-	    }
-	} else if (sname && s_cmp(c3, "TRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    nb = 32;
-	} else if (sname && s_cmp(c3, "GST", (ftnlen)1, (ftnlen)3) == 0) {
-	    nb = 64;
-	}
-    } else if (cname && s_cmp(c2, "HE", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRF", (ftnlen)1, (ftnlen)3) == 0) {
-	    nb = 64;
-	} else if (s_cmp(c3, "TRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    nb = 32;
-	} else if (s_cmp(c3, "GST", (ftnlen)1, (ftnlen)3) == 0) {
-	    nb = 64;
-	}
-    } else if (sname && s_cmp(c2, "OR", (ftnlen)1, (ftnlen)2) == 0) {
-	if (*(unsigned char *)c3 == 'G') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nb = 32;
-	    }
-	} else if (*(unsigned char *)c3 == 'M') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nb = 32;
-	    }
-	}
-    } else if (cname && s_cmp(c2, "UN", (ftnlen)1, (ftnlen)2) == 0) {
-	if (*(unsigned char *)c3 == 'G') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nb = 32;
-	    }
-	} else if (*(unsigned char *)c3 == 'M') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nb = 32;
-	    }
-	}
-    } else if (s_cmp(c2, "GB", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRF", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		if (*n4 <= 64) {
-		    nb = 1;
-		} else {
-		    nb = 32;
-		}
-	    } else {
-		if (*n4 <= 64) {
-		    nb = 1;
-		} else {
-		    nb = 32;
-		}
-	    }
-	}
-    } else if (s_cmp(c2, "PB", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRF", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		if (*n2 <= 64) {
-		    nb = 1;
-		} else {
-		    nb = 32;
-		}
-	    } else {
-		if (*n2 <= 64) {
-		    nb = 1;
-		} else {
-		    nb = 32;
-		}
-	    }
-	}
-    } else if (s_cmp(c2, "TR", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRI", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 64;
-	    } else {
-		nb = 64;
-	    }
-	}
-    } else if (s_cmp(c2, "LA", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "UUM", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nb = 64;
-	    } else {
-		nb = 64;
-	    }
-	}
-    } else if (sname && s_cmp(c2, "ST", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "EBZ", (ftnlen)1, (ftnlen)3) == 0) {
-	    nb = 1;
-	}
-    }
-    ret_val = nb;
-    return ret_val;
-
-L60:
-
-/*     ISPEC = 2:  minimum block size */
-
-    nbmin = 2;
-    if (s_cmp(c2, "GE", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "QRF", (ftnlen)1, (ftnlen)3) == 0 || s_cmp(c3, "RQF", (
-		ftnlen)1, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)1, (
-		ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)1, (ftnlen)3) == 0)
-		 {
-	    if (sname) {
-		nbmin = 2;
-	    } else {
-		nbmin = 2;
-	    }
-	} else if (s_cmp(c3, "HRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nbmin = 2;
-	    } else {
-		nbmin = 2;
-	    }
-	} else if (s_cmp(c3, "BRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nbmin = 2;
-	    } else {
-		nbmin = 2;
-	    }
-	} else if (s_cmp(c3, "TRI", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nbmin = 2;
-	    } else {
-		nbmin = 2;
-	    }
-	}
-    } else if (s_cmp(c2, "SY", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRF", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nbmin = 8;
-	    } else {
-		nbmin = 8;
-	    }
-	} else if (sname && s_cmp(c3, "TRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    nbmin = 2;
-	}
-    } else if (cname && s_cmp(c2, "HE", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    nbmin = 2;
-	}
-    } else if (sname && s_cmp(c2, "OR", (ftnlen)1, (ftnlen)2) == 0) {
-	if (*(unsigned char *)c3 == 'G') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nbmin = 2;
-	    }
-	} else if (*(unsigned char *)c3 == 'M') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nbmin = 2;
-	    }
-	}
-    } else if (cname && s_cmp(c2, "UN", (ftnlen)1, (ftnlen)2) == 0) {
-	if (*(unsigned char *)c3 == 'G') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nbmin = 2;
-	    }
-	} else if (*(unsigned char *)c3 == 'M') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nbmin = 2;
-	    }
-	}
-    }
-    ret_val = nbmin;
-    return ret_val;
-
-L70:
-
-/*     ISPEC = 3:  crossover point */
-
-    nx = 0;
-    if (s_cmp(c2, "GE", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "QRF", (ftnlen)1, (ftnlen)3) == 0 || s_cmp(c3, "RQF", (
-		ftnlen)1, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)1, (
-		ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)1, (ftnlen)3) == 0)
-		 {
-	    if (sname) {
-		nx = 128;
-	    } else {
-		nx = 128;
-	    }
-	} else if (s_cmp(c3, "HRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nx = 128;
-	    } else {
-		nx = 128;
-	    }
-	} else if (s_cmp(c3, "BRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    if (sname) {
-		nx = 128;
-	    } else {
-		nx = 128;
-	    }
-	}
-    } else if (s_cmp(c2, "SY", (ftnlen)1, (ftnlen)2) == 0) {
-	if (sname && s_cmp(c3, "TRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    nx = 32;
-	}
-    } else if (cname && s_cmp(c2, "HE", (ftnlen)1, (ftnlen)2) == 0) {
-	if (s_cmp(c3, "TRD", (ftnlen)1, (ftnlen)3) == 0) {
-	    nx = 32;
-	}
-    } else if (sname && s_cmp(c2, "OR", (ftnlen)1, (ftnlen)2) == 0) {
-	if (*(unsigned char *)c3 == 'G') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nx = 128;
-	    }
-	}
-    } else if (cname && s_cmp(c2, "UN", (ftnlen)1, (ftnlen)2) == 0) {
-	if (*(unsigned char *)c3 == 'G') {
-	    if (s_cmp(c4, "QR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
-		    (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)1, (
-		    ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)1, (ftnlen)2) ==
-		     0 || s_cmp(c4, "HR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(
-		    c4, "TR", (ftnlen)1, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
-		    ftnlen)1, (ftnlen)2) == 0) {
-		nx = 128;
-	    }
-	}
-    }
-    ret_val = nx;
-    return ret_val;
-
-L80:
-
-/*     ISPEC = 4:  number of shifts (used by xHSEQR) */
-
-    ret_val = 6;
-    return ret_val;
-
-L90:
-
-/*     ISPEC = 5:  minimum column dimension (not used) */
-
-    ret_val = 2;
-    return ret_val;
-
-L100:
-
-/*     ISPEC = 6:  crossover point for SVD (used by xGELSS and xGESVD) */
-
-    ret_val = (integer) ((real) lmin(*n1,*n2) * 1.6f);
-    return ret_val;
-
-L110:
-
-/*     ISPEC = 7:  number of processors (not used) */
-
-    ret_val = 1;
-    return ret_val;
-
-L120:
-
-/*     ISPEC = 8:  crossover point for multishift (used by xHSEQR) */
-
-    ret_val = 50;
-    return ret_val;
-
-L130:
-
-/*     ISPEC = 9:  maximum size of the subproblems at the bottom of the */
-/*                 computation tree in the divide-and-conquer algorithm */
-/*                 (used by xGELSD and xGESDD) */
-
-    ret_val = 25;
-    return ret_val;
-
-L140:
-
-/*     ISPEC = 10: ieee NaN arithmetic can be trusted not to trap */
-
-/*     ILAENV = 0 */
-    ret_val = 1;
-    if (ret_val == 1) {
-	ret_val = ieeeck_(&c__1, &c_b163, &c_b164);
-    }
-    return ret_val;
-
-L150:
-
-/*     ISPEC = 11: infinity arithmetic can be trusted not to trap */
-
-/*     ILAENV = 0 */
-    ret_val = 1;
-    if (ret_val == 1) {
-	ret_val = ieeeck_(&c__0, &c_b163, &c_b164);
-    }
-    return ret_val;
-
-L160:
-
-/*     12 <= ISPEC <= 16: xHSEQR or one of its subroutines. */
-
-    ret_val = iparmq_(ispec, name__, opts, n1, n2, n3, n4)
-	    ;
-    return ret_val;
-
-/*     End of ILAENV */
-
-} /* ilaenv_ */

+ 0 - 282
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/iparmq.c

@@ -1,282 +0,0 @@
-/* iparmq.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-integer iparmq_(integer *ispec, char *name__, char *opts, integer *n, integer 
-	*ilo, integer *ihi, integer *lwork)
-{
-    /* System generated locals */
-    integer ret_val, i__1, i__2;
-    real r__1;
-
-    /* Builtin functions */
-    double log(doublereal);
-    integer i_nint(real *);
-
-    /* Local variables */
-    integer nh, ns;
-
-
-/*  -- LAPACK auxiliary routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*       This program sets problem and machine dependent parameters */
-/*       useful for xHSEQR and its subroutines. It is called whenever */
-/*       ILAENV is called with 12 <= ISPEC <= 16 */
-
-/*  Arguments */
-/*  ========= */
-
-/*       ISPEC  (input) integer scalar */
-/*              ISPEC specifies which tunable parameter IPARMQ should */
-/*              return. */
-
-/*              ISPEC=12: (INMIN)  Matrices of order nmin or less */
-/*                        are sent directly to xLAHQR, the implicit */
-/*                        double shift QR algorithm.  NMIN must be */
-/*                        at least 11. */
-
-/*              ISPEC=13: (INWIN)  Size of the deflation window. */
-/*                        This is best set greater than or equal to */
-/*                        the number of simultaneous shifts NS. */
-/*                        Larger matrices benefit from larger deflation */
-/*                        windows. */
-
-/*              ISPEC=14: (INIBL) Determines when to stop nibbling and */
-/*                        invest in an (expensive) multi-shift QR sweep. */
-/*                        If the aggressive early deflation subroutine */
-/*                        finds LD converged eigenvalues from an order */
-/*                        NW deflation window and LD.GT.(NW*NIBBLE)/100, */
-/*                        then the next QR sweep is skipped and early */
-/*                        deflation is applied immediately to the */
-/*                        remaining active diagonal block.  Setting */
-/*                        IPARMQ(ISPEC=14) = 0 causes TTQRE to skip a */
-/*                        multi-shift QR sweep whenever early deflation */
-/*                        finds a converged eigenvalue.  Setting */
-/*                        IPARMQ(ISPEC=14) greater than or equal to 100 */
-/*                        prevents TTQRE from skipping a multi-shift */
-/*                        QR sweep. */
-
-/*              ISPEC=15: (NSHFTS) The number of simultaneous shifts in */
-/*                        a multi-shift QR iteration. */
-
-/*              ISPEC=16: (IACC22) IPARMQ is set to 0, 1 or 2 with the */
-/*                        following meanings. */
-/*                        0:  During the multi-shift QR sweep, */
-/*                            xLAQR5 does not accumulate reflections and */
-/*                            does not use matrix-matrix multiply to */
-/*                            update the far-from-diagonal matrix */
-/*                            entries. */
-/*                        1:  During the multi-shift QR sweep, */
-/*                            xLAQR5 and/or xLAQRaccumulates reflections and uses */
-/*                            matrix-matrix multiply to update the */
-/*                            far-from-diagonal matrix entries. */
-/*                        2:  During the multi-shift QR sweep. */
-/*                            xLAQR5 accumulates reflections and takes */
-/*                            advantage of 2-by-2 block structure during */
-/*                            matrix-matrix multiplies. */
-/*                        (If xTRMM is slower than xGEMM, then */
-/*                        IPARMQ(ISPEC=16)=1 may be more efficient than */
-/*                        IPARMQ(ISPEC=16)=2 despite the greater level of */
-/*                        arithmetic work implied by the latter choice.) */
-
-/*       NAME    (input) character string */
-/*               Name of the calling subroutine */
-
-/*       OPTS    (input) character string */
-/*               This is a concatenation of the string arguments to */
-/*               TTQRE. */
-
-/*       N       (input) integer scalar */
-/*               N is the order of the Hessenberg matrix H. */
-
-/*       ILO     (input) INTEGER */
-/*       IHI     (input) INTEGER */
-/*               It is assumed that H is already upper triangular */
-/*               in rows and columns 1:ILO-1 and IHI+1:N. */
-
-/*       LWORK   (input) integer scalar */
-/*               The amount of workspace available. */
-
-/*  Further Details */
-/*  =============== */
-
-/*       Little is known about how best to choose these parameters. */
-/*       It is possible to use different values of the parameters */
-/*       for each of CHSEQR, DHSEQR, SHSEQR and ZHSEQR. */
-
-/*       It is probably best to choose different parameters for */
-/*       different matrices and different parameters at different */
-/*       times during the iteration, but this has not been */
-/*       implemented --- yet. */
-
-
-/*       The best choices of most of the parameters depend */
-/*       in an ill-understood way on the relative execution */
-/*       rate of xLAQR3 and xLAQR5 and on the nature of each */
-/*       particular eigenvalue problem.  Experiment may be the */
-/*       only practical way to determine which choices are most */
-/*       effective. */
-
-/*       Following is a list of default values supplied by IPARMQ. */
-/*       These defaults may be adjusted in order to attain better */
-/*       performance in any particular computational environment. */
-
-/*       IPARMQ(ISPEC=12) The xLAHQR vs xLAQR0 crossover point. */
-/*                        Default: 75. (Must be at least 11.) */
-
-/*       IPARMQ(ISPEC=13) Recommended deflation window size. */
-/*                        This depends on ILO, IHI and NS, the */
-/*                        number of simultaneous shifts returned */
-/*                        by IPARMQ(ISPEC=15).  The default for */
-/*                        (IHI-ILO+1).LE.500 is NS.  The default */
-/*                        for (IHI-ILO+1).GT.500 is 3*NS/2. */
-
-/*       IPARMQ(ISPEC=14) Nibble crossover point.  Default: 14. */
-
-/*       IPARMQ(ISPEC=15) Number of simultaneous shifts, NS. */
-/*                        a multi-shift QR iteration. */
-
-/*                        If IHI-ILO+1 is ... */
-
-/*                        greater than      ...but less    ... the */
-/*                        or equal to ...      than        default is */
-
-/*                                0               30       NS =   2+ */
-/*                               30               60       NS =   4+ */
-/*                               60              150       NS =  10 */
-/*                              150              590       NS =  ** */
-/*                              590             3000       NS =  64 */
-/*                             3000             6000       NS = 128 */
-/*                             6000             infinity   NS = 256 */
-
-/*                    (+)  By default matrices of this order are */
-/*                         passed to the implicit double shift routine */
-/*                         xLAHQR.  See IPARMQ(ISPEC=12) above.   These */
-/*                         values of NS are used only in case of a rare */
-/*                         xLAHQR failure. */
-
-/*                    (**) The asterisks (**) indicate an ad-hoc */
-/*                         function increasing from 10 to 64. */
-
-/*       IPARMQ(ISPEC=16) Select structured matrix multiply. */
-/*                        (See ISPEC=16 above for details.) */
-/*                        Default: 3. */
-
-/*     ================================================================ */
-/*     .. Parameters .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Executable Statements .. */
-    if (*ispec == 15 || *ispec == 13 || *ispec == 16) {
-
-/*        ==== Set the number simultaneous shifts ==== */
-
-	nh = *ihi - *ilo + 1;
-	ns = 2;
-	if (nh >= 30) {
-	    ns = 4;
-	}
-	if (nh >= 60) {
-	    ns = 10;
-	}
-	if (nh >= 150) {
-/* Computing MAX */
-	    r__1 = log((real) nh) / log(2.f);
-	    i__1 = 10, i__2 = nh / i_nint(&r__1);
-	    ns = lmax(i__1,i__2);
-	}
-	if (nh >= 590) {
-	    ns = 64;
-	}
-	if (nh >= 3000) {
-	    ns = 128;
-	}
-	if (nh >= 6000) {
-	    ns = 256;
-	}
-/* Computing MAX */
-	i__1 = 2, i__2 = ns - ns % 2;
-	ns = lmax(i__1,i__2);
-    }
-
-    if (*ispec == 12) {
-
-
-/*        ===== Matrices of order smaller than NMIN get sent */
-/*        .     to xLAHQR, the classic double shift algorithm. */
-/*        .     This must be at least 11. ==== */
-
-	ret_val = 75;
-
-    } else if (*ispec == 14) {
-
-/*        ==== INIBL: skip a multi-shift qr iteration and */
-/*        .    whenever aggressive early deflation finds */
-/*        .    at least (NIBBLE*(window size)/100) deflations. ==== */
-
-	ret_val = 14;
-
-    } else if (*ispec == 15) {
-
-/*        ==== NSHFTS: The number of simultaneous shifts ===== */
-
-	ret_val = ns;
-
-    } else if (*ispec == 13) {
-
-/*        ==== NW: deflation window size.  ==== */
-
-	if (nh <= 500) {
-	    ret_val = ns;
-	} else {
-	    ret_val = ns * 3 / 2;
-	}
-
-    } else if (*ispec == 16) {
-
-/*        ==== IACC22: Whether to accumulate reflections */
-/*        .     before updating the far-from-diagonal elements */
-/*        .     and whether to use 2-by-2 block structure while */
-/*        .     doing it.  A small amount of work could be saved */
-/*        .     by making this choice dependent also upon the */
-/*        .     NH=IHI-ILO+1. */
-
-	ret_val = 0;
-	if (ns >= 14) {
-	    ret_val = 1;
-	}
-	if (ns >= 14) {
-	    ret_val = 2;
-	}
-
-    } else {
-/*        ===== invalid value of ispec ===== */
-	ret_val = -1;
-
-    }
-
-/*     ==== End of IPARMQ ==== */
-
-    return ret_val;
-} /* iparmq_ */

+ 0 - 117
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/lsame.c

@@ -1,117 +0,0 @@
-/* lsame.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-	on Microsoft Windows system, link with libf2c.lib;
-	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-	or, if you install libf2c.a in a standard place, with -lf2c -lm
-	-- in that order, at the end of the command line, as in
-		cc *.o -lf2c -lm
-	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-		http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-
-logical lsame_(char *ca, char *cb)
-{
-    /* System generated locals */
-    logical ret_val;
-
-    /* Local variables */
-    integer inta, intb, zcode;
-
-
-/*  -- LAPACK auxiliary routine (version 3.1) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  LSAME returns .TRUE. if CA is the same letter as CB regardless of */
-/*  case. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  CA      (input) CHARACTER*1 */
-
-/*  CB      (input) CHARACTER*1 */
-/*          CA and CB specify the single characters to be compared. */
-
-/* ===================================================================== */
-
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Local Scalars .. */
-/*     .. */
-
-/*     Test if the characters are equal */
-
-    ret_val = *(unsigned char *)ca == *(unsigned char *)cb;
-    if (ret_val) {
-	return ret_val;
-    }
-
-/*     Now test for equivalence if both characters are alphabetic. */
-
-    zcode = 'Z';
-
-/*     Use 'Z' rather than 'A' so that ASCII can be detected on Prime */
-/*     machines, on which ICHAR returns a value with bit 8 set. */
-/*     ICHAR('A') on Prime machines returns 193 which is the same as */
-/*     ICHAR('A') on an EBCDIC machine. */
-
-    inta = *(unsigned char *)ca;
-    intb = *(unsigned char *)cb;
-
-    if (zcode == 90 || zcode == 122) {
-
-/*        ASCII is assumed - ZCODE is the ASCII code of either lower or */
-/*        upper case 'Z'. */
-
-	if (inta >= 97 && inta <= 122) {
-	    inta += -32;
-	}
-	if (intb >= 97 && intb <= 122) {
-	    intb += -32;
-	}
-
-    } else if (zcode == 233 || zcode == 169) {
-
-/*        EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or */
-/*        upper case 'Z'. */
-
-	if (inta >= 129 && inta <= 137 || inta >= 145 && inta <= 153 || inta 
-		>= 162 && inta <= 169) {
-	    inta += 64;
-	}
-	if (intb >= 129 && intb <= 137 || intb >= 145 && intb <= 153 || intb 
-		>= 162 && intb <= 169) {
-	    intb += 64;
-	}
-
-    } else if (zcode == 218 || zcode == 250) {
-
-/*        ASCII is assumed, on Prime machines - ZCODE is the ASCII code */
-/*        plus 128 of either lower or upper case 'Z'. */
-
-	if (inta >= 225 && inta <= 250) {
-	    inta += -32;
-	}
-	if (intb >= 225 && intb <= 250) {
-	    intb += -32;
-	}
-    }
-    ret_val = inta == intb;
-
-/*     RETURN */
-
-/*     End of LSAME */
-
-    return ret_val;
-} /* lsame_ */

+ 0 - 301
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/minpack.h

@@ -1,301 +0,0 @@
-#ifndef __MINPACK_H__
-#define __MINPACK_H__
-
-#include "cminpack.h"
-
-/* The default floating-point type is "double" for C/C++ and "float" for CUDA,
-   but you can change this by defining one of the following symbols when
-   compiling the library, and before including cminpack.h when using it:
-   __cminpack_double__ for double
-   __cminpack_float__ for float
-   __cminpack_half__ for half from the OpenEXR library (in this case, you must
-                     compile cminpack with a C++ compiler)
-*/
-#ifdef __cminpack_double__
-#define __minpack_func__(func) func ## _
-#endif
-
-#ifdef __cminpack_float__
-#define __minpack_func__(func) s ## func ## _
-#endif
-
-#ifdef __cminpack_half__
-#define __minpack_func__(func) h ## func ## _
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define MINPACK_EXPORT CMINPACK_EXPORT
-
-#define __minpack_real__  __cminpack_real__
-#define __minpack_attr__  __cminpack_attr__
-#if defined(__CUDA_ARCH__) || defined(__CUDACC__)
-#define __minpack_type_fcn_nn__        __minpack_attr__ void fcn_nn
-#define __minpack_type_fcnder_nn__     __minpack_attr__ void fcnder_nn
-#define __minpack_type_fcn_mn__        __minpack_attr__ void fcn_mn
-#define __minpack_type_fcnder_mn__     __minpack_attr__ void fcnder_mn
-#define __minpack_type_fcnderstr_mn__  __minpack_attr__ void fcnderstr_mn
-#define __minpack_decl_fcn_nn__
-#define __minpack_decl_fcnder_nn__
-#define __minpack_decl_fcn_mn__
-#define __minpack_decl_fcnder_mn__
-#define __minpack_decl_fcnderstr_mn__
-#define __minpack_param_fcn_nn__
-#define __minpack_param_fcnder_nn__
-#define __minpack_param_fcn_mn__
-#define __minpack_param_fcnder_mn__
-#define __minpack_param_fcnderstr_mn__
-#else
-#define __minpack_type_fcn_nn__        typedef void (*minpack_func_nn)
-#define __minpack_type_fcnder_nn__     typedef void (*minpack_funcder_nn)
-#define __minpack_type_fcn_mn__        typedef void (*minpack_func_mn)
-#define __minpack_type_fcnder_mn__     typedef void (*minpack_funcder_mn)
-#define __minpack_type_fcnderstr_mn__  typedef void (*minpack_funcderstr_mn)
-#define __minpack_decl_fcn_nn__        minpack_func_nn fcn_nn,
-#define __minpack_decl_fcnder_nn__     minpack_funcder_nn fcnder_nn,
-#define __minpack_decl_fcn_mn__        minpack_func_mn fcn_mn,
-#define __minpack_decl_fcnder_mn__     minpack_funcder_mn fcnder_mn,
-#define __minpack_decl_fcnderstr_mn__  minpack_funcderstr_mn fcnderstr_mn,
-#define __minpack_param_fcn_nn__       fcn_nn,
-#define __minpack_param_fcnder_nn__    fcnder_nn,
-#define __minpack_param_fcn_mn__       fcn_mn,
-#define __minpack_param_fcnder_mn__    fcnder_mn,
-#define __minpack_param_fcnderstr_mn__ fcnderstr_mn,
-#endif
-#undef __cminpack_type_fcn_nn__
-#undef __cminpack_type_fcnder_nn__
-#undef __cminpack_type_fcn_mn__
-#undef __cminpack_type_fcnder_mn__
-#undef __cminpack_type_fcnderstr_mn__
-#undef __cminpack_decl_fcn_nn__
-#undef __cminpack_decl_fcnder_nn__
-#undef __cminpack_decl_fcn_mn__
-#undef __cminpack_decl_fcnder_mn__
-#undef __cminpack_decl_fcnderstr_mn__
-#undef __cminpack_param_fcn_nn__
-#undef __cminpack_param_fcnder_nn__
-#undef __cminpack_param_fcn_mn__
-#undef __cminpack_param_fcnder_mn__
-#undef __cminpack_param_fcnderstr_mn__
-
-/* Declarations for minpack */
-
-/* Function types: */
-/* the iflag parameter is input-only (with respect to the FORTRAN */
-/*  version), the output iflag value is the return value of the function. */
-/* If iflag=0, the function shoulkd just print the current values (see */
-/* the nprint parameters below). */
-  
-/* for hybrd1 and hybrd: */
-/*         calculate the functions at x and */
-/*         return this vector in fvec. */
-/* return a negative value to terminate hybrd1/hybrd */
-__minpack_type_fcn_nn__(const int *n, const __minpack_real__ *x, __minpack_real__ *fvec, int *iflag );
-
-/* for hybrj1 and hybrj */
-/*         if iflag = 1 calculate the functions at x and */
-/*         return this vector in fvec. do not alter fjac. */
-/*         if iflag = 2 calculate the jacobian at x and */
-/*         return this matrix in fjac. do not alter fvec. */
-/* return a negative value to terminate hybrj1/hybrj */
-__minpack_type_fcnder_nn__(const int *n, const __minpack_real__ *x, __minpack_real__ *fvec, __minpack_real__ *fjac,
-                                  const int *ldfjac, int *iflag, void *user_data );
-
-/* for lmdif1 and lmdif */
-/*         calculate the functions at x and */
-/*         return this vector in fvec. */
-/*         if iflag = 1 the result is used to compute the residuals. */
-/*         if iflag = 2 the result is used to compute the Jacobian by finite differences. */
-/*         Jacobian computation requires exactly n function calls with iflag = 2. */
-/* return a negative value to terminate lmdif1/lmdif */
-__minpack_type_fcn_mn__(const int *m, const int *n, const __minpack_real__ *x, __minpack_real__ *fvec,
-                               int *iflag );
-
-/* for lmder1 and lmder */
-/*         if iflag = 1 calculate the functions at x and */
-/*         return this vector in fvec. do not alter fjac. */
-/*         if iflag = 2 calculate the jacobian at x and */
-/*         return this matrix in fjac. do not alter fvec. */
-/* return a negative value to terminate lmder1/lmder */
-__minpack_type_fcnder_mn__(const int *m, const int *n, const __minpack_real__ *x, __minpack_real__ *fvec,
-                                  __minpack_real__ *fjac, const int *ldfjac, int *iflag );
-
-/* for lmstr1 and lmstr */
-/*         if iflag = 1 calculate the functions at x and */
-/*         return this vector in fvec. */
-/*         if iflag = i calculate the (i-1)-st row of the */
-/*         jacobian at x and return this vector in fjrow. */
-/* return a negative value to terminate lmstr1/lmstr */
-__minpack_type_fcnderstr_mn__(const int *m, const int *n, const __minpack_real__ *x, __minpack_real__ *fvec,
-                                     __minpack_real__ *fjrow, int *iflag );
-
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (Jacobian calculated by
-   a forward-difference approximation) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(hybrd1)(  __minpack_decl_fcn_nn__
-	       const int *n, __minpack_real__ *x, __minpack_real__ *fvec, const __minpack_real__ *tol, int *info,
-	       __minpack_real__ *wa, const int *lwa );
-
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (Jacobian calculated by
-   a forward-difference approximation, more general). */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(hybrd)( __minpack_decl_fcn_nn__
-	      const int *n, __minpack_real__ *x, __minpack_real__ *fvec, const __minpack_real__ *xtol, const int *maxfev,
-	      const int *ml, const int *mu, const __minpack_real__ *epsfcn, __minpack_real__ *diag, const int *mode,
-	      const __minpack_real__ *factor, const int *nprint, int *info, int *nfev,
-	      __minpack_real__ *fjac, const int *ldfjac, __minpack_real__ *r, const int *lr, __minpack_real__ *qtf,
-	      __minpack_real__ *wa1, __minpack_real__ *wa2, __minpack_real__ *wa3, __minpack_real__ *wa4);
-  
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (user-supplied Jacobian) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(hybrj1)( __minpack_decl_fcnder_nn__ const int *n, __minpack_real__ *x,
-	       __minpack_real__ *fvec, __minpack_real__ *fjec, const int *ldfjac, const __minpack_real__ *tol,
-	       int *info, __minpack_real__ *wa, const int *lwa, void *user_data );
-          
-/* find a zero of a system of N nonlinear functions in N variables by
-   a modification of the Powell hybrid method (user-supplied Jacobian,
-   more general) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(hybrj)( __minpack_decl_fcnder_nn__ const int *n, __minpack_real__ *x,
-	      __minpack_real__ *fvec, __minpack_real__ *fjec, const int *ldfjac, const __minpack_real__ *xtol,
-	      const int *maxfev, __minpack_real__ *diag, const int *mode, const __minpack_real__ *factor,
-	      const int *nprint, int *info, int *nfev, int *njev, __minpack_real__ *r,
-	      const int *lr, __minpack_real__ *qtf, __minpack_real__ *wa1, __minpack_real__ *wa2,
-	      __minpack_real__ *wa3, __minpack_real__ *wa4, void *user_data );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (Jacobian calculated by a forward-difference approximation) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(lmdif1)( __minpack_decl_fcn_mn__
-	       const int *m, const int *n, __minpack_real__ *x, __minpack_real__ *fvec, const __minpack_real__ *tol,
-	       int *info, int *iwa, __minpack_real__ *wa, const int *lwa );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (Jacobian calculated by a forward-difference approximation, more
-   general) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(lmdif)( __minpack_decl_fcn_mn__
-	      const int *m, const int *n, __minpack_real__ *x, __minpack_real__ *fvec, const __minpack_real__ *ftol,
-	      const __minpack_real__ *xtol, const __minpack_real__ *gtol, const int *maxfev, const __minpack_real__ *epsfcn,
-	      __minpack_real__ *diag, const int *mode, const __minpack_real__ *factor, const int *nprint,
-	      int *info, int *nfev, __minpack_real__ *fjac, const int *ldfjac, int *ipvt,
-	      __minpack_real__ *qtf, __minpack_real__ *wa1, __minpack_real__ *wa2, __minpack_real__ *wa3,
-	      __minpack_real__ *wa4 );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(lmder1)( __minpack_decl_fcnder_mn__
-	       const int *m, const int *n, __minpack_real__ *x, __minpack_real__ *fvec, __minpack_real__ *fjac,
-	       const int *ldfjac, const __minpack_real__ *tol, int *info, int *ipvt,
-	       __minpack_real__ *wa, const int *lwa );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian, more general) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(lmder)( __minpack_decl_fcnder_mn__
-	      const int *m, const int *n, __minpack_real__ *x, __minpack_real__ *fvec, __minpack_real__ *fjac,
-	      const int *ldfjac, const __minpack_real__ *ftol, const __minpack_real__ *xtol, const __minpack_real__ *gtol,
-	      const int *maxfev, __minpack_real__ *diag, const int *mode, const __minpack_real__ *factor,
-	      const int *nprint, int *info, int *nfev, int *njev, int *ipvt,
-	      __minpack_real__ *qtf, __minpack_real__ *wa1, __minpack_real__ *wa2, __minpack_real__ *wa3,
-	      __minpack_real__ *wa4 );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian, minimal storage) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(lmstr1)( __minpack_decl_fcnderstr_mn__ const int *m, const int *n,
-	       __minpack_real__ *x, __minpack_real__ *fvec, __minpack_real__ *fjac, const int *ldfjac,
-	       const __minpack_real__ *tol, int *info, int *ipvt, __minpack_real__ *wa, const int *lwa );
-
-/* minimize the sum of the squares of nonlinear functions in N
-   variables by a modification of the Levenberg-Marquardt algorithm
-   (user-supplied Jacobian, minimal storage, more general) */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(lmstr)( __minpack_decl_fcnderstr_mn__ const int *m,
-	      const int *n, __minpack_real__ *x, __minpack_real__ *fvec, __minpack_real__ *fjac,
-	      const int *ldfjac, const __minpack_real__ *ftol, const __minpack_real__ *xtol, const __minpack_real__ *gtol,
-	      const int *maxfev, __minpack_real__ *diag, const int *mode, const __minpack_real__ *factor,
-	      const int *nprint, int *info, int *nfev, int *njev, int *ipvt,
-	      __minpack_real__ *qtf, __minpack_real__ *wa1, __minpack_real__ *wa2, __minpack_real__ *wa3,
-	      __minpack_real__ *wa4 );
- 
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(chkder)( const int *m, const int *n, const __minpack_real__ *x, __minpack_real__ *fvec, __minpack_real__ *fjec,
-	       const int *ldfjac, __minpack_real__ *xp, __minpack_real__ *fvecp, const int *mode,
-	       __minpack_real__ *err  );
-
-__minpack_attr__
-__minpack_real__ MINPACK_EXPORT __minpack_func__(dpmpar)( const int *i );
-
-__minpack_attr__
-__minpack_real__ MINPACK_EXPORT __minpack_func__(enorm)( const int *n, const __minpack_real__ *x );
-
-/* compute a forward-difference approximation to the m by n jacobian
-   matrix associated with a specified problem of m functions in n
-   variables. */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(fdjac2)(__minpack_decl_fcn_mn__
-	     const int *m, const int *n, __minpack_real__ *x, const __minpack_real__ *fvec, __minpack_real__ *fjac,
-	     const int *ldfjac, int *iflag, const __minpack_real__ *epsfcn, __minpack_real__ *wa);
-
-/* compute a forward-difference approximation to the n by n jacobian
-   matrix associated with a specified problem of n functions in n
-   variables. if the jacobian has a banded form, then function
-   evaluations are saved by only approximating the nonzero terms. */
-__minpack_attr__
-void MINPACK_EXPORT __minpack_func__(fdjac1)(__minpack_decl_fcn_nn__
-	     const int *n, __minpack_real__ *x, const __minpack_real__ *fvec, __minpack_real__ *fjac, const int *ldfjac,
-	     int *iflag, const int *ml, const int *mu, const __minpack_real__ *epsfcn, __minpack_real__ *wa1,
-	     __minpack_real__ *wa2);
-
-/* internal MINPACK subroutines */
-__minpack_attr__
-void __minpack_func__(dogleg)(const int *n, const __minpack_real__ *r, const int *lr, 
-             const __minpack_real__ *diag, const __minpack_real__ *qtb, const __minpack_real__ *delta, __minpack_real__ *x, 
-             __minpack_real__ *wa1, __minpack_real__ *wa2);
-__minpack_attr__
-void __minpack_func__(qrfac)(const int *m, const int *n, __minpack_real__ *a, const int *
-            lda, const int *pivot, int *ipvt, const int *lipvt, __minpack_real__ *rdiag,
-            __minpack_real__ *acnorm, __minpack_real__ *wa);
-__minpack_attr__
-void __minpack_func__(qrsolv)(const int *n, __minpack_real__ *r, const int *ldr, 
-             const int *ipvt, const __minpack_real__ *diag, const __minpack_real__ *qtb, __minpack_real__ *x, 
-             __minpack_real__ *sdiag, __minpack_real__ *wa);
-__minpack_attr__
-void __minpack_func__(qform)(const int *m, const int *n, __minpack_real__ *q, const int *
-            ldq, __minpack_real__ *wa);
-__minpack_attr__
-void __minpack_func__(r1updt)(const int *m, const int *n, __minpack_real__ *s, const int *
-             ls, const __minpack_real__ *u, __minpack_real__ *v, __minpack_real__ *w, int *sing);
-__minpack_attr__
-void __minpack_func__(r1mpyq)(const int *m, const int *n, __minpack_real__ *a, const int *
-             lda, const __minpack_real__ *v, const __minpack_real__ *w);
-__minpack_attr__
-void __minpack_func__(lmpar)(const int *n, __minpack_real__ *r, const int *ldr, 
-            const int *ipvt, const __minpack_real__ *diag, const __minpack_real__ *qtb, const __minpack_real__ *delta, 
-            __minpack_real__ *par, __minpack_real__ *x, __minpack_real__ *sdiag, __minpack_real__ *wa1, 
-            __minpack_real__ *wa2);
-__minpack_attr__
-void __minpack_func__(rwupdt)(const int *n, __minpack_real__ *r, const int *ldr, 
-             const __minpack_real__ *w, __minpack_real__ *b, __minpack_real__ *alpha, __minpack_real__ *cos, 
-             __minpack_real__ *sin);
-__minpack_attr__
-void __minpack_func__(covar)(const int *n, __minpack_real__ *r, const int *ldr, 
-           const int *ipvt, const __minpack_real__ *tol, __minpack_real__ *wa);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __MINPACK_H__ */

+ 0 - 41
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/pow_di.c

@@ -1,41 +0,0 @@
-#include "f2c.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef KR_headers
-double pow_di(ap, bp) doublereal *ap; integer *bp;
-#else
-double pow_di(doublereal *ap, integer *bp)
-#endif
-{
-double pow, x;
-integer n;
-unsigned long u;
-
-pow = 1;
-x = *ap;
-n = *bp;
-
-if(n != 0)
-	{
-	if(n < 0)
-		{
-		n = -n;
-		x = 1/x;
-		}
-	for(u = n; ; )
-		{
-		if(u & 01)
-			pow *= x;
-		if(u >>= 1)
-			x *= x;
-		else
-			break;
-		}
-	}
-return(pow);
-}
-#ifdef __cplusplus
-}
-#endif

+ 0 - 145
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/qform_.c

@@ -1,145 +0,0 @@
-/* qform.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <math.h>
-#define real __minpack_real__
-
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-
-__minpack_attr__
-void __minpack_func__(qform)(const int *m, const int *n, real *q, const int *
-	ldq, real *wa)
-{
-    /* System generated locals */
-    int q_dim1, q_offset, i__1, i__2, i__3;
-
-    /* Local variables */
-    int i__, j, k, l, jm1, np1;
-    real sum, temp;
-    int minmn;
-
-/*     ********** */
-
-/*     subroutine qform */
-
-/*     this subroutine proceeds from the computed qr factorization of */
-/*     an m by n matrix a to accumulate the m by m orthogonal matrix */
-/*     q from its factored form. */
-
-/*     the subroutine statement is */
-
-/*       subroutine qform(m,n,q,ldq,wa) */
-
-/*     where */
-
-/*       m is a positive integer input variable set to the number */
-/*         of rows of a and the order of q. */
-
-/*       n is a positive integer input variable set to the number */
-/*         of columns of a. */
-
-/*       q is an m by m array. on input the full lower trapezoid in */
-/*         the first min(m,n) columns of q contains the factored form. */
-/*         on output q has been accumulated into a square matrix. */
-
-/*       ldq is a positive integer input variable not less than m */
-/*         which specifies the leading dimension of the array q. */
-
-/*       wa is a work array of length m. */
-
-/*     subprograms called */
-
-/*       fortran-supplied ... min0 */
-
-/*     argonne national laboratory. minpack project. march 1980. */
-/*     burton s. garbow, kenneth e. hillstrom, jorge j. more */
-
-/*     ********** */
-    /* Parameter adjustments */
-    --wa;
-    q_dim1 = *ldq;
-    q_offset = 1 + q_dim1 * 1;
-    q -= q_offset;
-
-    /* Function Body */
-
-/*     zero out upper triangle of q in the first min(m,n) columns. */
-
-    minmn = min(*m,*n);
-    if (minmn < 2) {
-	goto L30;
-    }
-    i__1 = minmn;
-    for (j = 2; j <= i__1; ++j) {
-	jm1 = j - 1;
-	i__2 = jm1;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-	    q[i__ + j * q_dim1] = 0.;
-/* L10: */
-	}
-/* L20: */
-    }
-L30:
-
-/*     initialize remaining columns to those of the identity matrix. */
-
-    np1 = *n + 1;
-    if (*m < np1) {
-	goto L60;
-    }
-    i__1 = *m;
-    for (j = np1; j <= i__1; ++j) {
-	i__2 = *m;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-	    q[i__ + j * q_dim1] = 0.;
-/* L40: */
-	}
-	q[j + j * q_dim1] = 1.;
-/* L50: */
-    }
-L60:
-
-/*     accumulate q from its factored form. */
-
-    i__1 = minmn;
-    for (l = 1; l <= i__1; ++l) {
-	k = minmn - l + 1;
-	i__2 = *m;
-	for (i__ = k; i__ <= i__2; ++i__) {
-	    wa[i__] = q[i__ + k * q_dim1];
-	    q[i__ + k * q_dim1] = 0.;
-/* L70: */
-	}
-	q[k + k * q_dim1] = 1.;
-	if (wa[k] == 0.) {
-	    goto L110;
-	}
-	i__2 = *m;
-	for (j = k; j <= i__2; ++j) {
-	    sum = 0.;
-	    i__3 = *m;
-	    for (i__ = k; i__ <= i__3; ++i__) {
-		sum += q[i__ + j * q_dim1] * wa[i__];
-/* L80: */
-	    }
-	    temp = sum / wa[k];
-	    i__3 = *m;
-	    for (i__ = k; i__ <= i__3; ++i__) {
-		q[i__ + j * q_dim1] -= temp * wa[i__];
-/* L90: */
-	    }
-/* L100: */
-	}
-L110:
-/* L120: */
-	;
-    }
-    return;
-
-/*     last card of subroutine qform. */
-
-} /* qform_ */
-

+ 0 - 245
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/qrfac_.c

@@ -1,245 +0,0 @@
-/* qrfac.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <math.h>
-#define real __minpack_real__
-
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-
-__minpack_attr__
-void __minpack_func__(qrfac)(const int *m, const int *n, real *a, const int *
-	lda, const int *pivot, int *ipvt, const int *lipvt, real *rdiag,
-	 real *acnorm, real *wa)
-{
-    /* Initialized data */
-
-#define p05 .05
-    const int c__1 = 1;
-
-    /* System generated locals */
-    int a_dim1, a_offset, i__1, i__2, i__3;
-    real d__1, d__2, d__3;
-
-    /* Local variables */
-    int i__, j, k, jp1;
-    real sum;
-    int kmax;
-    real temp;
-    int minmn;
-    real epsmch;
-    real ajnorm;
-
-/*     ********** */
-
-/*     subroutine qrfac */
-
-/*     this subroutine uses householder transformations with column */
-/*     pivoting (optional) to compute a qr factorization of the */
-/*     m by n matrix a. that is, qrfac determines an orthogonal */
-/*     matrix q, a permutation matrix p, and an upper trapezoidal */
-/*     matrix r with diagonal elements of nonincreasing magnitude, */
-/*     such that a*p = q*r. the householder transformation for */
-/*     column k, k = 1,2,...,min(m,n), is of the form */
-
-/*                           t */
-/*           i - (1/u(k))*u*u */
-
-/*     where u has zeros in the first k-1 positions. the form of */
-/*     this transformation and the method of pivoting first */
-/*     appeared in the corresponding linpack subroutine. */
-
-/*     the subroutine statement is */
-
-/*       subroutine qrfac(m,n,a,lda,pivot,ipvt,lipvt,rdiag,acnorm,wa) */
-
-/*     where */
-
-/*       m is a positive integer input variable set to the number */
-/*         of rows of a. */
-
-/*       n is a positive integer input variable set to the number */
-/*         of columns of a. */
-
-/*       a is an m by n array. on input a contains the matrix for */
-/*         which the qr factorization is to be computed. on output */
-/*         the strict upper trapezoidal part of a contains the strict */
-/*         upper trapezoidal part of r, and the lower trapezoidal */
-/*         part of a contains a factored form of q (the non-trivial */
-/*         elements of the u vectors described above). */
-
-/*       lda is a positive integer input variable not less than m */
-/*         which specifies the leading dimension of the array a. */
-
-/*       pivot is a logical input variable. if pivot is set true, */
-/*         then column pivoting is enforced. if pivot is set false, */
-/*         then no column pivoting is done. */
-
-/*       ipvt is an integer output array of length lipvt. ipvt */
-/*         defines the permutation matrix p such that a*p = q*r. */
-/*         column j of p is column ipvt(j) of the identity matrix. */
-/*         if pivot is false, ipvt is not referenced. */
-
-/*       lipvt is a positive integer input variable. if pivot is false, */
-/*         then lipvt may be as small as 1. if pivot is true, then */
-/*         lipvt must be at least n. */
-
-/*       rdiag is an output array of length n which contains the */
-/*         diagonal elements of r. */
-
-/*       acnorm is an output array of length n which contains the */
-/*         norms of the corresponding columns of the input matrix a. */
-/*         if this information is not needed, then acnorm can coincide */
-/*         with rdiag. */
-
-/*       wa is a work array of length n. if pivot is false, then wa */
-/*         can coincide with rdiag. */
-
-/*     subprograms called */
-
-/*       minpack-supplied ... dpmpar,enorm */
-
-/*       fortran-supplied ... dmax1,dsqrt,min0 */
-
-/*     argonne national laboratory. minpack project. march 1980. */
-/*     burton s. garbow, kenneth e. hillstrom, jorge j. more */
-
-/*     ********** */
-    /* Parameter adjustments */
-    --wa;
-    --acnorm;
-    --rdiag;
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1 * 1;
-    a -= a_offset;
-    --ipvt;
-    (void)lipvt;
-
-    /* Function Body */
-
-/*     epsmch is the machine precision. */
-
-    epsmch = __minpack_func__(dpmpar)(&c__1);
-
-/*     compute the initial column norms and initialize several arrays. */
-
-    i__1 = *n;
-    for (j = 1; j <= i__1; ++j) {
-	acnorm[j] = __minpack_func__(enorm)(m, &a[j * a_dim1 + 1]);
-	rdiag[j] = acnorm[j];
-	wa[j] = rdiag[j];
-	if (*pivot) {
-	    ipvt[j] = j;
-	}
-/* L10: */
-    }
-
-/*     reduce a to r with householder transformations. */
-
-    minmn = min(*m,*n);
-    i__1 = minmn;
-    for (j = 1; j <= i__1; ++j) {
-	if (! (*pivot)) {
-	    goto L40;
-	}
-
-/*        bring the column of largest norm into the pivot position. */
-
-	kmax = j;
-	i__2 = *n;
-	for (k = j; k <= i__2; ++k) {
-	    if (rdiag[k] > rdiag[kmax]) {
-		kmax = k;
-	    }
-/* L20: */
-	}
-	if (kmax == j) {
-	    goto L40;
-	}
-	i__2 = *m;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-	    temp = a[i__ + j * a_dim1];
-	    a[i__ + j * a_dim1] = a[i__ + kmax * a_dim1];
-	    a[i__ + kmax * a_dim1] = temp;
-/* L30: */
-	}
-	rdiag[kmax] = rdiag[j];
-	wa[kmax] = wa[j];
-	k = ipvt[j];
-	ipvt[j] = ipvt[kmax];
-	ipvt[kmax] = k;
-L40:
-
-/*        compute the householder transformation to reduce the */
-/*        j-th column of a to a multiple of the j-th unit vector. */
-
-	i__2 = *m - j + 1;
-	ajnorm = __minpack_func__(enorm)(&i__2, &a[j + j * a_dim1]);
-	if (ajnorm == 0.) {
-	    goto L100;
-	}
-	if (a[j + j * a_dim1] < 0.) {
-	    ajnorm = -ajnorm;
-	}
-	i__2 = *m;
-	for (i__ = j; i__ <= i__2; ++i__) {
-	    a[i__ + j * a_dim1] /= ajnorm;
-/* L50: */
-	}
-	a[j + j * a_dim1] += 1.;
-
-/*        apply the transformation to the remaining columns */
-/*        and update the norms. */
-
-	jp1 = j + 1;
-	if (*n < jp1) {
-	    goto L100;
-	}
-	i__2 = *n;
-	for (k = jp1; k <= i__2; ++k) {
-	    sum = 0.;
-	    i__3 = *m;
-	    for (i__ = j; i__ <= i__3; ++i__) {
-		sum += a[i__ + j * a_dim1] * a[i__ + k * a_dim1];
-/* L60: */
-	    }
-	    temp = sum / a[j + j * a_dim1];
-	    i__3 = *m;
-	    for (i__ = j; i__ <= i__3; ++i__) {
-		a[i__ + k * a_dim1] -= temp * a[i__ + j * a_dim1];
-/* L70: */
-	    }
-	    if (! (*pivot) || rdiag[k] == 0.) {
-		goto L80;
-	    }
-	    temp = a[j + k * a_dim1] / rdiag[k];
-/* Computing MAX */
-/* Computing 2nd power */
-	    d__3 = temp;
-	    d__1 = 0., d__2 = 1. - d__3 * d__3;
-	    rdiag[k] *= sqrt((max(d__1,d__2)));
-/* Computing 2nd power */
-	    d__1 = rdiag[k] / wa[k];
-	    if (p05 * (d__1 * d__1) > epsmch) {
-		goto L80;
-	    }
-	    i__3 = *m - j;
-	    rdiag[k] = __minpack_func__(enorm)(&i__3, &a[jp1 + k * a_dim1]);
-	    wa[k] = rdiag[k];
-L80:
-/* L90: */
-	    ;
-	}
-L100:
-	rdiag[j] = -ajnorm;
-/* L110: */
-    }
-    return;
-
-/*     last card of subroutine qrfac. */
-
-} /* qrfac_ */
-

+ 0 - 145
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/r1mpyq_.c

@@ -1,145 +0,0 @@
-/* r1mpyq.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <math.h>
-#define real __minpack_real__
-
-#define abs(x) ((x) >= 0 ? (x) : -(x))
-
-__minpack_attr__
-void __minpack_func__(r1mpyq)(const int *m, const int *n, real *a, const int *
-	lda, const real *v, const real *w)
-{
-    /* System generated locals */
-    int a_dim1, a_offset, i__1, i__2;
-    real d__1, d__2;
-
-    /* Local variables */
-    int i__, j, nm1, nmj;
-    real cos__, sin__, temp;
-
-/*     ********** */
-
-/*     subroutine r1mpyq */
-
-/*     given an m by n matrix a, this subroutine computes a*q where */
-/*     q is the product of 2*(n - 1) transformations */
-
-/*           gv(n-1)*...*gv(1)*gw(1)*...*gw(n-1) */
-
-/*     and gv(i), gw(i) are givens rotations in the (i,n) plane which */
-/*     eliminate elements in the i-th and n-th planes, respectively. */
-/*     q itself is not given, rather the information to recover the */
-/*     gv, gw rotations is supplied. */
-
-/*     the subroutine statement is */
-
-/*       subroutine r1mpyq(m,n,a,lda,v,w) */
-
-/*     where */
-
-/*       m is a positive integer input variable set to the number */
-/*         of rows of a. */
-
-/*       n is a positive integer input variable set to the number */
-/*         of columns of a. */
-
-/*       a is an m by n array. on input a must contain the matrix */
-/*         to be postmultiplied by the orthogonal matrix q */
-/*         described above. on output a*q has replaced a. */
-
-/*       lda is a positive integer input variable not less than m */
-/*         which specifies the leading dimension of the array a. */
-
-/*       v is an input array of length n. v(i) must contain the */
-/*         information necessary to recover the givens rotation gv(i) */
-/*         described above. */
-
-/*       w is an input array of length n. w(i) must contain the */
-/*         information necessary to recover the givens rotation gw(i) */
-/*         described above. */
-
-/*     subroutines called */
-
-/*       fortran-supplied ... dabs,dsqrt */
-
-/*     argonne national laboratory. minpack project. march 1980. */
-/*     burton s. garbow, kenneth e. hillstrom, jorge j. more */
-
-/*     ********** */
-    /* Parameter adjustments */
-    --w;
-    --v;
-    a_dim1 = *lda;
-    a_offset = 1 + a_dim1 * 1;
-    a -= a_offset;
-
-    /* Function Body */
-
-/*     apply the first set of givens rotations to a. */
-
-    nm1 = *n - 1;
-    if (nm1 < 1) {
-	/* goto L50; */
-        return;
-    }
-    i__1 = nm1;
-    for (nmj = 1; nmj <= i__1; ++nmj) {
-	j = *n - nmj;
-	if ((d__1 = v[j], abs(d__1)) > 1.) {
-	    cos__ = 1. / v[j];
-/* Computing 2nd power */
-	    d__2 = cos__;
-	    sin__ = sqrt(1. - d__2 * d__2);
-	} else {
-	    sin__ = v[j];
-/* Computing 2nd power */
-	    d__2 = sin__;
-	    cos__ = sqrt(1. - d__2 * d__2);
-	}
-	i__2 = *m;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-	    temp = cos__ * a[i__ + j * a_dim1] - sin__ * a[i__ + *n * a_dim1];
-	    a[i__ + *n * a_dim1] = sin__ * a[i__ + j * a_dim1] + cos__ * a[
-		    i__ + *n * a_dim1];
-	    a[i__ + j * a_dim1] = temp;
-/* L10: */
-	}
-/* L20: */
-    }
-
-/*     apply the second set of givens rotations to a. */
-
-    i__1 = nm1;
-    for (j = 1; j <= i__1; ++j) {
-	if ((d__1 = w[j], abs(d__1)) > 1.) {
-	    cos__ = 1. / w[j];
-/* Computing 2nd power */
-	    d__2 = cos__;
-	    sin__ = sqrt(1. - d__2 * d__2);
-	} else {
-	    sin__ = w[j];
-/* Computing 2nd power */
-	    d__2 = sin__;
-	    cos__ = sqrt(1. - d__2 * d__2);
-	}
-	i__2 = *m;
-	for (i__ = 1; i__ <= i__2; ++i__) {
-	    temp = cos__ * a[i__ + j * a_dim1] + sin__ * a[i__ + *n * a_dim1];
-	    a[i__ + *n * a_dim1] = -sin__ * a[i__ + j * a_dim1] + cos__ * a[
-		    i__ + *n * a_dim1];
-	    a[i__ + j * a_dim1] = temp;
-/* L30: */
-	}
-/* L40: */
-    }
-/* L50: */
-    return;
-
-/*     last card of subroutine r1mpyq. */
-
-} /* r1mpyq_ */
-

+ 0 - 283
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/r1updt_.c

@@ -1,283 +0,0 @@
-/* r1updt.f -- translated by f2c (version 20020621).
-   You must link the resulting object file with the libraries:
-	-lf2c -lm   (in that order)
-*/
-
-#include "minpack.h"
-#include <math.h>
-#define real __minpack_real__
-
-#define abs(x) ((x) >= 0 ? (x) : -(x))
-#define TRUE_ (1)
-#define FALSE_ (0)
-
-__minpack_attr__
-void __minpack_func__(r1updt)(const int *m, const int *n, real *s, const int *
-	ls, const real *u, real *v, real *w, int *sing)
-{
-    /* Initialized data */
-
-#define p5 .5
-#define p25 .25
-    const int c__3 = 3;
-
-    /* System generated locals */
-    int i__1, i__2;
-    real d__1, d__2;
-
-    /* Local variables */
-    int i__, j, l, jj, nm1;
-    real tan__;
-    int nmj;
-    real cos__, sin__, tau, temp, giant, cotan;
-
-/*     ********** */
-
-/*     subroutine r1updt */
-
-/*     given an m by n lower trapezoidal matrix s, an m-vector u, */
-/*     and an n-vector v, the problem is to determine an */
-/*     orthogonal matrix q such that */
-
-/*                   t */
-/*           (s + u*v )*q */
-
-/*     is again lower trapezoidal. */
-
-/*     this subroutine determines q as the product of 2*(n - 1) */
-/*     transformations */
-
-/*           gv(n-1)*...*gv(1)*gw(1)*...*gw(n-1) */
-
-/*     where gv(i), gw(i) are givens rotations in the (i,n) plane */
-/*     which eliminate elements in the i-th and n-th planes, */
-/*     respectively. q itself is not accumulated, rather the */
-/*     information to recover the gv, gw rotations is returned. */
-
-/*     the subroutine statement is */
-
-/*       subroutine r1updt(m,n,s,ls,u,v,w,sing) */
-
-/*     where */
-
-/*       m is a positive integer input variable set to the number */
-/*         of rows of s. */
-
-/*       n is a positive integer input variable set to the number */
-/*         of columns of s. n must not exceed m. */
-
-/*       s is an array of length ls. on input s must contain the lower */
-/*         trapezoidal matrix s stored by columns. on output s contains */
-/*         the lower trapezoidal matrix produced as described above. */
-
-/*       ls is a positive integer input variable not less than */
-/*         (n*(2*m-n+1))/2. */
-
-/*       u is an input array of length m which must contain the */
-/*         vector u. */
-
-/*       v is an array of length n. on input v must contain the vector */
-/*         v. on output v(i) contains the information necessary to */
-/*         recover the givens rotation gv(i) described above. */
-
-/*       w is an output array of length m. w(i) contains information */
-/*         necessary to recover the givens rotation gw(i) described */
-/*         above. */
-
-/*       sing is a logical output variable. sing is set true if any */
-/*         of the diagonal elements of the output s are zero. otherwise */
-/*         sing is set false. */
-
-/*     subprograms called */
-
-/*       minpack-supplied ... dpmpar */
-
-/*       fortran-supplied ... dabs,dsqrt */
-
-/*     argonne national laboratory. minpack project. march 1980. */
-/*     burton s. garbow, kenneth e. hillstrom, jorge j. more, */
-/*     john l. nazareth */
-
-/*     ********** */
-    /* Parameter adjustments */
-    --w;
-    --u;
-    --v;
-    --s;
-    (void)ls;
-
-    /* Function Body */
-
-/*     giant is the largest magnitude. */
-
-    giant = __minpack_func__(dpmpar)(&c__3);
-
-/*     initialize the diagonal element pointer. */
-
-    jj = *n * ((*m << 1) - *n + 1) / 2 - (*m - *n);
-
-/*     move the nontrivial part of the last column of s into w. */
-
-    l = jj;
-    i__1 = *m;
-    for (i__ = *n; i__ <= i__1; ++i__) {
-	w[i__] = s[l];
-	++l;
-/* L10: */
-    }
-
-/*     rotate the vector v into a multiple of the n-th unit vector */
-/*     in such a way that a spike is introduced into w. */
-
-    nm1 = *n - 1;
-    if (nm1 < 1) {
-	goto L70;
-    }
-    i__1 = nm1;
-    for (nmj = 1; nmj <= i__1; ++nmj) {
-	j = *n - nmj;
-	jj -= *m - j + 1;
-	w[j] = 0.;
-	if (v[j] == 0.) {
-	    goto L50;
-	}
-
-/*        determine a givens rotation which eliminates the */
-/*        j-th element of v. */
-
-	if ((d__1 = v[*n], abs(d__1)) >= (d__2 = v[j], abs(d__2))) {
-	    goto L20;
-	}
-	cotan = v[*n] / v[j];
-/* Computing 2nd power */
-	d__1 = cotan;
-	sin__ = p5 / sqrt(p25 + p25 * (d__1 * d__1));
-	cos__ = sin__ * cotan;
-	tau = 1.;
-	if (abs(cos__) * giant > 1.) {
-	    tau = 1. / cos__;
-	}
-	goto L30;
-L20:
-	tan__ = v[j] / v[*n];
-/* Computing 2nd power */
-	d__1 = tan__;
-	cos__ = p5 / sqrt(p25 + p25 * (d__1 * d__1));
-	sin__ = cos__ * tan__;
-	tau = sin__;
-L30:
-
-/*        apply the transformation to v and store the information */
-/*        necessary to recover the givens rotation. */
-
-	v[*n] = sin__ * v[j] + cos__ * v[*n];
-	v[j] = tau;
-
-/*        apply the transformation to s and extend the spike in w. */
-
-	l = jj;
-	i__2 = *m;
-	for (i__ = j; i__ <= i__2; ++i__) {
-	    temp = cos__ * s[l] - sin__ * w[i__];
-	    w[i__] = sin__ * s[l] + cos__ * w[i__];
-	    s[l] = temp;
-	    ++l;
-/* L40: */
-	}
-L50:
-/* L60: */
-	;
-    }
-L70:
-
-/*     add the spike from the rank 1 update to w. */
-
-    i__1 = *m;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-	w[i__] += v[*n] * u[i__];
-/* L80: */
-    }
-
-/*     eliminate the spike. */
-
-    *sing = FALSE_;
-    if (nm1 < 1) {
-	goto L140;
-    }
-    i__1 = nm1;
-    for (j = 1; j <= i__1; ++j) {
-	if (w[j] == 0.) {
-	    goto L120;
-	}
-
-/*        determine a givens rotation which eliminates the */
-/*        j-th element of the spike. */
-
-	if ((d__1 = s[jj], abs(d__1)) >= (d__2 = w[j], abs(d__2))) {
-	    goto L90;
-	}
-	cotan = s[jj] / w[j];
-/* Computing 2nd power */
-	d__1 = cotan;
-	sin__ = p5 / sqrt(p25 + p25 * (d__1 * d__1));
-	cos__ = sin__ * cotan;
-	tau = 1.;
-	if (abs(cos__) * giant > 1.) {
-	    tau = 1. / cos__;
-	}
-	goto L100;
-L90:
-	tan__ = w[j] / s[jj];
-/* Computing 2nd power */
-	d__1 = tan__;
-	cos__ = p5 / sqrt(p25 + p25 * (d__1 * d__1));
-	sin__ = cos__ * tan__;
-	tau = sin__;
-L100:
-
-/*        apply the transformation to s and reduce the spike in w. */
-
-	l = jj;
-	i__2 = *m;
-	for (i__ = j; i__ <= i__2; ++i__) {
-	    temp = cos__ * s[l] + sin__ * w[i__];
-	    w[i__] = -sin__ * s[l] + cos__ * w[i__];
-	    s[l] = temp;
-	    ++l;
-/* L110: */
-	}
-
-/*        store the information necessary to recover the */
-/*        givens rotation. */
-
-	w[j] = tau;
-L120:
-
-/*        test for zero diagonal elements in the output s. */
-
-	if (s[jj] == 0.) {
-	    *sing = TRUE_;
-	}
-	jj += *m - j + 1;
-/* L130: */
-    }
-L140:
-
-/*     move w back into the last column of the output s. */
-
-    l = jj;
-    i__1 = *m;
-    for (i__ = *n; i__ <= i__1; ++i__) {
-	s[l] = w[i__];
-	++l;
-/* L150: */
-    }
-    if (s[jj] == 0.) {
-	*sing = TRUE_;
-    }
-    return;
-
-/*     last card of subroutine r1updt. */
-
-} /* r1updt_ */
-

+ 0 - 50
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/s_cmp.c

@@ -1,50 +0,0 @@
-#include "f2c.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* compare two strings */
-
-#ifdef KR_headers
-integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb;
-#else
-integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb)
-#endif
-{
-register unsigned char *a, *aend, *b, *bend;
-a = (unsigned char *)a0;
-b = (unsigned char *)b0;
-aend = a + la;
-bend = b + lb;
-
-if(la <= lb)
-	{
-	while(a < aend)
-		if(*a != *b)
-			return( *a - *b );
-		else
-			{ ++a; ++b; }
-
-	while(b < bend)
-		if(*b != ' ')
-			return( ' ' - *b );
-		else	++b;
-	}
-
-else
-	{
-	while(b < bend)
-		if(*a == *b)
-			{ ++a; ++b; }
-		else
-			return( *a - *b );
-	while(a < aend)
-		if(*a != ' ')
-			return(*a - ' ');
-		else	++a;
-	}
-return(0);
-}
-#ifdef __cplusplus
-}
-#endif

+ 0 - 57
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/s_copy.c

@@ -1,57 +0,0 @@
-/* Unless compiled with -DNO_OVERWRITE, this variant of s_copy allows the
- * target of an assignment to appear on its right-hand side (contrary
- * to the Fortran 77 Standard, but in accordance with Fortran 90),
- * as in  a(2:5) = a(4:7) .
- */
-
-#include "f2c.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* assign strings:  a = b */
-
-#ifdef KR_headers
-VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
-#else
-void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb)
-#endif
-{
-	register char *aend, *bend;
-
-	aend = a + la;
-
-	if(la <= lb)
-#ifndef NO_OVERWRITE
-		if (a <= b || a >= b + la)
-#endif
-			while(a < aend)
-				*a++ = *b++;
-#ifndef NO_OVERWRITE
-		else
-			for(b += la; a < aend; )
-				*--aend = *--b;
-#endif
-
-	else {
-		bend = b + lb;
-#ifndef NO_OVERWRITE
-		if (a <= b || a >= bend)
-#endif
-			while(b < bend)
-				*a++ = *b++;
-#ifndef NO_OVERWRITE
-		else {
-			a += lb;
-			while(b < bend)
-				*--a = *--bend;
-			a += lb;
-			}
-#endif
-		while(a < aend)
-			*a++ = ' ';
-		}
-	}
-#ifdef __cplusplus
-}
-#endif

+ 0 - 65
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/external_solvers/xerbla.c

@@ -1,65 +0,0 @@
-/* xerbla.f -- translated by f2c (version 20061008).
-   You must link the resulting object file with libf2c:
-  on Microsoft Windows system, link with libf2c.lib;
-  on Linux or Unix systems, link with .../path/to/libf2c.a -lm
-  or, if you install libf2c.a in a standard place, with -lf2c -lm
-  -- in that order, at the end of the command line, as in
-    cc *.o -lf2c -lm
-  Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
-
-    http://www.netlib.org/f2c/libf2c.zip
-*/
-
-#include "f2c.h"
-#include "blaswrap.h"
-#include "stdio.h"
-
-/* Table of constant values */
-
-static integer c__1 = 1;
-
-/* Subroutine */ int xerbla_(char *srname, integer *info)
-{
-
-
-/*  -- LAPACK auxiliary routine (version 3.2) -- */
-/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
-/*     November 2006 */
-
-/*     .. Scalar Arguments .. */
-/*     .. */
-
-/*  Purpose */
-/*  ======= */
-
-/*  XERBLA  is an error handler for the LAPACK routines. */
-/*  It is called by an LAPACK routine if an input parameter has an */
-/*  invalid value.  A message is printed and execution stops. */
-
-/*  Installers may consider modifying the STOP statement in order to */
-/*  call system-specific exception-handling facilities. */
-
-/*  Arguments */
-/*  ========= */
-
-/*  SRNAME  (input) CHARACTER*(*) */
-/*          The name of the routine which called XERBLA. */
-
-/*  INFO    (input) INTEGER */
-/*          The position of the invalid parameter in the parameter list */
-/*          of the calling routine. */
-
-/* ===================================================================== */
-
-/*     .. Intrinsic Functions .. */
-/*     .. */
-/*     .. Executable Statements .. */
-
-    printf("** On entry to %6s, parameter number %2i had an illegal value\n",
-    srname, (int) *info);
-
-
-/*     End of XERBLA */
-
-    return 0;
-} /* xerbla_ */

+ 0 - 0
SemanticAdaptationForFMI/Experiments/power_window_case_study/fmu20/fmu/cs/FMI_PowerSystem/sources/include/fmi1/fmiModelFunctions.h


Some files were not shown because too many files changed in this diff