https://gitlab.com/migvasc/lowcarboncloud/
Raw File
Tip revision: cb0d575f26877718aa9f68595ec5019ee65696ca authored by Miguel Felipe Silva Vasconcelos on 06 February 2023, 15:00:16 UTC
updating fix versions
Tip revision: cb0d575
run_all_parallel.sh
#!/bin/bash
INPUT_FILES="2018.json 2019.json 2020.json 2021.json"

rm -rf results
mkdir results

## Running the experiments
echo '===================================================='
echo 'Running the experiments...'
echo '===================================================='



for input in $INPUT_FILES
do
    python3 scripts/low_carbon_cloud.py --input_file "input/$input" &
done

## Scenario using only power from the grid
python3 scripts/low_carbon_cloud.py --input_file "input/only_grid.json" &

## Scenario using only power from the PV and batteries
python3 scripts/low_carbon_cloud.py --input_file "input/only_pv_bat.json" &

wait


## Extracting the data for each experiment
echo '===================================================='
echo 'Extracting the data from the experiments...'
echo '===================================================='

for input in $INPUT_FILES
do
    python3 scripts/extract_data_figures.py --input_file "input/$input"  &
done

python3 scripts/extract_data_figures.py --input_file "input/only_grid.json"  &
python3 scripts/extract_data_figures.py --input_file "input/only_pv_bat.json"  &


wait

## Extracting data from multiple experiments
python3 scripts/extract_table_v_data.py
python3 scripts/extract_table_vi_vii_data.py
python3 scripts/extract_table_viii_data.py

# Generating  the plots for each experiment

echo '===================================================='
echo 'Generating the plots...'
echo '===================================================='

for input in $INPUT_FILES
do
    Rscript scripts/plots.r $input &
done

wait


echo '===================================================='
echo 'Validating the results...'
echo '===================================================='

python3 scripts/test_output.py --input_file input/files_to_test.json

echo '===================================================='
echo 'All done! You may also validate the results at the results directory'
echo '===================================================='
back to top