/* called by: entrance ctrl of the object 'track'
( Y8 y2 W( r' c0 G9 Z*/
- ? z5 V4 r# t$ N6 D$ v1 V! qis
" Y: |$ c4 ~# H8 a8 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;; \3 }9 E5 r l4 U L9 T1 j
do
& n7 X# N2 J: q* P& w2 t# T+ f8 O Lan := rootfolder.Internal.Tools.AOLlanguage;% m8 }' E' D" i
if current = @.Destination -- else return( \9 ^: U Q" J
then' F2 b ?0 o' z6 t S( t4 B2 [* V
@.Destination := void;
2 X- x: T( ^# S$ l0 r if @.occupied then
# G" i- F/ z9 S/ ~5 V( _- G. C% W( d3 V part := @.cont;
! V& f1 g; N7 ~, R @.transpOrder := void;' R; k$ l: t" b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Y6 B9 j. q% }+ A) w
@,root.eventcontroller.simTime);! [8 C* p( k8 p; C) ~
@.HasOrder := false;+ ~5 U0 Z$ W$ y; P
@.DrivingHome := true;5 I5 ?* {6 p$ Q% J; f
rgManager.tryToStartTransOrder;
# p4 `0 ~+ N5 P+ C# M if @.Destination = void6 o# X- M- { v. R) ~: h* p7 ^0 e
then -- no transport order for vehicle @
9 e: F1 Q) D- ^* ?0 L( B7 c' `! I @.Destination :=' \3 k1 [, k' o+ n: {
rgManager.nearestFreeStation(@,track.~);9 |5 j( Y# v4 ]* I
newDirection(@);
# }5 D' d, x/ Z if @.Destination /= void then
& h& M$ P% w u+ a @.Destination.NumReservation :=& [5 U, z0 L1 u# q" k0 @: i
@.Destination.NumReservation + 1;# y7 Y) e: {+ s1 `
end;
, P# D- g2 {# W& k4 M I @.CurrIcon := "drivingHome";
. E2 Q7 Z" J, V& [& _- }! Q# Y @.DrivingHome := true;7 q5 y* M) }" h5 p
end;
% R) a8 O5 n) E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 U) s! t$ K* |+ J part := @.transpOrder;' l& }" l) B$ b' Q _9 W, ^
part.move(@);-- load part
+ F7 X0 H9 c( Y1 ~/ g/ W- e N( J @.CurrIcon := "load";
; d9 }$ h; P+ a" t! y GlobalDistObj := part.globDestination;0 h' I& C2 A* Y* s' I2 }
assignLObj := rgmanager.rgAssignL;
8 a6 s, ]' w% i8 O6 i row := assignLObj.getRowNo(GlobalDistObj);# U+ g* I) m. m- O, @0 q+ C0 F1 ?: ]
if Row = -1 then -- since 70
& y# e% A# m3 B z4 c7 Q. w if lan=1 then4 v6 z' B7 T0 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ b% P, a. r! I @+ E# I9 b
to_str("in der Andockstation: \"",?.~.name,"\""));
3 W; f/ {: s$ ^+ F$ V* a0 G else: |4 }; @8 Z" r, `! f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. ]2 c; Y/ I$ o, H# N4 R to_str("in docking station: \"",?.~.name,"\"")); , f$ _3 w. W+ _4 I4 o
end;8 a( R0 R( A5 v0 e; }2 H
else1 s0 X1 K1 l: G% x$ n( K
@.Destination := assignLObj[1,row];
. L, k. D: V! O# B, N end; ! d% Z' q8 v6 P' y; @* I
newDirection(@);
/ |9 k+ v5 C' @ @.HasOrder := true;
- b; S4 F) a" k( n3 N$ M end;3 z( `0 p/ }3 G1 a9 A# e- N/ m/ R
end;) ?% U: T( |! D1 g0 A
end; -- of the method
: \. W1 W% O' K4 V) l2 {' o |