/* called by: entrance ctrl of the object 'track'7 V! V- U9 O$ k9 M$ b
*/0 T4 n c$ x7 P2 |# o4 P' I
is
9 h1 F0 K! V( U. L: o# ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% V6 W) v6 a5 }do
) Q! |5 h' u0 Z+ t Lan := rootfolder.Internal.Tools.AOLlanguage;
# F4 L6 I' a4 u' T if current = @.Destination -- else return3 j" d; Y4 \0 H% o( i
then5 O% {% P, y& f& }$ @
@.Destination := void;
D6 ]! h" I2 J# Q% t7 _ if @.occupied then, H% S% o) w" ~
part := @.cont;; S( N. F' P8 C" f" e9 e4 H# j
@.transpOrder := void;
# C8 q) J1 o) J F+ r+ B" ^1 } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 t; I( _# Q0 ^0 P/ V$ g9 ]6 y @,root.eventcontroller.simTime);
" F% m( y, i4 D- e) r- e C @.HasOrder := false;
4 G$ y) ?) b2 e( Z; W @.DrivingHome := true;
( B7 {% e1 W7 B5 x( O rgManager.tryToStartTransOrder;
. n( L5 I) [' _4 P9 C- l if @.Destination = void ?8 Y3 {! I0 M' S& v. s; H
then -- no transport order for vehicle @
( e" ~2 p4 z+ O+ o( e) `( [5 \. |9 z @.Destination :=8 C' q* E. J# q: G# k, A1 b+ N
rgManager.nearestFreeStation(@,track.~);; v$ p! C# }9 F
newDirection(@); # z3 H: V* C, T% n; \
if @.Destination /= void then
4 H! x" i1 g, x8 {% \: D3 Q @.Destination.NumReservation :=9 Y% s* d- O' b* }- N( l
@.Destination.NumReservation + 1;. i. D Q% X e( |4 e% \
end;
& ?! V6 D( `) e8 F) {+ P- e @.CurrIcon := "drivingHome";
3 ~, r& a3 ~0 {! F" ^$ s* O @.DrivingHome := true;' y4 @# I3 ^9 W! k$ V5 _
end;& E+ w" m$ n) O/ @% \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% M+ z, }7 I* r( q part := @.transpOrder;
; }) C% Q1 Z) `; s+ q part.move(@);-- load part
+ C0 w, s$ k1 S4 i @.CurrIcon := "load";! R3 i* k: h: M' z2 K
GlobalDistObj := part.globDestination;$ s3 a" m0 s8 Z9 O
assignLObj := rgmanager.rgAssignL;3 ]2 K0 a" Q; N0 y/ M: t* q+ |* Q
row := assignLObj.getRowNo(GlobalDistObj);, q& m% [* s' U7 l6 g3 d
if Row = -1 then -- since 70- a# e% Y q5 O% |- I) f- _3 `- e
if lan=1 then+ x! @; N# L% N# }! y' I4 b: v m2 T O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 z. K9 f& a, X$ S6 M5 D* o7 W! L+ j to_str("in der Andockstation: \"",?.~.name,"\""));! v1 P6 B7 k1 \* `* B; H
else+ h4 Y; p* ], M% f/ k( B; d* ^3 {0 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! i+ l* z& T1 M1 _ to_str("in docking station: \"",?.~.name,"\""));
* T" E8 p2 P% a, q( _ end;" k) U3 V5 ]; O) t F& J
else* S: a* u( V& p* U* ~
@.Destination := assignLObj[1,row];- u$ n! L6 m- G; b/ a; u! r
end; 9 j; v& ?; y: L6 V
newDirection(@);
* x- n" q* }8 x3 Z L @.HasOrder := true;2 O% b- N; Q2 {5 h+ u" V
end;. ^: D7 ?- C; g2 _6 R+ F6 A
end;
$ w- }4 |* q- U" F% Wend; -- of the method* P |8 z& t9 L2 v
|