/* called by: entrance ctrl of the object 'track'
0 I3 f7 i1 B; e' |" T: A0 y0 b. [2 s; T*/7 E0 m% L0 L1 J& b% {5 A
is5 r2 j* p3 P. R$ P) S/ N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 n( |, k9 x1 `8 n
do
; v7 j; d8 t6 D5 [3 E Lan := rootfolder.Internal.Tools.AOLlanguage;
6 a" V3 v9 }" F5 ~$ R { if current = @.Destination -- else return3 e$ S* | t0 U6 N d2 Q
then
; X( E7 M! n' b4 D1 y% w, Q @.Destination := void;
0 B* {/ `" F* d9 L ~3 n if @.occupied then
' y4 s b) O* c+ G1 D, D, i, y part := @.cont;4 T' }7 F- v% U$ E! {7 B: ^0 h Q) O
@.transpOrder := void;
$ x1 Z% [1 P. t/ Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," A3 U& o% s# x; T, ]( N/ X, ]* z
@,root.eventcontroller.simTime);# |* ?* c" F0 j2 f: M/ c! g
@.HasOrder := false;
; v. F: ]9 q6 K+ t1 ]$ f @.DrivingHome := true;
/ p5 s3 T3 S! Y9 M7 r8 H rgManager.tryToStartTransOrder;
0 L5 C, T6 z; Y; a7 ~2 J, |5 O8 ] if @.Destination = void
% a- ~9 L" n- [3 j. l then -- no transport order for vehicle @
# x5 m5 F3 Z7 ~$ v" r" B @.Destination :=) v! k# S. g" h7 J
rgManager.nearestFreeStation(@,track.~);
% E) {! w- ]7 [8 I' E1 R newDirection(@);
) e8 T1 ^1 s4 M9 c) m" A if @.Destination /= void then
o ^( C3 k& P! c @.Destination.NumReservation :=
" T- Y# n) x, d) f$ E) g H @.Destination.NumReservation + 1;" W l$ ?$ Y F
end;
( u: D& f# Q" M4 v4 l- W7 j! @/ m @.CurrIcon := "drivingHome";9 b$ D/ k1 f, q+ w
@.DrivingHome := true;
3 `% a( |5 D7 A end;
! p$ x+ M8 ~9 ^2 k! r9 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ r9 O1 ~9 h( U) P
part := @.transpOrder;9 {7 y, O5 P3 M
part.move(@);-- load part
# S( T6 S+ l g% s9 K @.CurrIcon := "load";
8 m* |9 S/ D- k8 N2 |2 g GlobalDistObj := part.globDestination;
8 p; y/ T& y# h+ Y8 [5 ?0 E assignLObj := rgmanager.rgAssignL;
' f a" K! y6 G0 A5 v; f. @6 q row := assignLObj.getRowNo(GlobalDistObj);( l& q) ^* g2 G6 J7 G+ E
if Row = -1 then -- since 70
% a2 V" I" o d if lan=1 then
. Q x1 d' Y0 b' s* [( T$ E$ G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ y' U$ B7 B' |$ ? to_str("in der Andockstation: \"",?.~.name,"\""));& z$ j0 l" ^9 H# e5 m* ~- b& J
else7 L& ]7 V0 e0 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 |, s0 \5 V# O
to_str("in docking station: \"",?.~.name,"\"")); y8 ^3 k: X! q6 Q! A: O
end;) ]9 F5 Q& _& O5 t1 c$ A E' A- v
else
[# Y9 ]+ D* Y' o @.Destination := assignLObj[1,row];) a/ G) _4 F2 k! v
end; U3 E8 j( P& H, ?# z0 P# g
newDirection(@);2 A% T0 ^5 P8 u& W
@.HasOrder := true;7 d# k, ^, p1 z& `
end;
' B/ {+ h- p* f, z' ~) H5 O end;
0 D) k7 r/ k" j3 pend; -- of the method
5 Q5 h9 a6 ~$ j, Q( V. h5 ] |