/* called by: entrance ctrl of the object 'track'
9 q1 y c/ O! b! N6 R*/4 A3 u% J1 b' y6 M& a
is4 d: [- @& f9 s7 {/ v( v8 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ p+ j/ \0 L: W5 h! q- Jdo [! c- F3 U4 p9 o4 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
" h; F/ o9 V' O5 }& J" F, X if current = @.Destination -- else return
+ \- @+ f! g9 @* h. O then) |$ d# P9 Q0 C6 o# S+ @( q3 |
@.Destination := void;
, [3 a+ N: y( \8 K7 l6 r. ?* n. x& S if @.occupied then
1 O$ s2 I7 I' Z2 `. K) [ part := @.cont;
4 U6 g- n2 L% Z @.transpOrder := void;
$ y8 Q' L. I; h/ R: K7 v; R8 j7 }3 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, ]: d: F, B7 ^% C# Z9 ~ P$ C
@,root.eventcontroller.simTime);9 i$ u: e% i8 _, _
@.HasOrder := false;; f4 [% V P4 c! A5 W% C
@.DrivingHome := true;
: y; k/ h( h% [( z rgManager.tryToStartTransOrder;$ r# o" m6 |# L6 h. Q! g
if @.Destination = void
- Z& Q5 ?% r4 @# J' L then -- no transport order for vehicle @
+ } ^) w2 S X0 j$ R9 e @.Destination :=
0 |% {' S2 H* {. h" M: R! [ rgManager.nearestFreeStation(@,track.~);$ v' O, y( Y3 \( o
newDirection(@);
7 v z) ]0 n) r" Q3 i7 `; G5 } if @.Destination /= void then2 s$ [7 H3 `3 _8 ^3 `. `. n
@.Destination.NumReservation :=
. S1 N' r$ L$ p. C7 o$ S @.Destination.NumReservation + 1; T, B4 I5 ]+ r6 r' o$ o4 [
end;
& w2 l& b1 t$ c4 W- Q: m( Q; ?5 l9 E @.CurrIcon := "drivingHome";4 q @, d# l1 @+ g a
@.DrivingHome := true;
6 y6 ~. k y8 G1 ? end;: {- s) _# U" N3 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: v/ D+ P; s/ o+ p/ `5 ]8 }
part := @.transpOrder;) h4 H" \" g' P; z& W* `' Z0 k
part.move(@);-- load part
x8 o& }5 S/ V/ ~2 Z4 o9 m4 _ @.CurrIcon := "load";) w3 d) t8 w( t. H% j0 {' b" }
GlobalDistObj := part.globDestination;$ g$ U% d$ P# S0 W
assignLObj := rgmanager.rgAssignL;# A4 j4 J8 g4 D8 h ^7 e4 J
row := assignLObj.getRowNo(GlobalDistObj);& v, t( Q) X$ r8 Y
if Row = -1 then -- since 70
9 g6 |5 ^2 M* q/ s5 k% w7 n \ if lan=1 then8 _% C$ b7 I! r. H4 \* a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) m- ~. b5 i0 I% u' t to_str("in der Andockstation: \"",?.~.name,"\""));1 t8 t- Y0 L& u; v4 f# ~8 y i
else2 d. \- c; b$ [- D. m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- p* `" t/ X6 N6 U5 P5 U, w
to_str("in docking station: \"",?.~.name,"\"")); + ^8 I" E: A& a# F: t. @
end;
1 q; \8 c: j/ c+ Q. w( T, n0 g( K else
: F8 N' V% Q: N3 L& O) k& i Z- @ @.Destination := assignLObj[1,row];+ T+ G/ Y, H# f7 x6 j/ m
end; $ c( M2 F# M' I" w' F3 w) |
newDirection(@);
1 d c! s% W0 `% l" ~ @.HasOrder := true;
! I( ^0 a9 Y& i; i end;! F1 b. V! [& E& d _, _9 ?8 {
end;9 E4 P6 g+ n, W
end; -- of the method
' a( T! x- T% q2 p' u' M! z3 Z |