-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed base-case bug, included shell run files for base case
- Loading branch information
1 parent
99e7baa
commit 15668c6
Showing
12 changed files
with
136 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
#!/bin/sh | ||
|
||
cd test_cases/base_case/feeder_population || exit | ||
|
||
python_file="feeder_population.py" | ||
text_file="config.txt" | ||
|
||
timestamp_file="exec_timestamp.txt" | ||
|
||
# Function to get the last run time | ||
get_last_run_time() { | ||
if [ -e "$timestamp_file" ]; then | ||
cat "$timestamp_file" | ||
else | ||
echo 0 | ||
fi | ||
} | ||
|
||
# Get the modification times of the files | ||
text_file_time=$(stat -c %Y "$text_file") | ||
last_run_time=$(get_last_run_time) | ||
#printf "Text file time: %s\n" "$(date -d @"$text_file_time")" | ||
#printf "Last run time: %s\n" "$(date -d @"$last_run_time")" | ||
|
||
# Compare the modification times | ||
if [ "$text_file_time" -gt "$last_run_time" ]; then | ||
echo "Feeder config text file has been modified. Running feeder population..." | ||
date +%s > "$timestamp_file" | ||
python3 "$python_file" | ||
else | ||
echo "No feeder pop config changes detected. Feeder population will not be run." | ||
fi | ||
|
||
cd .. || exit | ||
gridlabd python master_sim.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,4 @@ else | |
fi | ||
|
||
cd .. || exit | ||
gridlabd python scenarios.py --scenario 1 | ||
gridlabd python scenarios.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ else | |
fi | ||
|
||
cd .. || exit | ||
gridlabd python scenarios.py --scenario 1 | ||
gridlabd python scenarios.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters