/* called by: entrance ctrl of the object 'track'
7 E% R4 n: s2 Q*/
l9 U. y0 Y6 L2 W3 m7 [3 \/ kis
% S. v. }+ T% [( g5 Y( C part, GlobalDistObj, assignLObj:object;row,Lan:integer;- G5 x4 r, S# \( f4 t- }
do
E: f$ \9 t( U; d5 \ Lan := rootfolder.Internal.Tools.AOLlanguage;9 [6 ]8 T, p! u! h( J+ W/ F
if current = @.Destination -- else return
4 E4 C) M" P# l: Q' T+ p, n then
4 x: U: E4 e: T9 A* n @.Destination := void;( v% y: d# F3 H- J9 Z: P
if @.occupied then
1 f; P+ F) E$ h n1 n! w) Q+ p7 a% w part := @.cont;
; Q/ B% s2 ]6 R/ K2 \% h: K' [ @.transpOrder := void;
9 |3 B! _5 a2 G A4 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
S- p- R% N' u7 a, w @,root.eventcontroller.simTime);
0 }) V. _1 O$ W0 X J5 ^, z @.HasOrder := false;1 Z5 g. F6 Y3 ]# S
@.DrivingHome := true;% ]. x# C F8 A9 g
rgManager.tryToStartTransOrder;
3 v) S3 {* k- Y8 w) t6 y* H0 G1 @ if @.Destination = void
* ]: R/ u- [3 V/ R then -- no transport order for vehicle @
) Z0 L( {; X% i( s2 F4 c @.Destination := c: a: S# }8 E; ^; s2 e4 `: N
rgManager.nearestFreeStation(@,track.~);
% F3 \9 x1 }! o9 L newDirection(@); 5 V9 ~: _7 E; t0 C4 }9 r
if @.Destination /= void then
5 e: S6 p* u& \* V @.Destination.NumReservation :=
. e7 i# }3 N1 l7 w0 C- l+ y @.Destination.NumReservation + 1;& c9 d I% k, x x; s! o9 _( ^" Y
end;4 F; ?2 }6 R+ g. f% \5 Y* d
@.CurrIcon := "drivingHome";" P' E% u$ T6 q
@.DrivingHome := true;( ?! d/ J+ f3 D/ \& ]% C
end;3 O3 w- A1 C4 q7 v# ]0 A/ F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 Y. G+ I T$ u% e# q part := @.transpOrder;; O& o" x# s8 |
part.move(@);-- load part
* I! ~$ q5 v# y @.CurrIcon := "load";
; p( o, {* O) v. J% M W5 h1 S1 U: t GlobalDistObj := part.globDestination;
$ ?6 V+ Y d" Q assignLObj := rgmanager.rgAssignL;7 b3 b+ F5 |* r2 m I7 n$ K
row := assignLObj.getRowNo(GlobalDistObj);1 B" k1 V; k8 a/ } Z" U1 C* D
if Row = -1 then -- since 70
* T, B. A0 Z" k6 @* v/ v* [' X if lan=1 then5 m8 F1 K7 r( [4 B. A, I @* N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. W0 x# C" c" t4 ~$ z6 }% y
to_str("in der Andockstation: \"",?.~.name,"\""));
5 P+ I/ n1 Q/ w. W else+ T9 {! ]4 R$ `( L" G& z' j2 r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 L& u& P% H h- n W to_str("in docking station: \"",?.~.name,"\"")); 0 N- e. ~! T5 ?) ?; Y% F
end;, D/ b; E( o; y% P1 P8 { c
else
5 |6 `( ?$ {2 g5 h1 x' e- O# {% { @.Destination := assignLObj[1,row];
+ ]# p4 R6 e2 \$ u end; / g5 D* i* }. |8 f; R6 D
newDirection(@);" F! R! |. E; q3 }: Z8 h! Z1 i
@.HasOrder := true;# e, T$ u0 }% n! A, a7 F, i
end;
. f& D; U' ?) Z5 E! Q& ~0 t* l' P end;
2 ^+ O8 j) f+ X% Y+ \* s* Tend; -- of the method
+ }1 L0 m1 y% T8 A z w3 T- e |