Population_Study/Run_Simulations.sh
2025-12-23 17:56:53 -07:00

91 lines
3.9 KiB
Bash

#Run all simulations as needed. Comment out to skip any. All but the primary results have 10^5 simulations
echo "Starting all model Simulations. This will take a while!!"
#start_time=$(date +%s)
#Rscript 1A_Run_Full_Simulation_2016.r
#echo "Pre-2016 data simulations for benchmark complete! 100k simulations total"
#end_time=$(date +%s)
#elapsed_seconds=$((end_time - start_time))
#hours=$((elapsed_seconds / 3600))
#minutes=$(( (elapsed_seconds % 3600) / 60 ))
#seconds=$(( elapsed_seconds % 60 ))
#printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"
start_time=$(date +%s)
Rscript 1B_Run_Full_Simulation.r
echo "Main results with variable migration rates complete! 1 million simulations total"
end_time=$(date +%s)
elapsed_seconds=$((end_time - start_time))
hours=$((elapsed_seconds / 3600))
minutes=$(( (elapsed_seconds % 3600) / 60 ))
seconds=$(( elapsed_seconds % 60 ))
printf "Execution time: %02d hours, %02d minutes, %02d seconds\n" "$hours" "$minutes" "$seconds"