/* called by: entrance ctrl of the object 'track'+ ]0 `% g3 [: U+ D- z2 @# u2 k
*/
# z/ A. ]1 E' G8 b+ i, Wis
4 O9 d* @: A0 n: _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ r' n4 I) L$ `4 E+ K
do1 n/ _* t5 ]4 x" u* N2 w
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ U, x0 |: c) l if current = @.Destination -- else return1 Q6 M4 M7 l& \% }# @ S( |1 M
then
" p6 V1 C+ T6 I( }5 m9 x' S @.Destination := void;( }- m, i1 p' f6 [
if @.occupied then
8 a' a! y6 p, ~( f4 M: i part := @.cont;
; ^9 a0 s% f/ j5 @# r+ i @.transpOrder := void;
/ P- s0 [& a& {% _8 D$ K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# q7 T7 c/ P7 `! W0 B) A @,root.eventcontroller.simTime);
7 {" h, Q* o; e; n3 i6 Y) ] @.HasOrder := false;
% N& Y' `) x' w0 i9 b @.DrivingHome := true;
' k4 b; h% n# p1 l9 W rgManager.tryToStartTransOrder;$ Y. @* E3 K% E# Z
if @.Destination = void, ?5 } H) k. R
then -- no transport order for vehicle @- E; ?5 D0 O; g; K
@.Destination :=: t4 ~ G, p' Q! w$ }" j8 n+ l
rgManager.nearestFreeStation(@,track.~);. w9 z! A* a" E; d2 ? o3 D5 s
newDirection(@);
) ?1 Y: {( D# e) ?$ v' _, [5 S if @.Destination /= void then
" M: a* F2 _) v( r3 j( V$ X+ _ @.Destination.NumReservation :=
# ?: C# S7 m3 r; Z @.Destination.NumReservation + 1;
- [9 ~+ d$ [: M. _7 h8 k1 @ end;! P) A; q3 u" z- E
@.CurrIcon := "drivingHome";' `! I5 k3 j. P* B3 ~( O( @: F" U
@.DrivingHome := true;& L9 C% b o% s6 {
end;
6 Z! ~! ?; S; g: Q. @: l else -- the vehicle @ is empty, both vehicle and part are in the same dock station) Z8 [: p1 _ ^! R' S- w
part := @.transpOrder;
8 H9 c: Q5 l4 Q3 R5 F part.move(@);-- load part
8 y/ f3 g- S- l/ \8 `$ c% Y- s @.CurrIcon := "load";
0 l# q3 N6 a, Z3 {! `; h GlobalDistObj := part.globDestination;
, _) T5 q9 i" Z2 v' |) D4 {! N, Z assignLObj := rgmanager.rgAssignL;( Q9 |" h, B, O7 M# J( H! ~
row := assignLObj.getRowNo(GlobalDistObj);
e) D- Z0 I4 E' T6 R: ?: T% N if Row = -1 then -- since 702 F# v9 ^5 o$ r7 r" [
if lan=1 then/ t% E. N0 [3 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 G) U( _" P# }; V) X( P7 D+ ^ to_str("in der Andockstation: \"",?.~.name,"\""));, X# @! v5 M& E5 y ` `& W
else
% [. n6 z7 w6 y- {! T9 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" \; L, h5 T# @( ]) E* t: J to_str("in docking station: \"",?.~.name,"\""));
% [( a7 p w' l. m& s& x" u/ | end;
4 ^ @1 J1 Y( z else
* i: u, k5 q) z; l' O( Y4 S @.Destination := assignLObj[1,row];3 z8 q1 Z( c( Z J7 d1 _2 Y
end;
1 K: `3 P/ ^+ `: _2 o& { newDirection(@);
$ j# G+ s% E u2 b @.HasOrder := true;7 I' e) |% p% |# h+ h4 m" p
end;
( [. G* Z# b# O3 q4 v z0 _ end;( Y j- P5 F# L
end; -- of the method
+ S, S* X5 x$ o9 J% F4 ] |