Browse Source

added simulator parameters form

master
Youen Toupin 3 years ago
parent
commit
7b30336177
  1. 2
      .gitignore
  2. 1
      simulator/build.sh
  3. 790
      simulator/package-lock.json
  4. 1
      simulator/package.json
  5. 7
      simulator/src/app.css
  6. 0
      simulator/src/app.ts
  7. 11811
      simulator/src/bulma.css
  8. 198
      simulator/src/code site.py
  9. 219
      simulator/src/liste_météo.py
  10. 8764
      simulator/src/meteo_finale.csv
  11. 18
      simulator/src/purify.js
  12. 17
      simulator/src/readme.txt
  13. 115
      simulator/www/simulator.html

2
.gitignore vendored

@ -181,3 +181,5 @@ local.properties
#.project
/simulator/www/simulator.js
*.js.map
/.local/
/simulator/www/simulator.css

1
simulator/build.sh

@ -1,3 +1,4 @@
#!/bin/bash
cd src
../node_modules/typescript/bin/tsc
node purify.js

790
simulator/package-lock.json generated

@ -4,11 +4,801 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"dev": true
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"camelcase": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
"dev": true
},
"clean-css": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
"integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==",
"dev": true,
"requires": {
"source-map": "~0.6.0"
}
},
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"dev": true,
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wrap-ansi": "^2.0.0"
},
"dependencies": {
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
}
}
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"convert-source-map": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz",
"integrity": "sha1-8dgClQr33SYxof6+BZZVDIarMZA=",
"dev": true
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"css": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz",
"integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
"source-map": "^0.6.1",
"source-map-resolve": "^0.5.2",
"urix": "^0.1.0"
}
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
},
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
"dev": true
},
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
"requires": {
"is-arrayish": "^0.2.1"
}
},
"execa": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"dev": true,
"requires": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
}
},
"find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"dev": true,
"requires": {
"locate-path": "^2.0.0"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"get-caller-file": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
"dev": true
},
"get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
"dev": true
},
"glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"graceful-fs": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==",
"dev": true
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": {
"function-bind": "^1.1.1"
}
},
"hosted-git-info": {
"version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
"invert-kv": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
"dev": true
},
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
"is-core-module": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz",
"integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==",
"dev": true,
"requires": {
"has": "^1.0.3"
}
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"requires": {
"number-is-nan": "^1.0.0"
}
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
"dev": true
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
},
"lcid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
"dev": true,
"requires": {
"invert-kv": "^1.0.0"
}
},
"load-json-file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
"pify": "^2.0.0",
"strip-bom": "^3.0.0"
}
},
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"dev": true,
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
}
},
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"dev": true,
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"mem": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
"integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
"dev": true,
"requires": {
"mimic-fn": "^1.0.0"
}
},
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
"dev": true
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"normalize-package-data": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
"integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"dev": true,
"requires": {
"hosted-git-info": "^2.1.4",
"resolve": "^1.10.0",
"semver": "2 || 3 || 4 || 5",
"validate-npm-package-license": "^3.0.1"
}
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"dev": true,
"requires": {
"path-key": "^2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
},
"os-locale": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
"integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
"dev": true,
"requires": {
"execa": "^0.7.0",
"lcid": "^1.0.0",
"mem": "^1.1.0"
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
"dev": true
},
"p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"dev": true,
"requires": {
"p-try": "^1.0.0"
}
},
"p-locate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"dev": true,
"requires": {
"p-limit": "^1.1.0"
}
},
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
"dev": true
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"dev": true,
"requires": {
"error-ex": "^1.2.0"
}
},
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
"dev": true
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true
},
"path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"path-type": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
"dev": true,
"requires": {
"pify": "^2.0.0"
}
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
"dev": true
},
"purify-css": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/purify-css/-/purify-css-1.2.5.tgz",
"integrity": "sha512-Vy4jRnV2w/kUjTyxzQOKbFkqwUe6RNLuZgIWR/IRQ8nCqRwiFgwC9XiO9+8poq5KL053uWAQnCSbsfihq77zPg==",
"dev": true,
"requires": {
"clean-css": "^4.0.12",
"glob": "^7.1.1",
"rework": "^1.0.1",
"uglify-js": "^3.0.6",
"yargs": "^8.0.1"
}
},
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
"dev": true,
"requires": {
"load-json-file": "^2.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^2.0.0"
}
},
"read-pkg-up": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
"dev": true,
"requires": {
"find-up": "^2.0.0",
"read-pkg": "^2.0.0"
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
},
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true
},
"resolve": {
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
"integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
"dev": true,
"requires": {
"is-core-module": "^2.2.0",
"path-parse": "^1.0.6"
}
},
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
"integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
"dev": true
},
"rework": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz",
"integrity": "sha1-MIBqhBNCtUUQqkEQhQzUhTQUSqc=",
"dev": true,
"requires": {
"convert-source-map": "^0.3.3",
"css": "^2.0.0"
}
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
},
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"dev": true,
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
"signal-exit": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz",
"integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==",
"dev": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"source-map-resolve": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
"integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
"dev": true,
"requires": {
"atob": "^2.1.2",
"decode-uri-component": "^0.2.0",
"resolve-url": "^0.2.1",
"source-map-url": "^0.4.0",
"urix": "^0.1.0"
}
},
"source-map-url": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
"integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
"dev": true
},
"spdx-correct": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
"integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
"dev": true,
"requires": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-exceptions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
"integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
"dev": true
},
"spdx-expression-parse": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
"integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"dev": true,
"requires": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-license-ids": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz",
"integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==",
"dev": true
},
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
"ansi-regex": "^3.0.0"
}
}
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
"dev": true
},
"typescript": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz",
"integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==",
"dev": true
},
"uglify-js": {
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz",
"integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==",
"dev": true
},
"urix": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
"integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
"dev": true
},
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"dev": true,
"requires": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
}
},
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"dev": true,
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1"
},
"dependencies": {
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
}
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
"y18n": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
"integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
"dev": true
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
"dev": true
},
"yargs": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
"dev": true,
"requires": {
"camelcase": "^4.1.0",
"cliui": "^3.2.0",
"decamelize": "^1.1.1",
"get-caller-file": "^1.0.1",
"os-locale": "^2.0.0",
"read-pkg-up": "^2.0.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^7.0.0"
}
},
"yargs-parser": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
"integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
"dev": true,
"requires": {
"camelcase": "^4.1.0"
}
}
}
}

1
simulator/package.json

@ -9,6 +9,7 @@
},
"dependencies": {},
"devDependencies": {
"purify-css": "^1.2.5",
"typescript": "^4.4.3"
},
"keywords": [

7
simulator/src/app.css

@ -0,0 +1,7 @@
input[type=number] {
-moz-appearance:textfield;
}
.wide-label .field-label {
flex-grow: 2.5;
}

0
simulator/src/app.ts

11811
simulator/src/bulma.css vendored

File diff suppressed because it is too large Load Diff

198
simulator/src/code site.py

@ -1,198 +0,0 @@
import matplotlib.pyplot as plt
import numpy as np
import urllib.request
def meteo_choix(choix_utilisateur): #par heures sur la zone géographique concerné
lines = urllib.request.urlopen('https://vhelio.org/wp-content/uploads/2021/09/meteo_finale.csv').readlines()
H1a=[]
H1b=[]
H1c=[]
H2a=[]
H2b=[]
H2c=[]
H2d=[]
H3=[]
del lines[0]
del lines[0]
del lines[8761]
del lines[8760]#suppression des ';' en fin de csv
for line in lines:
line = line.split(';')
line[0]=line[0].rstrip(';')
H1a.append(float(line[0]))
H1b.append(float(line[1]))
H1c.append(float(line[2]))
H2a.append(float(line[3]))
H2b.append(float(line[4]))
H2c.append(float(line[5]))
H2d.append(float(line[6]))
H3.append(float(line[7]))
del line[8]
del line[9]
del line[10]
if choix_utilisateur=='h1a':
return H1a
if choix_utilisateur=='h1b':
return H1b
if choix_utilisateur=='h1c':
return H1c
if choix_utilisateur=='h2a':
return H2a
if choix_utilisateur=='h2b':
return H2b
if choix_utilisateur=='h2c':
return H2c
if choix_utilisateur=='h2d':
return H2d
if choix_utilisateur=='h3':
return H3
return 'erreur dans la saisie de la composante de la région'
def liste_annee_function(donnee_annee):#permet de séparer les 8760 données soit 365 jours avec 24 données + le jour de la semine (lundi,mardi,etc)
annee=[]
jour=[]
l=0
heure_aller=8
heure_retour=16
heure_promenade_week_end=10
semaine=['lundi','mardi','mercredi','jeudi','vendredi','samedi','dimanche']
for i in range (len(donnee_annee)):
if i==0:
jour.append([donnee_annee[i],0])
continue
else:
if i%24==0:#permet de diviser les données par pack de 24 (soit un jour)
jour.append(semaine[l])
if jour[-1]=='dimanche' or jour[-1]=='samedi' :
jour[heure_promenade_week_end][1]=2# pour le week end on suspose une balade qui dure la distance moyenne journalière
else:
jour[heure_aller-1][1]=1#le vhelio sera utiiser a cette heure là
jour[heure_retour-1][1]=1
annee.append(jour)
jour=[]
jour.append([donnee_annee[i],0])
if l==6:
l=0
else:
l=l+1
continue
jour.append([donnee_annee[i],0])
annee.append(jour)
return annee
def Capacite_batt_dans_le_temps(liste_annee,conso_WH_par_km, capacite_batt,distance_moyenne):
rendement_panneau=0.15
surface_panneau=1
capacite_batt_reel=capacite_batt
compteur_de_charges=0
liste_finale=[]
prix_moyen_kwh=0.192
electricite_utilise_par_le_moteur=0
for jours in range(len( liste_annee)):
for heures in range(len(liste_annee[jours])-1):
infos=liste_annee[jours][heures]
# la capacité de la batterie varie selon ce que le panneaux fournit et la consommation éléctrique pendant l'utilisation du vhélio
electricite_utilise_par_le_moteur= electricite_utilise_par_le_moteur+infos[1]*conso_WH_par_km*distance_moyenne/2
capacite_batt_reel=capacite_batt_reel+ infos[0]*rendement_panneau*surface_panneau*1-infos[1]*conso_WH_par_km*distance_moyenne/2
if capacite_batt_reel>capacite_batt:
capacite_batt_reel=capacite_batt
if capacite_batt_reel<=0:
capacite_batt_reel=capacite_batt
compteur_de_charges=compteur_de_charges+1
infos.append(capacite_batt_reel)
liste_finale.append(capacite_batt_reel/capacite_batt*100)
return liste_finale,liste_annee,compteur_de_charges,compteur_de_charges*(capacite_batt/1000)*prix_moyen_kwh, electricite_utilise_par_le_moteur
def consommation_wh_par_km_estimation (denivele,poids):
#Après les expèriences faites on arrive sur une moyenne de 16 sur du plat et 25 en montée (c'estdonnées seront mise à jour avec les nouveaux tests du vhélio 4)
composante_poids=0
composante_poids=(4/200)*poids# approche linéaire
if poids>=200:
composante_poids=4
if poids<=0:
composante_poids=0
if denivele==0:
return 14+composante_poids
if denivele>500:
return 21+composante_poids#21 est une moyenne entre la consommation en montée et la consommation en descente sur une distance moyenne
return 14+(7/500)*denivele+composante_poids# approximation linéaire de la consommation éléctrique
def fonction_fianale(capacite_battrie_desiree,distance_moyenne_jour,denivele,poids,liste_ensolleillement_annee):
#cette fonction utilise toute les fonctions définis avant et permet l'affichage
liste_ensolleillement_finale=liste_annee_function(liste_ensolleillement_annee)
liste_finale,liste_annee,compteur_de_charges,prix_annee,electricite_conso=Capacite_batt_dans_le_temps(liste_ensolleillement_finale,consommation_wh_par_km_estimation(denivele,poids),capacite_battrie_desiree,distance_moyenne_jour)
couverture_solaire=round(100*(electricite_conso-(compteur_de_charges+1)*capacite_battrie_desiree)/electricite_conso)
abs=np.linspace(0,8758,8759)
xlabels = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin","Juillet","Aout", "Septembre", "octobre", "Novembre", "Décembre"]
ord=liste_finale
70
plt.plot(abs,ord)
plt.xlabel(" ------|------------été--------------|---------------")
plt.ylabel('%')
plt.title(" Pourcentage de charge dans la batterie en fonction des heures de l'année " )
plt.show()
print('il faudra recharger le vhelio sur secteur environ',compteur_de_charges,"fois sur l'annee")
print("cela coutera" ,round(prix_annee,2),"€ sur l'annee")
print("la couverture solaire du vhelio est de",couverture_solaire,'%')
#%%
print('Quelle capacite de batterie envisagez vous?\n(exemple: tapez" "700")' )
capacite_battrie_desiree=float(input())
print('Combien de kilometres fait vous chaque jour\n(exemple: tapez "10")')
distance_moyenne_jour=float(input())
print('Quel est le denivele moyen de votre trajet journalier (en metres).\nPour indication: "0" signifie que le trajet se fait sur du plat, "100"m :legerement vallonne, "200": plutot vallonne, "300": vallonne, "500": montagneux, (exemple: tapez "100")')
denivele=float(input())
print("Quel est le poids embarque en plus du conducteur (bagages + passagers).\n(exemple: un passagers de 80kg+50kg de chargement soit 130 kg.\nIl faut taper 130 dans le simulateur.)\n")
poids=(float(input()))
print("Veuillez rentrer votre zone climatique en miniscule.\nElle est indiquer sur la carte de france ci-dessus\n(exemple: taper h1a ou h2c) surtout ecrire les 3 caracteres en minuscules.")
zone_climatique=input()
liste_ensolleillement_annee=meteo_choix(zone_climatique)
fonction_fianale(capacite_battrie_desiree,distance_moyenne_jour,denivele,poids,liste_ensolleillement_annee)
# .Le projet Vhélio est libre et collaboratif. Cette version du simulateur est une première version largement améliorable. N'hésitez pas à vous inscrire en tant que faiseur pour nous aider à l'améliorer.
# Lien : https://www.helloasso.com/associations/velo-solaire-pour-tous/adhesions/adhesion-a-l-association-velo-solaire-pour-tous-faiseur

219
simulator/src/liste_météo.py

@ -1,219 +0,0 @@
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 9 11:56:41 2021
@author: hugo
"""
import csv
import numpy as np
import matplotlib.pyplot as plt
def charge_fichier_csv(fichier, delimiter=";",N=0):
"""
Charge un fichier csv et le renvoie sous forme de tableau
:param: nom de fichier, délimiteur de cellules (par défaut ";"),
nombre de lignes d'en-tête (en comptant les lignes vides)
:returns: tableau des données
"""
with open(fichier, 'r') as f :
rfichier = csv.reader(f, delimiter=delimiter)
tableau=[]
index_row=0
for row in rfichier:
if index_row < N:
index_row = index_row+1
else :
for i in range (len(row)):
if len(tableau) <= i:
X = []
tableau.append(X)
try:
tableau[i].append(float(row[i].replace(",",'.')))
except ValueError:
print('erreur:contenu de cellule non numerique')
continue
return (tableau)
tableau=charge_fichier_csv('meteo_moy.csv',delimiter=";",N=1)
H1a=tableau[4]
H1b=tableau[5]
H1c=tableau[6]
H2a=tableau[7]
H2b=tableau[8]
H2c=tableau[9]
H2d=tableau[10]
H3=tableau[11]
# print(H1a)
h1a=[40.5, 60.6, 98.5, 139.5, 159.9, 180.2, 130.1, 163.0, 131.9, 89.9, 32.6, 37.2]
h1b=[45.7, 62.3, 110.2, 147.4, 173.0, 157.2, 127.0, 150.7, 154.1, 57.5, 33.3, 23.0]
h1c=[33.0, 79.0, 127.5, 146.1, 146.9, 190.4, 140.5, 169.0, 98.7, 75.7, 44.0, 42.8]
h2a=[43.2, 68.6, 120.5, 146.5, 185.8, 184.6, 135.5, 163.0, 158.8, 86.2, 48.7, 46.3]
h2b=[56.6, 77.8, 126.2, 174.2, 205.9, 236.2, 167.7, 196.2, 204.3, 78.9, 58.7, 32.6]
h2c=[62.6, 86.5, 140.7, 153.0, 180.4, 196.9, 152.0, 174.3, 178.0, 101.9, 50.8, 41.3]
h2d=[97.9, 135.3, 185.5, 212.4, 214.4, 293.7, 217.5, 256.1, 196.4, 128.9, 105.5, 93.7]
h3=[120.2, 153.9, 179.4, 209.0, 247.8, 273.8, 219.9, 241.4, 173.6, 144.3, 92.0, 98.3]
liste_mois=[[31,14,10],[28,13,11],[31,12,12],[30,10,14],[31,8,16],[30,8,16],[31,8,16],[31,9,15],[30,11,13],[31,13,11],[30,15,9],[31,15,9]]
#liste mois est une liste contenant 3 infos pour chaque moi (mois janvier etc ) le nb de jours du mois
#le nombre d''heure de nuit par jour , et le nombre de jours par jours
#mois=[janvier,fevrier,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre]
def creation_liste_annee (zone_geo,liste_mois):
liste_annee=[]
#objectif créer la liste année soit 365 element(jours) contenant 24 (heurs et ensolleillement)element avec les heure de nuit ou y'a 0 soleil et les heure de jours qui sont la moyenne solaire du mois divisee par le nombre d'heure ensolleiller
#ci-dessous heure du matin
for mois in range (len(liste_mois )):
for jour_par_moi in range (liste_mois[mois][0]):
liste_jour=[]
if liste_mois[mois][2]%2==0:
for w in range (int(liste_mois[mois][1]//2)):
liste_jour.append(0)
else:
for w in range (int(liste_mois[mois][1]//2)+1):
liste_jour.append(0)
#ci dessus on ajoute les heure de soleil
for heure_soleil in range(liste_mois[mois][2]):
ratio_moy_heure_soleil=liste_mois[mois][0]/liste_mois[mois][2]
liste_jour.append(zone_geo[mois]*ratio_moy_heure_soleil)
# ci-dessous heure de la après midi nuit
for i in range (int(liste_mois[mois][1]//2)):
liste_jour.append(0)
liste_annee.append(liste_jour)
return liste_annee
def Specification_jour_semaine(liste_annee,heure_aller,heure_retour):
annee=[]
jour=[]
l=0
semaine=['lundi','mardi','mercredi','jeudi','vendredi','samedi','dimanche']
for i in range ((len(liste_annee))):
jour.append(liste_annee[i])
#le 0 c'est l'indicateur d'activité pourune heure donné
jour.append(semaine[l])
#if jour[-1]=='dimanche':
# jour[0][heure_promenade_dimanche]=2
# else:
# jour[0][heure_aller-1]=1
# " jour[0][heure_retour-1]=1
annee.append(jour)
jour=[]
if l==6:
l=0
else:
l=l+1
continue
annee.append(jour)
return annee
def Capacite_batt_dans_le_temps(liste_annee,conso_WH_par_km, capacite_batt,distance_moyenne,heure_de_rentre,heure_de_sortie):
rendement_panneau=0.15
surface_panneau=1
capacite_batt_reel=capacite_batt
compteur_de_charges=0
liste_finale=[]
prix_moyen_kwh=0.146
activite=0
for jours in range(len( liste_annee)):
for heures in range(len(liste_annee[jours][0])):#ya le jour dans la semaine en 25 position
infos=liste_annee[jours][0]#selection de la liste avec l'ensolleillement sur une journée
if liste_annee[jours][1]!='dimanche':
if heures==heure_de_rentre or heures==heure_de_sortie:
activite=1
else:
activite=0
else:
activite=0
capacite_batt_reel=capacite_batt_reel+ infos[heures]*rendement_panneau*surface_panneau*1-activite*conso_WH_par_km*distance_moyenne/2
if capacite_batt_reel>capacite_batt:
capacite_batt_reel=capacite_batt
if capacite_batt_reel<=0:
capacite_batt_reel=capacite_batt
compteur_de_charges=compteur_de_charges+1
infos.append(capacite_batt_reel)
liste_finale.append(capacite_batt_reel)
return liste_finale,liste_annee,compteur_de_charges,compteur_de_charges*(capacite_batt/1000)*prix_moyen_kwh
def consommation_wh_par_km_estimation (denivele):
if denivele==0:
return 16
if denivele>500:
return 25
return 16+(9/500)*denivele# approximation inéaire de la consommation éléctrique
#%%
meteo=h1a
capacite_battrie_desiree=700
distance_moyenne_jour=10
denivele=100
heure_aller=8
heure_retour=16
annee=creation_liste_annee(meteo,liste_mois)
annee2=Specification_jour_semaine(annee,heure_aller,heure_retour)
liste_finale,liste_annee,compteur_de_charges,prix_annee=Capacite_batt_dans_le_temps(annee2,consommation_wh_par_km_estimation(denivele),capacite_battrie_desiree,distance_moyenne_jour,heure_aller,heure_retour)
plt.figure(1)
abs=np.linspace(0,8759,8760)
ord=liste_finale
plt.plot(abs,ord)
plt.xlabel('heures')
#plt.grid(True)
plt.ylabel('Wh dans la batterie ')
plt.title(" Wh dans la batterie e fonction de l'annee " )
plt.legend()
plt.show()
print(compteur_de_charges)
print(prix_annee)
# def import_data(lien_zone_climatique):#fonction permettant de récupèrer es données d'ensolleillement
# #par heures sur la zone géographique concerné
# lines = urllib.request.urlopen(lien_zone_climatique).readlines()
# liste_data=[]
# del lines[0]
# for line in lines:
# line=line.decode("utf-8")
# line = line.split(';')
# data=line[0]
# data_float=float(data)
# liste_data.append(data_float)
# return liste_data

8764
simulator/src/meteo_finale.csv

File diff suppressed because it is too large Load Diff

18
simulator/src/purify.js

@ -0,0 +1,18 @@
const purify = require("purify-css")
// Reference of all HTML files from root directory
let content = ['../www/*.html'];
// Reference of all CSS files from root directory
let css = ['*.css'];
let files = {
output: '../www/simulator.css',
whitelist: ['is-multiple', 'is-loading', 'is-narrow'],
minify: true,
info: true
};
purify(content, css, files, function (purifiedAndMinifiedResult) {
console.log(purifiedAndMinifiedResult);
});

17
simulator/src/readme.txt

@ -1,17 +0,0 @@
--Readme--
réalisé par
Trachsel Hugo
pour le projet Vhélio
--Utilisation du code python--
-télécharger puis dézipper les fichiers.
-mettre le fichier météo_finale.csv dans le même dossier que le fichier code.py .
-Lancer le fichier code.py sur une interface supportant le language python(éviter les versions en ligne qui n'ont pas toutes les bibliothèques).
-Lancer le code.
-Tapez les données demandées dans la console pyhton.
-Lire les résultats.

115
simulator/www/simulator.html

@ -1,6 +1,119 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="simulator.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css">
</head>
<body>
<p id="test"></p>
<section class="section">
<div class="container">
<div class="simulation-parameters">
<div class="wide-label">
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Capacité de la batterie</label>
</div>
<div class="field-body">
<div class="field has-addons">
<p class="control is-expanded">
<input name="battery-capacity" class="input" type="number" min="1" value="700"/>
</p>
<p class="control">
<a class="button is-static">kWh</a>
</p>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Poids (bagages + passagers)</label>
</div>
<div class="field-body">
<div class="field has-addons">
<p class="control is-expanded">
<input name="additional-weight" class="input" type="number" min="1" value="130"/>
</p>
<p class="control">
<a class="button is-static">kg</a>
</p>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Zone climatique</label>
</div>
<div class="field-body">
<div class="field has-addons">
<div class="control is-expanded">
<div class="select is-fullwidth">
<select>
<option>h1a</option>
<option>h1b</option>
<option>h1c</option>
<option>h2a</option>
<option>h2b</option>
<option>h2c</option>
<option>h2d</option>
<option>h3</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Distance quotidienne</label>
</div>
<div class="field-body">
<div class="field has-addons">
<p class="control is-expanded">
<input name="daily-distance" class="input" type="number" min="1" value="10">
</p>
<p class="control">
<a class="button is-static">km/jour</a>
</p>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Dénivelé positif quotidien</label>
</div>
<div class="field-body">
<div class="field has-addons">
<p class="control is-expanded">
<input name="daily-elevation" class="input" type="number" min="0" value="100">
</p>
<p class="control">
<a class="button is-static">m/jour</a>
</p>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
</div>
<div class="field-body">
<div class="field">
<p class="control is-expanded">
<a class="button is-primary is-fullwidth">Simuler</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script type="text/javascript" src="simulator.js"></script>
</body>

Loading…
Cancel
Save