/* called by: entrance ctrl of the object 'track'
; s0 P3 a: W" y5 L; u7 Q3 H*/9 O" b1 X' N; C4 J% L
is
5 L) b$ Q x5 d4 ^" R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ^6 ~1 ?& l! j4 [) A* K$ @/ Kdo
9 y% M! @3 l8 C# m Lan := rootfolder.Internal.Tools.AOLlanguage;6 c* u& @+ d1 N3 t4 d& s* x
if current = @.Destination -- else return- T8 Y; W; `; c5 D! G; x' O
then3 y5 p3 c. W& ^. C$ ?1 t9 N
@.Destination := void;% a0 \' }! P* m6 e
if @.occupied then( Y! D$ C/ t' t, A( l
part := @.cont;
8 p, w D6 M. y, W7 A2 O% z @.transpOrder := void;+ _. o+ C- Y. W/ j e) j6 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
j* A& C* A) _ @,root.eventcontroller.simTime);5 J }: o& G: m( g. l8 X
@.HasOrder := false;
9 ^# J. v `$ Y: T: b @.DrivingHome := true;
0 i# p7 C# X6 s! A+ @& @ rgManager.tryToStartTransOrder;$ b* m7 I! T' n
if @.Destination = void4 ]- }" i9 D1 h; k) b
then -- no transport order for vehicle @
/ x B' F) a8 l( \2 O, l+ C @.Destination :=
; z- ^2 k$ A' t4 s# D" f. f v rgManager.nearestFreeStation(@,track.~);
# s6 x+ ?1 S7 p# E newDirection(@); # F) h6 D$ {3 ]. t% _
if @.Destination /= void then2 [8 x; b5 @$ u6 N% v+ \( ?
@.Destination.NumReservation :=
7 r4 G* y1 w' H& d6 w4 {: {5 `2 @ @.Destination.NumReservation + 1;
6 [; ^( w, _% X$ J( d$ Z end;7 `# g% r: C1 y* b
@.CurrIcon := "drivingHome";* f- C. |) A& [( T) k
@.DrivingHome := true;" z) {5 {- |* `- L; c2 o. j
end;3 q+ z8 J! J; m2 ~* n$ y0 ?, m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 d$ [: i4 o" | part := @.transpOrder;- }6 \9 j' Q$ C8 `( |1 r0 I c( Y
part.move(@);-- load part
6 v: k+ K) i7 ?1 e& D2 v @.CurrIcon := "load";
4 v0 K" n% ]; j& o; ]+ P GlobalDistObj := part.globDestination;& o. ^) e" B4 V( \" l
assignLObj := rgmanager.rgAssignL;
* K! D1 ~1 ^+ G$ m2 W row := assignLObj.getRowNo(GlobalDistObj);1 _: h5 o4 G3 C5 l+ C
if Row = -1 then -- since 708 V* b4 q) r0 {4 i
if lan=1 then6 ?6 d: L( C) r6 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), e: @6 ^5 y9 w: H
to_str("in der Andockstation: \"",?.~.name,"\""));
/ s! H# a! q; L6 p. _ else5 }: x+ g& Y6 u# h7 u( a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ i# t" ~: T, C4 K
to_str("in docking station: \"",?.~.name,"\""));
" T% J! I& X- _. [ o end;; a) F8 k; I) q2 N
else# V: L# @; u# h
@.Destination := assignLObj[1,row];, N$ p) A2 B& v: e/ @
end;
) ]3 V& }* p3 H3 p newDirection(@);
3 U) J- ^& h* a @.HasOrder := true;
! X# t5 d5 K8 f$ Y5 o. C/ o, k/ N$ @ end;) O5 i0 N3 N7 ^+ v% p
end;4 p$ c( F# D. y8 \2 U* b
end; -- of the method
5 l3 m( x) E9 X a' P6 q9 y |