/* called by: entrance ctrl of the object 'track'
* H- V, i* n. p u: C, i6 I2 H*/3 e+ n( D# H" v! o! E9 p1 B
is
, f# d# s2 v6 w. H0 p+ x part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 Y. I) z; v& ]* q4 Z
do
$ G& a, A S; h4 C5 u Lan := rootfolder.Internal.Tools.AOLlanguage;
8 l8 \$ w# O* ^ Q if current = @.Destination -- else return+ E% N/ e$ [, o3 D: Y& _
then
! Y# V8 Y. q3 r2 V: a; N" P# D @.Destination := void;
9 v6 e0 N0 \; Z; G2 H if @.occupied then- x4 ?0 d1 F6 v2 ^
part := @.cont;
, s& H7 J4 A- Z @.transpOrder := void;
" K7 B. g: b7 q( \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ B) l. B8 e3 H; e1 E+ x' q$ m/ k8 L
@,root.eventcontroller.simTime);
% h4 n9 [1 t; u @.HasOrder := false;
7 i5 @. b4 }/ x: L& p @.DrivingHome := true;
; F: R$ B$ }7 ^$ X+ Y, U! I! v rgManager.tryToStartTransOrder;: o- b: M, w# C4 ^1 H2 `
if @.Destination = void' y& q3 y, e1 G+ [& k" I
then -- no transport order for vehicle @
^' ]3 V/ [ Q9 J. D @.Destination :=' x% z5 S* Z& ~0 U) T% ^/ y
rgManager.nearestFreeStation(@,track.~);
' `* p2 b9 Z9 l/ V- d- k newDirection(@);
% e' X5 S* ~2 Q) s8 @& ]$ z if @.Destination /= void then
+ V3 V1 X( I3 S! Y |3 f @.Destination.NumReservation := |/ n/ l! [! y5 ~
@.Destination.NumReservation + 1;8 ? J& \# B, m" y8 |4 `
end;; s. Z' u! _0 n. I
@.CurrIcon := "drivingHome";3 H+ q0 p* W/ f& b6 @
@.DrivingHome := true;
/ |* N. x2 W6 }$ N1 e& J6 i end;
( {& q4 s9 z6 C2 M" p: x z else -- the vehicle @ is empty, both vehicle and part are in the same dock station& ^0 ?1 ]" _3 J/ |8 t' x
part := @.transpOrder;
2 V: B' R# M4 R; T part.move(@);-- load part
( X3 A" c9 Y5 u0 x: {8 t' G @.CurrIcon := "load";
4 A9 L- V5 p# z) c% ^9 s2 v& U GlobalDistObj := part.globDestination;* I3 E: \+ u6 `/ g4 x3 J
assignLObj := rgmanager.rgAssignL;
) Z: S! J" U, G+ e g, D; e1 ]" X row := assignLObj.getRowNo(GlobalDistObj);" ?; i1 m' f4 w, |( Y: ^
if Row = -1 then -- since 70
! t, j0 D8 {* L# w if lan=1 then
5 \" d: {$ w& I1 g# Z$ g4 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ }$ B3 f9 X2 |9 U& Z
to_str("in der Andockstation: \"",?.~.name,"\""));
6 [4 E+ R2 N; O W( @ else
! K4 H9 `5 C% T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* c( |$ ]0 z8 M' A- P' U
to_str("in docking station: \"",?.~.name,"\"")); 8 o$ {, |$ o! D7 w, `% H
end;
/ C5 X# ]- ^. Y; O1 Y else
1 x! E5 H) A" k% t @.Destination := assignLObj[1,row];, @1 B( X& G: {, C
end;
4 Z% r* K3 w& A4 W5 s! {; G newDirection(@);
# J5 Z" Z% y# m- j3 a @.HasOrder := true;
8 ~! v% q# A" ]) X' } end; `/ v5 S/ p: q% g; ?2 c
end; f. m* n3 V$ f
end; -- of the method9 {% x" M Q6 B5 K
|