/* called by: entrance ctrl of the object 'track'
! z& a! ^ \7 d v7 _8 }& |2 c*/, ^9 c: G0 I( i: @% G5 Q$ C: `: n
is
: o1 g& G8 |3 }3 R: ~7 q8 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 d3 [" K, [) L/ T& Y
do6 |- a& i$ `/ m
Lan := rootfolder.Internal.Tools.AOLlanguage;9 x+ @. `$ | N0 Y) J7 Y# O9 E
if current = @.Destination -- else return
2 V, f( @* t3 o) G then3 Q ^) W; I8 [- ]' D7 p
@.Destination := void;
. a! I; N+ ~2 i if @.occupied then& x4 c+ o9 V* v$ s! U
part := @.cont;# r! h- U0 q' \0 |, x4 G
@.transpOrder := void;& n% u3 t9 `8 s: B8 @% b( K; T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& h/ R) r2 D1 H% G4 e @,root.eventcontroller.simTime);
% z8 Q1 B' c' A$ P$ i9 t @.HasOrder := false;6 b5 d3 _3 _, Q1 j7 l2 x, M
@.DrivingHome := true;3 |0 I$ K9 L0 w" P3 j9 ~; O$ C
rgManager.tryToStartTransOrder;
' p5 ~) T# b6 j8 y if @.Destination = void( c [2 o$ \5 ]# m2 k
then -- no transport order for vehicle @
f% C' o5 E7 y; q4 B" f @.Destination :=
3 x4 `+ ]5 X% a3 C$ k3 b8 h rgManager.nearestFreeStation(@,track.~);
. q* |; J s" I) \2 t; f newDirection(@);
& \! R4 e; R1 q# j0 _* g& ~" S if @.Destination /= void then
{; ~" D4 U- Q! h @.Destination.NumReservation :=9 j' y+ v% k W6 {. A$ U+ E( D
@.Destination.NumReservation + 1;
" n6 l) |6 R4 s* ? end;
1 W" G9 b# K o% L$ m @.CurrIcon := "drivingHome";" ?5 D" a1 S5 d
@.DrivingHome := true;5 o- [- v2 y6 {7 |8 _- f
end;7 c) @* G& K. D1 Z/ y: i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 r! j% | L6 W+ R! b part := @.transpOrder;6 S, }, O0 j/ z# S0 A( i, B% W7 D
part.move(@);-- load part
" w0 z6 t1 z' [2 U @.CurrIcon := "load";$ z9 K5 c' b$ r: k( S
GlobalDistObj := part.globDestination;4 A5 j3 ~# U, h) o
assignLObj := rgmanager.rgAssignL;" a' m5 ^* N2 S3 \/ s
row := assignLObj.getRowNo(GlobalDistObj);
3 Z& N) B" l+ H) Q# {9 n if Row = -1 then -- since 70
# a# ~$ U( u1 G! E5 c" _2 l! r& X8 v if lan=1 then
' w; j1 @: Z2 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Q! j4 I& g# z& X; E1 |& s to_str("in der Andockstation: \"",?.~.name,"\""));; m, E' \+ c: U s( Z5 d
else. n% g% a6 A, V( b3 x: D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 d; ?; f2 T% N) q' D to_str("in docking station: \"",?.~.name,"\"")); 4 Z9 a0 A4 t4 w, U+ ]
end;1 o2 ^) a* R X; d/ I& X
else. |" v K$ Q9 |& @- q+ h0 Z% k3 E
@.Destination := assignLObj[1,row];
/ z/ N2 }- f6 Q8 o I end;
5 y) j: I4 V T' y4 E newDirection(@);& ^4 Y, r7 t: G7 N* P
@.HasOrder := true;
7 M5 J h3 `' }, B o) s A g end;
6 C$ V/ i# P+ b end;) r6 E, {4 Q L/ L* [' D
end; -- of the method
+ G e4 U6 Y: C, ~7 ?# M |