/* called by: entrance ctrl of the object 'track'. l2 k1 o# L1 H0 Y E6 U
*/8 i0 |/ T/ D4 R' z: O- t5 @+ ?* |
is' K1 t; y" T$ N7 F2 q: t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ V! `& U+ V6 s" l" i/ L) a3 A
do9 I4 Y; A9 c& ~+ l- M
Lan := rootfolder.Internal.Tools.AOLlanguage;
! C8 m) r) g& w5 H+ r5 P) M if current = @.Destination -- else return
: j0 M: u8 N6 r0 p& t7 C then
& ~8 E1 \4 I& }' p @.Destination := void;
9 _$ ?) }& E! W9 {) c7 K if @.occupied then' G) W- V- E5 V
part := @.cont;
7 f3 z L3 c9 r @.transpOrder := void;: G/ {1 b2 Y6 Q! m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- l$ `* y* n* g. y9 | @,root.eventcontroller.simTime);
8 y1 D+ Q U; H5 O& S) M, U( u @.HasOrder := false;
& M, p0 n8 u3 s8 s9 X* m @.DrivingHome := true;
8 @5 C; ~$ O- r |5 _8 z rgManager.tryToStartTransOrder;0 @, ~1 U0 x1 {/ m! v) n
if @.Destination = void: C9 x" q1 m% K/ n
then -- no transport order for vehicle @
! R$ u# a5 v% K4 e5 e* F @.Destination :=/ c# v. u( q. E: T; j: h
rgManager.nearestFreeStation(@,track.~);" H7 N' [( \$ T; G. F
newDirection(@); 8 G+ f/ I# V) p7 J
if @.Destination /= void then w A+ X: D2 _% |, ?$ X6 e8 N9 i
@.Destination.NumReservation :=3 @" c" p5 O2 Q2 i3 Z5 e: A; z: F) ]
@.Destination.NumReservation + 1;. [. i- O5 J, J2 _
end; q* s. q: R7 W5 h" p: U
@.CurrIcon := "drivingHome";/ U% T* ]& u1 B" X# p |
@.DrivingHome := true;/ L" \& C& r m6 S4 B% Y2 e+ D
end;1 h& K: a% n) J3 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. d2 f* q _' B0 ]7 O; ^. |; n
part := @.transpOrder;7 f8 r0 p: z: G6 z, {; L" \
part.move(@);-- load part
& [$ w- ^4 v5 ?; ` @.CurrIcon := "load";
; W# l8 o" x! ]$ u- \" A# \8 { GlobalDistObj := part.globDestination;: c- X% C* r) D8 Y' ^$ V
assignLObj := rgmanager.rgAssignL; y6 O; h+ k/ n) r+ J0 E
row := assignLObj.getRowNo(GlobalDistObj);
& P' q& k6 w" l' t2 G+ f/ B" u3 j if Row = -1 then -- since 70
- Y. u3 e# X, p! D6 i$ m if lan=1 then b5 J# ?) p7 o# x" b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: H: E S/ |* u$ n' u& a to_str("in der Andockstation: \"",?.~.name,"\""));
! w) k! p* Q7 j) k4 B else W1 l+ ]2 @- l/ q# C# Q5 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 \, u. {% v$ y$ |% [/ } to_str("in docking station: \"",?.~.name,"\"")); 6 k' E: y. |' h* o2 J, }$ O
end;* b4 I. l* U" V" s6 J9 @/ Q
else
' k' v: ? i" V2 T1 n @.Destination := assignLObj[1,row];, o9 f0 |/ Z! m0 |" G
end; + d3 u3 `0 |8 q( E% b" U
newDirection(@);
/ E3 O/ k i# L8 Z8 }* Y @.HasOrder := true;
! W# [) k% a8 `) ^" s* ~# m end;" C+ C! L0 x# u: p$ H0 n( O
end;
) m8 E- l9 Z0 {. J4 T$ f: G Aend; -- of the method8 M6 h R% J7 D$ U
|