/* called by: entrance ctrl of the object 'track'
+ w9 z& u& }( k: U# ?( I$ }*/- [9 x: C% i; k9 R0 r5 l0 z
is' K, |+ z8 A( l" H% c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 t# p9 P' e8 Y; H2 l8 {6 q+ ^
do; W( h3 Z- S8 o4 u- z& y
Lan := rootfolder.Internal.Tools.AOLlanguage;
& W/ n# h Z5 K( \9 X if current = @.Destination -- else return Q0 ]1 p9 W1 E+ H
then. x- r/ s7 M" m/ e8 I
@.Destination := void;5 i* X4 U# }1 Z9 E9 ^
if @.occupied then
& }+ s$ B+ A8 w0 U \8 | part := @.cont;
2 n7 H7 c% q0 z3 d4 O @.transpOrder := void;
& b4 C m. I3 v! Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, A" a# p4 p# C, x- }
@,root.eventcontroller.simTime);
' w2 q3 L# N& J# p$ E @.HasOrder := false;
, s, Q" l8 d; F* B/ v @.DrivingHome := true;
2 v1 p! `: F! h3 j O3 b rgManager.tryToStartTransOrder;: A c8 _" A/ P, N8 c
if @.Destination = void' c4 Q' Z2 W$ S" ]9 O5 F$ V* r' c& ?" j
then -- no transport order for vehicle @, Y" {2 K8 Y6 g' V7 M
@.Destination :=
0 X3 P3 x% q" q rgManager.nearestFreeStation(@,track.~);3 p0 }7 P5 T$ n+ y! j; s# U
newDirection(@); # B1 m2 }; ^! y: s" x' T
if @.Destination /= void then
/ q% \3 X& B& u' N @.Destination.NumReservation :=
/ v; l0 c6 }. j, }* [/ O @.Destination.NumReservation + 1;3 Y' q4 y8 l, M; \3 K, Z; {# g
end;5 k8 b. X3 ^8 R9 g
@.CurrIcon := "drivingHome";
$ T9 d6 j. Y5 P @.DrivingHome := true;7 W$ O/ i9 M% n. ]* M
end;, _7 j$ s( a+ W3 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; Q% L2 w7 \: Q2 o part := @.transpOrder;' \8 z/ a0 p4 [" u+ l# L" |" [
part.move(@);-- load part
; [* O2 F$ C1 n5 Q) e, G7 v0 n @.CurrIcon := "load";
- S3 J/ Z1 A/ ?, j; l( ^- s GlobalDistObj := part.globDestination;
0 r" P5 k" B9 w+ T8 U* V assignLObj := rgmanager.rgAssignL;8 a' i5 d& x0 S2 \7 {
row := assignLObj.getRowNo(GlobalDistObj);
6 X" M" N, ?0 B; O8 l* | if Row = -1 then -- since 70& u& `+ g' i, Q, D& ?
if lan=1 then8 J$ B# {( J$ g) H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, G$ o; ?9 l7 t' j N to_str("in der Andockstation: \"",?.~.name,"\""));
" w2 o/ l' g" P4 r0 ? else0 V; J7 ]- K! o- J/ L0 w0 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ G. O8 V0 n c& T( j to_str("in docking station: \"",?.~.name,"\""));
0 V8 ?8 J; _5 l) z* {; M end;
: q" L& P7 `& L else" x6 q9 V4 b* P0 ~4 R' i8 g! I
@.Destination := assignLObj[1,row];' Z9 M. T; i8 [& u9 b* A8 F w8 W
end;
" y( O! I$ {4 e+ `5 |1 O newDirection(@);4 G6 r) k3 r! \0 _- @
@.HasOrder := true;
/ w5 E! U& L' B0 V% Q0 p- k' P end;
5 L7 v! c" {# Y- j end;
( [ Q8 u% c3 Bend; -- of the method
% _( T2 P+ ]8 F! {8 W" ?* z |