/* called by: entrance ctrl of the object 'track'; I5 j1 F. U" J
*/9 u2 J! c) \6 R, j# o( W# t
is" e4 F7 F0 Q- ^/ p0 [0 z' b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. B3 c: I7 n3 H7 R: ~do" V) Z1 i0 \1 e N) j" d5 ?- T) @/ u
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 L9 B% o" z' T! V if current = @.Destination -- else return
& D% T" w6 a+ { then
0 e# r0 E$ p. Y @.Destination := void; v r3 T" A3 x& P; b! q8 y+ m
if @.occupied then8 O t3 U; y3 B8 H8 T# b; U
part := @.cont;; u2 v0 ~! P; k1 {9 h+ r
@.transpOrder := void;
+ E6 }, H! z0 T9 g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# C' r8 y2 z$ j" A/ ]6 P" J. Y @,root.eventcontroller.simTime);/ d6 Y b3 a: I
@.HasOrder := false;
5 \; g1 A* ^' _4 h) j) @ @.DrivingHome := true;
( N! [ a. a2 F2 c) h* J6 ~" ? rgManager.tryToStartTransOrder;& E z6 O7 t- q* H/ |8 @" O
if @.Destination = void8 n& v% h/ c: O
then -- no transport order for vehicle @
* b9 V: f$ r5 V# j @.Destination :=
" v- v, y5 k* M& I# B rgManager.nearestFreeStation(@,track.~); {8 f; {$ ?+ }! o d! a' c \
newDirection(@); 9 U, ]5 p; ~9 d
if @.Destination /= void then
& I5 Q) w u4 r4 R+ ~ @.Destination.NumReservation :=
# H0 N+ r8 |" Y+ D" N5 G @.Destination.NumReservation + 1;+ J4 [% P' X4 ]1 h ~ r }7 U
end;4 O" }4 z# G# m0 R3 P
@.CurrIcon := "drivingHome";
: @. r* J$ J E/ C( P @.DrivingHome := true;
6 e: ^$ V- ?+ j/ _ end;
+ A K0 h& l0 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% u4 }9 t4 b* M+ ]( m part := @.transpOrder;
. x h; X2 ?$ S4 C part.move(@);-- load part
1 e: i0 c6 X6 S) X @.CurrIcon := "load";
; ^% w1 s; U: H4 e+ K1 [ GlobalDistObj := part.globDestination;: e0 J, V1 e7 L, L! j
assignLObj := rgmanager.rgAssignL;
7 _0 J. R- W- U3 g% i5 L row := assignLObj.getRowNo(GlobalDistObj);5 a1 l) {7 ]1 j! P1 s0 u
if Row = -1 then -- since 70
1 b$ U9 c+ p' s0 Y P9 [' s/ p6 x if lan=1 then5 U* @$ `+ J1 i J( g: T& v+ |8 u# n1 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. Y7 e( C! j' f
to_str("in der Andockstation: \"",?.~.name,"\""));
4 G4 P, v5 K: q- p8 E else: @/ m9 n; r4 |/ T- b, z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' r+ C: o( i, w U/ l0 k to_str("in docking station: \"",?.~.name,"\"")); 5 `* ~; L4 q, \/ L- Q
end;: B5 U2 w, I6 y6 s) J
else$ c2 p, Y3 i: ~
@.Destination := assignLObj[1,row];
* K. r- Y! a0 T1 U3 T5 ~3 D: x end; $ u: Q! L+ f( [* Y/ a6 l B
newDirection(@);
/ @5 Q3 g; r: F* | @.HasOrder := true;
8 V3 z$ @. w% W- O2 [3 _ end;
* Z+ e$ ]# b2 [3 A7 X0 ? end;
0 M( r) x4 E! q$ Mend; -- of the method
S1 l9 l3 h, Q$ y) U8 a2 s. m/ D: P$ { |