/* called by: entrance ctrl of the object 'track'
8 C2 e% U6 O1 Q1 d8 m3 l u*/5 [) l( ^% l* m6 j# d( I
is
8 n F+ K: T! W4 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 i: [7 r @ x) |5 i% Ddo
9 u0 o# d" K/ y+ F Lan := rootfolder.Internal.Tools.AOLlanguage;
! |! D, {2 S1 V! C; v if current = @.Destination -- else return
& E$ o3 S, f. q0 p# N/ z) f+ H$ h then! w6 f/ k* h8 a' p) ~. l: y' B2 S
@.Destination := void;
. ]& F! a/ v% I, n8 ?. y if @.occupied then d) h& O+ h& ^* V: X2 @7 w
part := @.cont;& K0 `# L/ Y4 m' E/ z
@.transpOrder := void;2 Z1 N1 o- K6 a5 |# q1 V' ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ x2 V2 a! @! J8 ?+ } @,root.eventcontroller.simTime);2 s0 K1 d% P ~
@.HasOrder := false;
+ B6 W$ |- d& L' Y @.DrivingHome := true;9 h* m: I/ c0 N7 b$ l s
rgManager.tryToStartTransOrder;
1 \/ G4 j! d5 L) @2 V if @.Destination = void
0 \; y$ b+ l4 l; E1 X then -- no transport order for vehicle @9 v% I: }: T# J( f3 V
@.Destination :=4 r3 Z: E& N5 b) n
rgManager.nearestFreeStation(@,track.~);
1 J' L* n! z3 T newDirection(@);
* C: W) G( v% \, ^. i$ [# u2 J if @.Destination /= void then4 \3 M6 b2 c; L
@.Destination.NumReservation :=
6 |9 P# A/ d0 k1 V, O( V @.Destination.NumReservation + 1;7 v5 X! T# J" R0 R8 Y
end;
( s2 s0 Q. e4 f4 i0 I: k4 ?, p! `1 C @.CurrIcon := "drivingHome";4 w$ u" D- h- l: Y1 s1 I) Z
@.DrivingHome := true;% z: A& e1 [2 m9 \- g8 A {
end;
& G8 ^, ^# G/ b& w else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ s& @7 F/ `" M+ c$ X
part := @.transpOrder;2 u2 t! @) n7 c9 g
part.move(@);-- load part1 m9 ^, g, i! r8 Q& O
@.CurrIcon := "load";' T9 l' h% b8 ^/ \
GlobalDistObj := part.globDestination;
# U. n% ?9 ~" E0 V- Y assignLObj := rgmanager.rgAssignL;% B: o0 U( d4 m& V$ i2 d% G
row := assignLObj.getRowNo(GlobalDistObj);
) H$ u9 i6 u8 K$ \; z- g3 v if Row = -1 then -- since 704 |$ h; j' A6 M) v
if lan=1 then
* h1 v7 y. l0 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: X* x7 r& x6 F) A" N1 S& g& {5 }
to_str("in der Andockstation: \"",?.~.name,"\""));
. @% G% [9 @7 t- D& N- U& S else/ F% v+ U2 w8 T h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 {& A: M5 Z- T' x9 B
to_str("in docking station: \"",?.~.name,"\""));
7 ]/ w% `; G i% M end;
9 G6 H8 {5 ?* B" q! h: y else
) |! l/ k, W/ ~" L! T @.Destination := assignLObj[1,row];
# l4 D, f- K! z4 @2 d end; & l3 w; ?$ R# f4 B# H& C! z5 \4 i
newDirection(@);
P! ?& S6 W9 l4 g1 h7 m% X @.HasOrder := true;$ J: L' J3 Q2 S5 S. K
end;2 k" o3 ^ }: K* K3 X# i" A
end;- ]* V- n* k! ^9 c; d# G# C* F
end; -- of the method
* R$ s) N# H% |: G/ e. { |