/* called by: entrance ctrl of the object 'track'% b3 W& J2 V# Q) I1 M x* W
*/- j) e: l) T( K* |+ x5 x
is
, G ^3 A# j7 ^! w) O# w# d part, GlobalDistObj, assignLObj:object;row,Lan:integer;( V' ?9 J: @, w* J( f5 c9 f, X; p
do
) Y3 i0 \5 y' o( c Lan := rootfolder.Internal.Tools.AOLlanguage;
( P* O5 {* @7 M- C0 z if current = @.Destination -- else return
4 F8 U/ m% t" L7 D0 b then! V6 Y5 d1 E9 ]+ g" |
@.Destination := void;
8 g' k8 a B" P$ A+ ]; Y2 _. h if @.occupied then
" y6 `" h' H! J: F part := @.cont;( x" X; g9 w! }, x; Y7 [
@.transpOrder := void;2 n7 R$ A j" t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 Y5 l# ~4 B C I5 I- O# M; G @,root.eventcontroller.simTime);! I) b* W/ e: d k0 c& C
@.HasOrder := false; V/ H6 g$ {; L# o4 a
@.DrivingHome := true;
; H$ n- a8 {% ^! V rgManager.tryToStartTransOrder;
$ z( g1 T& c8 \" F4 W4 A if @.Destination = void( w% O4 C" |' r0 R1 ]
then -- no transport order for vehicle @
) n: ^) Q/ ~" \. m& C( a! g7 S @.Destination :=3 q, k* D9 K s) i& Q" Q6 b
rgManager.nearestFreeStation(@,track.~);+ ^6 _4 q" z9 v4 i
newDirection(@);
; d$ O8 \. i' s6 F# w* ^ if @.Destination /= void then! j9 A, l- C; ~" l! Z) |
@.Destination.NumReservation :=, ^- H/ j) a& i
@.Destination.NumReservation + 1;
E$ W! L5 a; L3 R& j end;
3 K/ ~2 p0 C3 U$ N) |9 l6 h% E @.CurrIcon := "drivingHome";
2 O* z* F" M0 G/ p' P @.DrivingHome := true;& _" d! }! H( v9 n+ }. A
end;- X" T- @( t# Q+ b/ t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 h9 Y0 a- x4 u
part := @.transpOrder;7 o& f0 u5 w9 U( D M. M/ c$ b
part.move(@);-- load part
9 d5 O! y" b# ?) R( L @.CurrIcon := "load";
9 a5 o2 E; v7 @ GlobalDistObj := part.globDestination;! U1 J: D) T3 ~, l2 ~0 r
assignLObj := rgmanager.rgAssignL;! e* }: }6 k# c# \
row := assignLObj.getRowNo(GlobalDistObj);
& E0 E* z. R6 }, R I( A! n if Row = -1 then -- since 70& Q! t" C5 ^/ s7 P& i
if lan=1 then8 g3 ^6 j7 z/ m( `$ g1 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 W6 `# V: E4 B+ u0 Z5 } to_str("in der Andockstation: \"",?.~.name,"\""));
) U/ a9 Q6 `6 R" N- k else
- P1 B) Y9 I1 }8 j' \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 S- {: r/ N8 i2 t* F7 D( u
to_str("in docking station: \"",?.~.name,"\"")); ) o& }: T5 z" v& x
end;2 y6 Y9 U! g' n. _* u
else
% X, l" y, |) F( N' H% l @.Destination := assignLObj[1,row];
& j! f. \6 T& ~" \! e9 X: q% V end; $ a- k: D% ^6 i# E
newDirection(@);$ p6 ~5 ? p6 b' O
@.HasOrder := true;) Q$ S" I W* H! Y6 x- t+ j/ z. Y
end;
/ L6 W4 H. n. G4 \ end;- H$ M; R. e& s2 b' F6 y" n7 S1 B
end; -- of the method
. t, Q) { A; \: R0 B' B* h q/ p6 K |