I am including all the variables that we need for our project in the outputs.csv file
But one of them gives us an error:
variable name
Average wellbeing index[af]
Average wellbeing index[cn]
Average wellbeing index[ec]
Average wellbeing index[eu]
Average wellbeing index[la]
Average wellbeing index[me]
Average wellbeing index[pa]
Average wellbeing index[sa]
Average wellbeing index[se]
Average wellbeing index[us]
The error I get is this one:
10:18:34 AM [vite] hmr update /src/overlay.ts?v=e77358aa
build/processed.c:17037:47: error: invalid operands to binary expression ('double[10]' and 'double')
__level123 = _INTEG(__level123, (__level122 - __level123) / (_time_to_smooth_sdg_scores_for_wellbeing / 3.0));
~~~~~~~~~~ ^ ~~~~~~~~~~
build/vensim.h:27:41: note: expanded from macro '_INTEG'
#define _INTEG(value, rate) ((value) + (rate) * _time_step)
^~~~
1 error generated
10:18:35 AM [vite] hmr update /src/dev-overlay.js
emcc: error: '/Users/sergiogalan/proyectos/earth4all/testm/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fno-inline-functions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/sergiogalan/proyectos/earth4all/testm/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -Ibuild -Wall -Os build/processed.c -c -o /var/folders/v7/6lvtsm551jgdfdwjm_j5m7mr0000gn/T/emscripten_temp_g_81h4jc/processed_0.o' failed (returned 1)
ERROR: Failed to compile C model to WebAssembly: emcc command failed (code=1)
at buildWasm (file:///Users/sergiogalan/proyectos/earth4all/testm/node_modules/@sdeverywhere/plugin-wasm/dist/index.js:99:11)
at async WasmPlugin.postGenerateC (file:///Users/sergiogalan/proyectos/earth4all/testm/node_modules/@sdeverywhere/plugin-wasm/dist/index.js:24:5)
at async generateModel (file:///Users/sergiogalan/proyectos/earth4all/testm/node_modules/@sdeverywhere/build/dist/index.js:518:18)
The model seems to work just fine in Vensim 10.1.3 ( link to the model: https://hidrive.ionos.com/lnk/DS8RmJ8r1)
And according to Ulrich:
The problem does not sit in Average wellbeing index but in one of the elements used in calculating the index. I think it is the one in bold. Just a hunch.
(Living conditions index with env damage[region] * Weight on physical conditions +
Wellbeing from social tension[region] * ( 1 - Weight on physical conditions) ) * Smoothed comparison Effect of SDG score on wellbeing[region]
I am including all the variables that we need for our project in the outputs.csv file
But one of them gives us an error:
The error I get is this one:
The model seems to work just fine in Vensim 10.1.3 ( link to the model: https://hidrive.ionos.com/lnk/DS8RmJ8r1)
And according to Ulrich: