/* called by: entrance ctrl of the object 'track') _# Z& a0 N% ~: O2 d4 P$ n
*/! U( y# g) q% t7 T2 G. H
is+ v5 W& z9 j* E$ @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
y$ X! f: O1 u Sdo" \! R8 }* l C" o( Z! l
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 z" \' d! t# |' o0 y9 T if current = @.Destination -- else return
! t" Q- e( P! G* O3 n7 b0 }7 G. |+ F then7 w, L G% m% e" K- c, L
@.Destination := void;
+ {3 F5 f3 p8 b+ k if @.occupied then
+ U4 B9 O: `3 t" v6 { part := @.cont;
. L P1 H I9 R. W" c @.transpOrder := void;
* `! @( I$ @9 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. b6 n8 ~% C- e
@,root.eventcontroller.simTime);
3 u' t( G& e8 y/ n& D/ P @.HasOrder := false;
- _1 {1 p# X) z, Z! t- L1 E @.DrivingHome := true; r5 V9 M+ g, ]1 |; a6 c
rgManager.tryToStartTransOrder;! l# z7 M7 I6 _# ]! L% F# x
if @.Destination = void1 M9 `, @- t" b# v# z& g
then -- no transport order for vehicle @
" G' f" I: k1 ?) v! F" Z @.Destination :=
! K6 q4 @5 t: b( n) v rgManager.nearestFreeStation(@,track.~);
$ e& p2 z8 I' b1 ^& C newDirection(@); 4 E0 m6 x! J6 P
if @.Destination /= void then
* P1 ^* S/ V0 f0 f# w" P @.Destination.NumReservation :=6 a: X% S' P% B4 ^/ u. [6 u
@.Destination.NumReservation + 1;- {: [) K: f; e3 W, b
end;- g% p& z( P$ M$ v3 k% j3 n5 I
@.CurrIcon := "drivingHome";; L$ J5 A& ^2 w; t( I3 q
@.DrivingHome := true;# c1 S8 [! G- ?- F
end;
6 [/ H. G4 A4 {- @& j, ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ {5 O+ G% e3 f, D, s
part := @.transpOrder;' H! r5 ~2 R% ^3 |7 n
part.move(@);-- load part
% a1 `2 ^' c9 @: m' u% U; \ @.CurrIcon := "load";. P/ U* l% ]) k& ], R
GlobalDistObj := part.globDestination;
8 L) B! w% R8 b" ~ assignLObj := rgmanager.rgAssignL;
2 f# z1 r+ i+ b6 }9 Q3 R* ~ row := assignLObj.getRowNo(GlobalDistObj);
( T$ x0 q; _) H- d* f1 F. } if Row = -1 then -- since 70' ^$ l. ?+ @: @/ a
if lan=1 then
1 X/ z8 U% i! ^9 _# i8 c% N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ]9 S8 C3 @2 T. m& a0 M# T9 X
to_str("in der Andockstation: \"",?.~.name,"\""));
2 D. f* r& T& S$ Q: E else
1 e7 t n! A/ o7 ?! h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* o7 q' C/ Q- Z1 p; c8 S" c
to_str("in docking station: \"",?.~.name,"\""));
3 b/ n& S/ R, j- A( t4 p& d# H end;
# [6 i }6 x5 H else
4 _# ?3 l j5 u( F, T) H @.Destination := assignLObj[1,row];7 F$ F% `, ~, X' g! K
end;
9 W+ `2 _0 k1 E( t" i0 R7 V' @ newDirection(@);
( ]2 W9 d- i# B/ k w @.HasOrder := true;
* u$ v2 ~% S) ~* I) j2 u9 o, v+ U end;. P/ u8 L, k- R! L- o8 ~- G; E+ _; x
end;
' X) M- h5 P- m6 _/ fend; -- of the method
4 @2 Y( U9 D$ G. O! l5 U2 z |