/* called by: entrance ctrl of the object 'track'
2 l+ B7 u( {7 N*/
) K9 H* p b1 j" Y! sis
' {( u3 P4 w. L( E" W1 {7 T- [6 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 l6 \0 n2 }# g3 b ~. E
do. I; @: J6 H; _5 o; M& l$ P; H1 E' m
Lan := rootfolder.Internal.Tools.AOLlanguage;9 \4 W* {: s9 T! ?' m
if current = @.Destination -- else return
4 \1 s, u4 u' C5 E# M' C2 _ then3 Y$ S5 @& n- V9 n2 R
@.Destination := void;/ A1 x6 ?+ f% _2 n k9 P
if @.occupied then! H; S2 X" y8 E; C
part := @.cont;$ U% j5 k5 l. Q& h5 T
@.transpOrder := void;
) P6 }1 G1 t; u1 G2 v2 }- C4 A$ X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 h1 y$ ]! _7 x @,root.eventcontroller.simTime);9 d; y4 \' K! N* O0 I. G- W8 m
@.HasOrder := false;# @: Q$ y8 v+ a4 k( S
@.DrivingHome := true;
& {9 Y& E" b* [/ S3 n% H rgManager.tryToStartTransOrder;5 G/ W7 V) |5 U+ o" v1 D
if @.Destination = void% {' a, b5 L. i9 {
then -- no transport order for vehicle @" A; D+ Z0 k3 r$ \6 e. x2 q
@.Destination :=
3 l* E: { g2 F P9 a rgManager.nearestFreeStation(@,track.~);5 X/ t, ?: P: m% v) }
newDirection(@); 8 h [" I6 w- M$ H8 B
if @.Destination /= void then
- c, r! D2 y5 Q. v, S# |0 g; u @.Destination.NumReservation :=
0 g& q$ h# U. U, { @.Destination.NumReservation + 1;$ m* n$ Y' v/ j3 R) s! n
end;
9 k; f6 m% x$ P3 C% d" W! O7 Z/ F+ g, M @.CurrIcon := "drivingHome";/ v" R; ^# ~& [6 m
@.DrivingHome := true;
* F* ^! M2 i* Y1 r+ I: L r end;2 R7 U: z. x$ ?$ O% D9 m5 v0 m7 ?+ n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station X/ h# Y* G/ c, ], A9 U/ _
part := @.transpOrder;: z* x+ a2 |5 {% ]) y4 r
part.move(@);-- load part/ c$ f/ i6 A* h) Q: J+ I5 \
@.CurrIcon := "load";
, r1 k# G, p+ T/ [: Y2 ^ GlobalDistObj := part.globDestination;; Z4 R/ f5 S6 O4 i$ U* u) G8 n+ c7 q
assignLObj := rgmanager.rgAssignL;
9 k- W+ U9 m i1 H8 k* n. ]7 ~* ] _ row := assignLObj.getRowNo(GlobalDistObj);
; W- d4 x+ h) O, ]) e. s; q if Row = -1 then -- since 70
* c7 b9 t5 O" o& ^4 }' S1 G if lan=1 then2 F& U) L. j" _& j) B; j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 r: t: `9 @! R6 i to_str("in der Andockstation: \"",?.~.name,"\""));
8 a# u8 @6 K- Z8 Y else
8 l1 I' o' z; h( f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 D# {. i' u4 {2 v8 S g' r
to_str("in docking station: \"",?.~.name,"\""));
3 t7 {: P3 n2 T end;
+ I# h4 A: F, \& M; a; G: T else
. c2 x, ^0 I U3 `& G: C @.Destination := assignLObj[1,row];
: O; _6 _3 ?5 u) x end;
; Y8 U0 x4 }1 m( Z' v newDirection(@);
6 Q) D3 A& P; f1 k7 y/ ^ w @.HasOrder := true;# J9 e% F8 o0 U- I k( o
end;
! e5 Z* ~2 d3 O- d0 k( `' z7 V) L end;/ Q2 c$ d% _4 g/ k* v2 H$ ~
end; -- of the method
# Y0 }2 |0 V }* [/ Z( i |