First, install all dependencies
npm install
then you will be able to proceed with one of the actions below.
Then you will be able to build the project with:
npm run build
Then you will be able to build the project and then running it with:
npm run build && npm start
To run all unit tests defined in /test/
, use:
npm test
To rebuild and start the application when a file in the project is saved, use:
npm run dev
name | description | default |
---|---|---|
MONGODB_HOST |
Host with a mongo instance running, may include port number | |
MONGODB_DATABASE |
Database to use | |
MONGODB_USERNAME (optional) |
Username to access database | None |
MONGODB_PASSWORD (optional) |
Password to access database | None |
SERVER_PORT (optional) |
Specify on which port the HTTP server will listen on. | 8080 |
MAX_WINDSPEED_CHANGE (optional) |
Maximum change of windspeed in one simulation cycle. | 0.002 |
HELLMAN_EXPONENT (optional) |
Hellman exponent used to estimate windspeed. | 0.34 |
INITIAL_WINDSPEED (optional) |
Windspeed when simulator starts, if last value in DB was empty. | 4.5 |
MARKET_DEMAND_EFFECT (optional) |
Imbalance multiplier when demand != supply . |
1 |
MARKET_NAME (optional) |
Name of electricity market to use in simulation. | "default" |
POWERPLANT_NAME (optional) |
Name of powerplant to use in simulation. | "default" |
Build the docker image.
docker build . -t aeolus/simulator
Run a docker container with the newly built image.
docker run -d aeolus/simulator
To add enviroment variables, add --env VARIABLE=VALUE
for each enviroment variable to use.