Skip to content

Simulate the interaction of DERs with the Energy Web testnet (Volta)

License

Notifications You must be signed in to change notification settings

TendTo/EW-DER-Simulator

Repository files navigation

EW DER Simulator

Electron app release Contract tests codecov

Simulate the interaction of DERs with the Energy Web testnet (Volta)

🖥 Installation

🧾 Requirements

.env configuration

It is possible to add a .env file to avoid inputting data like the secret key and the addresses every time.
The file must be located in the same folder the simulator is executed from. If using the npm start script provided in this repository, the .env file must be located in the simulator folder.

Example .env

SK=646294b0230399fe75f18d1f5135ec71b42ed4d362378a7913376acd7081d8e5
CONTRACT_ADDRESS=0x384e79D871eA213768F4e91970032a04A7C55993
DER_RPC_URL=http://134.209.139.226:8545
AGG_RPC_URL=http://134.209.139.226:8545
N_SOLAR=1
N_WIND=1
TICK_INCREMENT=1
TICK_INTERVAL=1

⌨️ Steps

# Clone the repository
git clone https://github.com/TendTo/EW-DER-Simulator.git
# Move in the root directory of the project
cd EW-DER-Simulator
# Install all the project's dependencies
npm install
# Compile all the smart contracts and generate the typings
npm run compile
# Deploy the smart contract on the Volta blockchain
npm run deploy:volta
# Start the electron application
npm start

🧪 Test

npm test

Nethermind node

Installation

Hardware requirements
Docs

# On debian based distro
sudo add-apt-repository ppa:nethermindeth/nethermind
sudo apt install nethermind

# On MacOs
brew tap nethermindeth/nethermind
brew install nethermind

It is also possible to download the packages from the official site for other platforms, like Windows.

Launch

Make sure the application is installed correctly and is on the $PATH env variable.

nethermind --config volta --Init.WebSocketsEnabled true --JsonRpc.WebSocketsPort 8545 --JsonRpc.Enabled true --JsonRpc.Host 0.0.0.0

Command options:

  • config: which blockchain to connect to. There are many options, like Mainnet and Ropsten, but we use volta
  • JsonRpc.Enabled: enables the JsonRpc functionalities
  • Init.WebSocketsEnabled: enables the connection via websockets
  • JsonRpc.WebSocketsPort: the port the JsonRpc node will listen on
  • JsonRpc.Host: only accept connections from this IP. 0.0.0.0 means accept from anyone. It would be more secure to specify a single IP

Other more specific options are available here

Flow

flow

Todo

  • Interazione con la blockchain Volta
  • Registrazione di un agreement all'avvio
  • Differenziare il numero di DER per tipologia
  • Aggiungere funzionalità di flessibilità
  • Aggiungere possibilità di imprevisti
  • Rimanere in attesa di Log di flessibilità
  • Aggiungere la visualizzazione dei Log degli agreement
  • Aggiungere scala temporale
  • Aggiungere misura aggregata
  • Aggiungere i pulsanti di chiusura della finestra
  • Verificare il fallimento di registrazioni degli agreement
  • Aggiungere un sistema di notifiche frontend
  • Possibilità di modificare il numero di DER durante la simulazione
  • Aggiungere counter per DER attualmente attivi (che hanno completato la transazione di agreement)
  • Aggiungere baseline energia aggregatore
  • Riportare solo l'ora nel grafico
  • Aumentare la finestra di grafico (magari tramite aggregazione di dati)
  • Grafico fissato attorno alla baseline
  • Aggiungere un nodo Volta separato a cui i DER fanno riferimento
  • Log flessibilità: [2022-08-02T16:46:04.521] [DEBUG] flexibility - 0,25,97,95,95,1
  • Average flexibility in percentuale
  • Pause button
  • Zoom on flexibility
  • Invert flexibility flow
  • Optimize flexibility from typescript

⛏ Tools

📚 Reference

About

Simulate the interaction of DERs with the Energy Web testnet (Volta)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published