/* called by: entrance ctrl of the object 'track'
& d1 p% U3 ~* p& b* b*/, y9 j3 I ~% A
is
" b8 F( V7 q# Q- d; D) Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;& n+ d1 L# U* d
do
& r! s" e# Z1 k8 T! ?( L9 t! e# d Lan := rootfolder.Internal.Tools.AOLlanguage;, W: ` W" d+ N
if current = @.Destination -- else return
. E i% @4 J/ G then0 u0 J5 v+ _* f# ^1 O
@.Destination := void;
; w. y$ o" b" ^9 | N% I1 e if @.occupied then+ d2 P; @% L) K$ g) K
part := @.cont;4 C2 `+ k! g2 R% b
@.transpOrder := void;
/ F4 o+ q0 y. q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ?8 B! Y3 S$ _5 A8 k/ S- M
@,root.eventcontroller.simTime);
' R. y: e; x( [; H# k; [- J @.HasOrder := false;/ d0 j: Y7 m( ~+ T; R2 i% a
@.DrivingHome := true;
l2 P P2 i, J1 `; z$ k rgManager.tryToStartTransOrder;* W5 w# R( w& z( o! ~
if @.Destination = void
- p8 N# f9 N) l/ R then -- no transport order for vehicle @/ _6 W& Q a5 j* ?2 z9 W; l' D
@.Destination :=
6 X7 [8 C# g, j& s" X rgManager.nearestFreeStation(@,track.~);
# G; p6 O0 h7 R' |. G& S4 o newDirection(@); ; [2 T- z" P8 Z) _6 q3 H; Y
if @.Destination /= void then
; |! r* C) e& J# t" R @.Destination.NumReservation :=& U- a6 ~* G; q7 w
@.Destination.NumReservation + 1;/ u2 f! S0 G+ i0 p6 i' @
end;
* k, t4 a5 b/ J. | @.CurrIcon := "drivingHome";/ F, w$ L' u# F n W
@.DrivingHome := true;9 I4 Q% L; m: y- u" t+ J* F' ?
end;8 L: N) `# K9 ]2 M' N2 H& b3 } b' W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ `) ^: ^( E% K/ t: v& n part := @.transpOrder;
# X7 @6 `# y' x } part.move(@);-- load part2 O2 e$ c: a8 J, c6 x6 W+ \1 y! C
@.CurrIcon := "load";. ^: d; y$ W; ^8 E$ ?
GlobalDistObj := part.globDestination;8 v9 F$ M8 f7 @1 C5 A* E9 H, b
assignLObj := rgmanager.rgAssignL;
# v7 @9 _ ?1 G" J+ ]3 |; l row := assignLObj.getRowNo(GlobalDistObj);4 P3 r/ ~, p' ^) y' C9 U
if Row = -1 then -- since 70
& H/ [5 j; K6 h& m1 b8 [ if lan=1 then
& X1 d( N4 ?0 O" Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 I1 U) E( l4 f4 }
to_str("in der Andockstation: \"",?.~.name,"\""));9 v) P7 w! y3 B! d4 g
else* V# \* P: V' m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 g1 Q9 k- W% V. L7 n$ o* E to_str("in docking station: \"",?.~.name,"\""));
* [, D! {+ [& y8 A end;
, n* d; P8 D) _, V" t* M. x9 [7 U } else
+ _) ]& \4 C* w- ?, n) i3 U @.Destination := assignLObj[1,row];& Z1 n C0 C' O n+ h1 P( j
end; 7 B g2 Y% Z( v5 w4 H% w, C
newDirection(@);2 j$ F( z, V3 y* k3 ^1 W+ I
@.HasOrder := true;8 [' C1 ^3 Q& q% s& x
end;9 ` X4 N8 }* h5 H$ n
end;
9 w5 |% z7 Q: {% E& q6 a9 aend; -- of the method" P; d. H. V% s
|