text
stringlengths
0
234
decision.startTime := ArrivTime;
spush(decision);
---
--if dagobah > 0 then
--put("Dagobah Count: ");put(dagobah);new_line;
--put("-----------------------------------------------------------------------------------");new_line;
--end if;
---
starKnt := starKnt +1;
--put("Number of Arrivals: ");put(numberArrivals);new_line;
put(Image(startTime, Time_Zone => -5*60) );put(":");new_line;
put(decision.vehicleName & " Arrived");new_line(2);
-- put("-----------------------------------------------------------------------------------");new_line;
else
intTie := intTie + 1;
if intTie = 91 then
intTie := 65;
end if;
charTie := intToChar(intTie);
decision.vehicleName(4) := charTie;
decision.time2Fix := 3;
ArrivTime := clock;
decision.startTime := ArrivTime;
departTime := clock;
decision.finishTime := departTime;
tpush(decision);
--
--
tieKnt := tieKnt + 1;
put(Image(startTime, Time_Zone => -5*60) );put(":");new_line;
put(decision.vehicleName & " Arrived");new_line(2);
end if;
if tieKnt + starKnt > 20 then
dagobah := dagobah + 1;
end if;
if dagobah > 0 then
put("Dagobah Count: ");put(dagobah);new_line;
put("-----------------------------------------------------------------------------------");new_line;
end if;
end loop;
--Lab Step 2.
if starKnt > 0 then
spop(decision); starKnt := starKnt - 1;repairStar:= repairStar+ 1;
delay 3.0;
put("-----------------------------------------------------------------------------------");new_line;
put("Vehicle Type: ");put(vehicle'image(decision.vehicleType));new_line;
put("Vehicle Name: " & decision.vehicleName);new_line;
put("Time to Fix: ");put(decision.time2Fix,0);new_line;
put("Start Time: ");put(Image(decision.startTime, Time_Zone => -5*60) );new_line;
departTime := clock;
--finishTime := departTime;
put("Finish Time: ");put(Image(departTime, Time_Zone => -5*60 ));new_line;
put("-----------------------------------------------------------------------------------");new_line;
--if dagobah > 0 then
-- put("Dagobah Count: ");put(dagobah);new_line;
--end if;
elsif starKnt = 0 then --and tieKnt > 0
tpop(decision); tieKnt := tieKnt - 1;repairTie := repairTie + 1;
delay 1.00;
put("-----------------------------------------------------------------------------------");new_line;
put("Vehicle Type: ");put(vehicle'image(decision.vehicleType));new_line;
--put("Vehicle Name: " & decision.vehicleName);new_line;
put("Vehicle Name: " & decision.vehicleName);new_line;
put("Time to Fix: ");put(decision.time2Fix,0);new_line;
put("Start Time: ");put(Image(decision.startTime, Time_Zone => -5*60) );new_line;
departTime := clock;
--finishTime := departTime;
put("Finish Time: ");put(Image(departTime, Time_Zone => -5*60));new_line;
--put("Start Time: ");put(Image(decision.startTime, Time_Zone => -5*60) );new_line;
put("-----------------------------------------------------------------------------------");new_line;
end if;
-- do the operations.
--Lab Step 3.
-- do the operations.
--Lab Step 4.
-- do the operations, prepare for the vext repair operations.
if dagobah >= 5 then
put("Total Time Elpased: ");put(Duration'image(Clock - startTime));put(" Seconds");new_line;
put("No of Vehicles Repaired: ");put(repairStar + repairTie);put(" Vehicles");new_line;
--put("No of Vehicles Repaired: ");put(repairStar + repairTie);put(" Vehicles");new_line;
put("No of Star Destroyers Repaired: ");put(repairStar);new_line;
put("No of Tie Fighters Repaired: ");put(repairTie);new_line;
exit;
end if;