Skip to content

Instantly share code, notes, and snippets.

@revolunet
Created October 24, 2022 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save revolunet/305344701cc078339a15289093fe9641 to your computer and use it in GitHub Desktop.
Save revolunet/305344701cc078339a15289093fe9641 to your computer and use it in GitHub Desktop.
publi.codes modele teletravail
# Bienvenue dans le bac à sable du langage publicode !
# Pour en savoir plus sur le langage :
# => https://publi.codes/documentation/principes-de-base
# Quelques variables à paramétrer pour la simulation
mode-transport: "'train'"
maison:
avec:
consommation-electrique-par-usager: 42 kwH
type-chauffage: "'collectif'"
heures-visio: 4
bureau:
avec:
distance: 50km
consommation-electrique-par-usager: 34 kwH
# en dessous ce sont les "formules" (valeurs fantaisisites)
consommations:
avec:
# https://www.actu-environnement.com/ae/news/ademe-etude-effets-rebond-teletravail-visioconference-benefices-environnementaux-36194.php4#:~:text=La%20visioconf%C3%A9rence%20parmi%20les%20effets%20rebond%20d%C3%A9favorables&text=%C3%80%20noter%20%3A%20une%20minute%20de,un%20jour%20de%20t%C3%A9l%C3%A9travail%20hebdomadaire.
visio: 60 gCO2/h
transports:
variations:
- si: mode-transport = 'voiture'
alors: 92 gCO2e/km
- si: mode-transport = 'metro'
alors: 30 gCO2e/km
- si: mode-transport = 'train'
alors: 20 gCO2e/km
- si: mode-transport = 'velo-electrique'
alors: 20 gCO2e/km
- sinon: 0
chauffage:
variations:
# https://www.economiedenergie.fr/les-emissions-de-co2-par-energie/
- si: maison . type-chauffage = 'chaudiere-a-bois'
alors: 30 gCO2e/kWh
- si: maison . type-chauffage = 'pompe-a-chaleur'
alors: 49 gCO2e/kWh
- si: maison . type-chauffage = 'collectif'
alors: 100 gCO2e/kWh
- si: maison . type-chauffage = 'electrique'
alors: 147 gCO2e/kWh
- si: maison . type-chauffage = 'gaz'
alors: 227 gCO2e/kWh
- si: maison . type-chauffage = 'fioul'
alors: 324 gCO2e/kWh
- sinon: 0
# total de la conso si je vais au bureau
conso-bureau:
somme:
- bureau . consommation-electrique-par-usager * 8
- consommations . transports * bureau . distance * 2 # A/R au bureau
# total de la conso si je reste at home
conso-maison:
aide: blablala
somme:
- maison . consommation-electrique-par-usager * 8
- consommations . chauffage * 8
- consommations . visio * maison . heures-visio
comparaison:
variations:
- si: conso-maison > conso-bureau
alors: "'Il faut y aller maintenant dude'"
- sinon: "'Pour la planète c'est mieux de rester chez toi'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment