@ -6,13 +6,13 @@ Vehicle energy consumption and production simulator. This tool has been created
The easiest way is to use the [online simulator](https://vhelio.org/simulateur-vhelio/).
The easiest way is to use the [online simulator](https://vhelio.org/simulateur-vhelio/).
You can also download the latest pre-built stand-alone version and open `vhelio-simulator.html` in your web browser. The program will run in your browser, but won't communicate with any server, this is a purely local application.
You can also download the latest pre-built stand-alone version and open `vhelio-simulator.html` in your web browser. When executed in this way, the program will run in your browser, but won't communicate with any server, this is a purely local application.
## Building from source
## Building from source
### Dependencies
### Dependencies
The simulator is written in `typescript`, whose compiler depends on `node.js`.
The simulator is written in `typescript`, whose compiler depends on `node.js`. There are a few other build scripts that also need node.js.
The first step is to [install node.js](https://nodejs.org)
The first step is to [install node.js](https://nodejs.org)
console.log('Solar energy ratio: '+Math.round(100*(simulationResult.cumulatedMotorConsumption-(simulationResult.gridChargeCount+1)*vehicle.batteryCapacity)/simulationResult.cumulatedMotorConsumption)+'%');
//console.log('Solar energy ratio: ' + Math.round(100*(simulationResult.cumulatedMotorConsumption-(simulationResult.gridChargeCount+1)*vehicle.batteryCapacity)/simulationResult.cumulatedMotorConsumption) + '%');