/* called by: entrance ctrl of the object 'track'
/ W; @) `" ~" N# }5 K3 Z*/. j5 V7 r1 G/ Z) c7 l$ p5 g
is
8 ~2 L. e4 D( t! T( B9 Q+ x# P part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ l8 z9 n) e, @$ Z7 ^, X
do+ z; l. \, g6 H1 g- k0 @+ ]$ R* G
Lan := rootfolder.Internal.Tools.AOLlanguage; k( h9 g- |0 W; U: X0 K
if current = @.Destination -- else return1 i8 k* p/ y, }
then/ q) W+ v! L. g M# M# ~( [- M/ _) B
@.Destination := void;
- G( W! U. E% m2 y2 l1 K if @.occupied then; R) ^' |" F/ c, r2 [* s
part := @.cont;
, i9 Q, _. l6 _1 O; O, P @.transpOrder := void;3 E" r6 W, Y( b, Y' Z% ], o) H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 q- J; g3 T- C* n; H2 u0 q, I @,root.eventcontroller.simTime);
/ e7 @) Q6 _8 |3 l9 t @.HasOrder := false;
7 i* \) J: L6 p @.DrivingHome := true;# f! [$ {+ Z3 ~+ i n0 X
rgManager.tryToStartTransOrder;6 X* ~( I" e! H k1 b
if @.Destination = void: P x) L3 K7 z) E5 a* j
then -- no transport order for vehicle @" P4 L' l' L& p- U& G
@.Destination :=4 d' Q# [* N' h
rgManager.nearestFreeStation(@,track.~); J& d5 u* t. q& H
newDirection(@);
) V! Q. e5 W F if @.Destination /= void then
& z# E( c# t# Y9 ~ @.Destination.NumReservation :=
. L3 q" S" t: z6 K& I- e. r C4 K @.Destination.NumReservation + 1;1 W( v* ^: e: |3 n0 M7 ^
end;
2 C; C L3 ?5 S7 O' b @.CurrIcon := "drivingHome";; b8 f* O. o3 M" B
@.DrivingHome := true;5 R/ _) o: ~/ h* Z+ A
end;/ C9 W2 G& q2 U0 d# Z# Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 n& y5 o9 I4 K part := @.transpOrder;1 W+ o( j! o9 c
part.move(@);-- load part
- b7 Y8 V k+ N9 C& S W- E7 O8 g @.CurrIcon := "load";3 d4 T' J4 z' m/ k* y
GlobalDistObj := part.globDestination;
0 F4 X/ V. G! G2 `' Y, C; v1 b assignLObj := rgmanager.rgAssignL;! A; w# M$ L. x @; M% f
row := assignLObj.getRowNo(GlobalDistObj);
, |7 b5 G! X3 j( u if Row = -1 then -- since 704 w* M& K* t, e# q ~6 |" U
if lan=1 then9 w- r# z) F5 l$ o- y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; D4 T- o4 |" Y0 f0 l2 `) `
to_str("in der Andockstation: \"",?.~.name,"\""));& Z3 B2 W* m. J
else. T: l5 i$ O0 w, B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* Q5 v7 n% W& k+ H% K to_str("in docking station: \"",?.~.name,"\"")); * A5 K1 c u6 T# h7 Y
end;3 \! K: b9 `4 `9 v9 t
else
8 p: y! y, I! K/ z) f* N5 E @.Destination := assignLObj[1,row]; I; O: R* z1 k; l" n m0 M
end; 2 b- C7 u E! q
newDirection(@);* C; N2 b, R5 c5 j2 x! G1 c
@.HasOrder := true;
- k3 J1 J% q0 Q4 Y end;
! L# Z( Q9 Y4 q' H" X end;
5 K3 @9 y0 x" W- z- ~. z2 E5 } g# ?end; -- of the method
- q, V+ v5 B* p, U* e$ ] |