/* called by: entrance ctrl of the object 'track'( \' {0 ]0 L2 ]9 ^" y2 s
*/% K7 j. L; y/ j; F; a4 w
is
& X# W f% U2 P+ \- G/ M1 q2 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ D6 L" c6 n" U( G% Qdo
! b' v' S- S( q" e$ ^ Lan := rootfolder.Internal.Tools.AOLlanguage;/ Z/ J8 D; j+ M9 p8 j
if current = @.Destination -- else return
7 `5 s9 X* }5 e9 D3 s then
; s- U( \( [7 E$ x1 c- F @.Destination := void;
$ `8 }0 U* z F" @ if @.occupied then
' ?( \$ q& ?( Y8 _ part := @.cont;
' q8 ~+ n( r9 n1 x @.transpOrder := void;
2 M. ]& q# `7 T# W% t! R: q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; g) p, X/ t/ j1 q2 Y# \
@,root.eventcontroller.simTime);" W! I" j# Z; U6 f, t
@.HasOrder := false;
, {$ [2 x# r: |& O( t8 T# C" ]: z @.DrivingHome := true;
: a" S/ a0 x/ R rgManager.tryToStartTransOrder;
! v: }! O- P4 B, p+ G7 j1 l if @.Destination = void
. t& C; ^' X+ K- _: @ then -- no transport order for vehicle @
4 D. n G5 w: O/ |: ]! J; O) X+ {5 u @.Destination :=
, U6 B' ~7 ]5 p& r1 W8 b5 m6 f9 G( T rgManager.nearestFreeStation(@,track.~);
* z/ W5 z/ s2 N# } newDirection(@);
+ S5 V6 i9 t. C4 ] if @.Destination /= void then
9 p4 X8 C" P! C4 G( q1 h# y, W @.Destination.NumReservation :=+ \# w; G2 g5 _9 r
@.Destination.NumReservation + 1;
6 I" y* a+ S) Q) {0 b0 q1 }. r end;' {, }% X1 w% D3 U4 W
@.CurrIcon := "drivingHome";
% ~* l8 Q/ w) c3 ~0 h ] @.DrivingHome := true;" }' c8 h& y- j( k! J
end;) Z* r+ m& l: u+ @ \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- X% t, ^9 Z: ? t
part := @.transpOrder;- [! n5 j' }1 t& W1 U
part.move(@);-- load part9 \' U. ^8 [- }# Z, o# Y- G
@.CurrIcon := "load";
! E, W4 D* J$ L. j- K GlobalDistObj := part.globDestination;
4 r# G/ d6 W5 y# V4 c assignLObj := rgmanager.rgAssignL;, t) D9 Q( _6 I) g5 c; N$ m
row := assignLObj.getRowNo(GlobalDistObj);/ k+ e0 @% ]" v3 ^1 u+ e S
if Row = -1 then -- since 70( H4 ], E' P+ F; R
if lan=1 then$ _: [: a7 h8 R$ ]& X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: \0 y9 P1 `5 v. l- l+ X2 U; B to_str("in der Andockstation: \"",?.~.name,"\""));/ @) e9 O) Q) U4 B5 K
else1 X( \6 k' E a9 r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 e3 a' i5 @' y9 h7 c3 i7 t) R to_str("in docking station: \"",?.~.name,"\"")); ) r* |+ S6 C M7 G" p/ b( D
end;
( [3 Q% O0 m5 D; D else
7 C6 W1 G# N) _0 g6 w @.Destination := assignLObj[1,row];2 u) b+ e" H. L1 ^/ S
end; ! @4 T- T* e& W c9 O
newDirection(@);
9 W8 V$ R+ G/ a0 l1 O @.HasOrder := true;* Z/ F6 r2 D6 ?: b0 W* j B
end;9 y) l# b2 h$ ~& f/ n
end;
( n9 B! { a& P1 Bend; -- of the method
* y3 O! |$ _. Y# r# j$ ^, c |