diff --git a/openfido.sh b/openfido.sh index 2c6d0d7..fd6ad3c 100644 --- a/openfido.sh +++ b/openfido.sh @@ -93,10 +93,10 @@ elif [ "$ANALYSIS" = "pole_analysis" ]; then CSV_NAME="poles_w_equip_and_network" GLM_NAME="network" - USECASES=("loading_scenario" "critical_speed" "worst_angle") + USECASES="loading_scenario critical_speed worst_angle" RESULT_NAME="results" POLE_OPTION="" - if [[ -n "$POLE_NAME" ]]; then + if [ -n "$POLE_NAME" ]; then POLE_OPTION="--poles_selected=pole_$POLE_NAME" POLE_NAME="$POLE_NAME\_" fi @@ -107,7 +107,7 @@ elif [ "$ANALYSIS" = "pole_analysis" ]; then gridlabd -D csv_load_options="-f table -t object -M powerflow -o $OPENFIDO_OUTPUT/$GLM_NAME.glm" $OPENFIDO_OUTPUT/$CSV_NAME.csv echo "Pole analysis on GLM file" if [[ "$USECASE" = "all" ]]; then - for option in "${USECASES[@]}"; do + for option in ${USECASES}; do echo "Running $option usecase" gridlabd pole_analysis $OPENFIDO_OUTPUT/$GLM_NAME.glm --analysis=$option --wind_speed=$WIND_SPEED --wind_direction=$WIND_DIR --direction_increment=$WIND_DIR_INC --speed_increment=$WIND_SPEED_INC --segment=$POLE_DIV --output=$OPENFIDO_OUTPUT/$RESULT_NAME\_$POLE_NAME$option.csv $POLE_OPTION done