/* called by: entrance ctrl of the object 'track'
7 O8 ?4 e+ r4 [* J*/! a4 d8 H' o& G
is
( e# W, Y. g9 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;& x5 F. V8 l0 `; d) D/ t
do2 K- @" }( o# y9 {9 E
Lan := rootfolder.Internal.Tools.AOLlanguage;' d' `: R& X+ X( l7 j' }% G4 v# q
if current = @.Destination -- else return
/ k$ c5 Y, F6 `& M+ O+ A then4 W4 ~( ]8 s$ A
@.Destination := void;
& x0 K0 A0 `' E" Y- }9 g* y# M if @.occupied then9 n* B1 y2 }& K( D2 |
part := @.cont;" F' `0 w% i. P* }) N* b# @, u! W# `
@.transpOrder := void;
2 h' x+ j' Z/ L2 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ |' L0 s# E7 C3 Z/ j @,root.eventcontroller.simTime);
. j% Q/ t2 Z" z2 O @.HasOrder := false;
0 ] H; J* o @" x! d7 K2 ]& Q @.DrivingHome := true;
, t/ [: J' x/ R rgManager.tryToStartTransOrder;
+ U( l: z% ?, p Q% G @8 _ if @.Destination = void
8 Q/ S, F" _ X, o5 K" v then -- no transport order for vehicle @
% S' J! c. n8 |: J" U2 M! r$ Y @.Destination :=
, r' w; V2 Z8 v8 K% y7 `$ u& s rgManager.nearestFreeStation(@,track.~);) D0 o9 i& _+ T3 ?+ u1 H9 e' v
newDirection(@); - i" j" ^6 S: P
if @.Destination /= void then3 ], Z- Y* q7 M$ {- T1 \+ m
@.Destination.NumReservation :=
0 z G& P/ H& Y! s- p. L& f @.Destination.NumReservation + 1;+ `/ m: C6 {8 e- D6 U
end;
0 y" @+ u" L( I& N7 O. Q @.CurrIcon := "drivingHome";+ \" g/ @, A" j( G$ Z4 G* r1 a
@.DrivingHome := true;
6 \; ~( r) y3 j. H# W# k end;
0 d$ s* V: F. t3 D! E4 L4 w) R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ Y8 x+ X7 t1 I7 o" e part := @.transpOrder;
: ?; x/ g9 [4 s7 A; X8 W part.move(@);-- load part6 {( ]% p9 ?8 ~; s
@.CurrIcon := "load";4 y8 ]8 s. ?" z- S( G, }
GlobalDistObj := part.globDestination;3 Q( y, a" H0 j. I( g' y
assignLObj := rgmanager.rgAssignL;
; i+ \! |! B( I7 Q! G" s# ]" f: ?: } row := assignLObj.getRowNo(GlobalDistObj);% B7 N2 g/ u9 j" U! U7 l
if Row = -1 then -- since 70% ~5 F+ [7 A/ M$ z/ h" [: W4 g: J
if lan=1 then
! A/ |; N5 p Y( ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 k$ w; T) m, w to_str("in der Andockstation: \"",?.~.name,"\""));0 V5 t ?4 S0 A1 E8 O
else9 i k1 J4 g& X( F F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ h. S1 a( A v' G0 {
to_str("in docking station: \"",?.~.name,"\"")); ; F/ J# ^; o- I! a1 c% [
end;' @. b# o2 l& v
else9 y. ]" h+ o P; M/ X* F. l
@.Destination := assignLObj[1,row];' U, O5 }0 R3 t% }
end;
9 k* i* m0 q4 w newDirection(@);0 K$ S. V8 n0 E- A* \
@.HasOrder := true;3 B. P5 v5 Z, |( I) r- `( T4 U
end;8 i3 a: \) O* g3 L
end;
% a& B0 t( B1 z! { jend; -- of the method
8 l" O% F) k: R5 S4 E, q |