/* called by: entrance ctrl of the object 'track'
1 [7 b& j; E* V* M% V$ M*/
6 h1 N7 r( c/ d4 ois
0 w0 x' h# |* p5 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ i& p! ?, x, z4 M: \do
7 K* z; v# U* V, t, o Lan := rootfolder.Internal.Tools.AOLlanguage;8 k* l" \5 t. D h+ T1 w( ^2 H
if current = @.Destination -- else return! @+ B$ g, T- U+ p9 }1 q
then
0 [! F5 \3 a! H7 w" p8 S @.Destination := void;: [ Y/ V% U8 Y' w4 `
if @.occupied then9 m# {: @2 N) R: [. i f) Q
part := @.cont;
* O( s5 q# V* m7 b. [: J3 P% J @.transpOrder := void;! V. Z( t3 [( ^$ c/ k4 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: w7 A3 w' H$ k
@,root.eventcontroller.simTime);
' L( i4 q: {/ L" p @.HasOrder := false;( q& u! `; {% k0 |* e
@.DrivingHome := true;
2 p. ~# g, k3 W' w rgManager.tryToStartTransOrder; F1 m% J4 W1 P1 b8 B) R1 q
if @.Destination = void
* k1 Q! t5 u* x3 Z1 X& s7 I7 Q then -- no transport order for vehicle @
2 b) k6 h& r8 ]3 \; b @.Destination :=& o6 @" L1 \: `. g4 ^
rgManager.nearestFreeStation(@,track.~);
: a# R5 w/ y) S& @ newDirection(@); / H7 E3 Z; c' Y
if @.Destination /= void then- b4 S f( D3 l, l% j+ ]; A4 I; l* X
@.Destination.NumReservation :=
( \7 Y+ U. c, y+ {4 [ @.Destination.NumReservation + 1;$ L4 \$ y% F9 |# k- l U
end;
# g3 k2 D% }+ U- [6 s6 i @.CurrIcon := "drivingHome";9 y" T2 q- T& S1 y7 f9 o4 F
@.DrivingHome := true;8 r+ W0 c, N& {/ u2 a- R+ z
end;
A, ]# Q2 N1 F1 N+ I: o. _+ E else -- the vehicle @ is empty, both vehicle and part are in the same dock station) o& F, [- C0 k5 o+ e, ~
part := @.transpOrder;
* h+ z0 k7 m+ D9 M* I part.move(@);-- load part
8 l3 U& I) y; Z% M4 X @.CurrIcon := "load";2 l7 ?) v. I3 u; x8 z7 F
GlobalDistObj := part.globDestination;
( B9 Z1 F! n4 ^, s assignLObj := rgmanager.rgAssignL;
! a9 m7 k; }) f L5 L+ q+ h row := assignLObj.getRowNo(GlobalDistObj);6 S9 e o+ A4 s) i2 P1 A
if Row = -1 then -- since 702 o" a5 r1 ~3 j' X) l
if lan=1 then7 p0 A$ m" w: T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 _/ w: N0 U( [& v1 k
to_str("in der Andockstation: \"",?.~.name,"\""));
$ z7 g% V; T; g/ T- y, ?2 u else
9 c& F) Z7 g. {2 U/ a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" R C5 C4 e5 t to_str("in docking station: \"",?.~.name,"\"")); 6 v k V) f% j4 N" {
end;
8 q$ p/ S8 z; v9 j0 T else0 K- l. j+ B8 x/ v* E
@.Destination := assignLObj[1,row];4 w( E" H, [9 P- O$ o
end; & O! S% }, R! `" I A' C+ l: m6 R
newDirection(@);6 x- W; i2 f% t) t6 Q- O( O
@.HasOrder := true;
3 w7 d2 x( Q* C# p end;$ l/ t p6 m- i( k3 G+ C' `0 ]
end;0 l [( |" c, a; ?4 u; R0 \. ]
end; -- of the method
0 c# ~! _/ s5 ~ |