Skip to content
Snippets Groups Projects
Commit eca5ab21 authored by pjs's avatar pjs
Browse files

default error msg now uses invoked script name rather than pre-wired


Signed-off-by: default avatarpjs <pjs@alum.mit.edu>
parent bacdd24e
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ if (ARGV.length != 6) ...@@ -126,7 +126,7 @@ if (ARGV.length != 6)
STDERR.puts "\tMaintenance cycle length (int)" STDERR.puts "\tMaintenance cycle length (int)"
STDERR.puts "\tMean repair time (double)" STDERR.puts "\tMean repair time (double)"
STDERR.puts "\tNumber of days to run (int)" STDERR.puts "\tNumber of days to run (int)"
STDERR.puts "\nExample: ruby AoModel.rb 50 2 0.01 90 3.0 50\n" STDERR.puts "\nExample: ruby #{File.basename($0)} 50 2 0.01 90 3.0 50\n"
else else
maxJeeps = ARGV[0].to_i maxJeeps = ARGV[0].to_i
maxMaintainers = ARGV[1].to_i maxMaintainers = ARGV[1].to_i
...@@ -134,7 +134,6 @@ else ...@@ -134,7 +134,6 @@ else
maintenanceCycleInDays = ARGV[3].to_i maintenanceCycleInDays = ARGV[3].to_i
meanRepairTime = ARGV[4].to_f meanRepairTime = ARGV[4].to_f
haltTimeInDays = ARGV[5].to_i haltTimeInDays = ARGV[5].to_i
# Simulation.run(new AoModel(50, 2, 0.01, 90, 3.0, 8.0 * haltTimeInDays))
AoModel.new(maxJeeps, maxMaintainers, breakdownRate, AoModel.new(maxJeeps, maxMaintainers, breakdownRate,
maintenanceCycleInDays, meanRepairTime, 8.0 * haltTimeInDays).run maintenanceCycleInDays, meanRepairTime, 8.0 * haltTimeInDays).run
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment