/* called by: entrance ctrl of the object 'track'4 W( f* Z% `6 X; f0 {
*/
" {8 A9 w: u7 r- J6 dis7 g0 V# ?6 W( i) ~' H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 a- D2 ?: Q9 P; E; j+ `2 ?/ ^do
L% n6 i2 _* v' U) K! L% Z% |5 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
( c& i: }. H6 a; X: E/ t: i if current = @.Destination -- else return
6 A v& z5 b2 W then0 ^1 i7 t& I& I% ?" F
@.Destination := void;- }/ W2 K' u4 J9 b5 {
if @.occupied then. Y2 c& z3 F5 q8 e; \
part := @.cont;9 N% d* J6 E6 b! \. R: Q* c+ F: b
@.transpOrder := void;$ Y1 _1 }1 M# K T* ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& Q/ u& l4 ?" I# u8 Q, z# K3 o @,root.eventcontroller.simTime);
1 R, w# _( D" z# e8 j4 I$ e' m @.HasOrder := false;
) f! q% ?, J! Y. k8 J5 o3 L: H @.DrivingHome := true;
9 \7 D' U) c8 {# G8 y4 n& \# L" W5 q rgManager.tryToStartTransOrder;
, Q2 T! O x* E4 c5 R if @.Destination = void1 h% Q9 L8 E" G4 e4 `1 V9 q
then -- no transport order for vehicle @1 W/ Y7 q) ]! z! D5 }3 ^
@.Destination :=
8 |9 H" H/ p1 A7 e* {1 W( q rgManager.nearestFreeStation(@,track.~); @6 U$ _, H+ h% ^
newDirection(@); + l" ] x2 [$ P' d3 R; t
if @.Destination /= void then% S! h. D% H7 P( @7 } e6 l
@.Destination.NumReservation :=5 ]* G( s% l* z
@.Destination.NumReservation + 1;( S: G, y: [; r- H: t5 f) N
end;
4 b6 Q1 V7 {+ n* f. Y @.CurrIcon := "drivingHome";: m2 Z( N! x6 j2 V: m
@.DrivingHome := true;4 Y" h) p X/ }$ J7 s6 f7 c
end;- y/ u2 }5 |' ?: c/ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 V$ U6 f9 Z# W# k part := @.transpOrder;
6 n/ d( ?3 ?' l/ m part.move(@);-- load part" M$ U- @+ A) P% A \9 S" f9 Q, K
@.CurrIcon := "load";
" j8 a5 u V% z0 Y7 \ GlobalDistObj := part.globDestination;7 d0 c4 l$ t" T; I& }* _' R0 H" S4 |( z
assignLObj := rgmanager.rgAssignL;
! u4 L& N& n7 o3 R row := assignLObj.getRowNo(GlobalDistObj);* ^- U8 n1 Q4 Y+ m
if Row = -1 then -- since 70
9 w2 ]) Z) E9 t3 \7 P c if lan=1 then
5 |+ t. i, v7 v* U2 I7 b6 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! B. o$ s m) n6 Z- g2 O- b
to_str("in der Andockstation: \"",?.~.name,"\""));+ ^% H9 c+ U& e3 c& l' r/ c
else' ^& {6 e# j' t/ m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 J% F, C" o) M5 X* A7 N9 C: p to_str("in docking station: \"",?.~.name,"\"")); : p) S5 p! }2 `2 w' @
end;6 I6 g1 ?) K7 Q( g
else( X T7 G% Z. {% v5 S w# I% k
@.Destination := assignLObj[1,row];$ X# [6 E! q3 E! }( D4 }
end; 3 V8 h0 s7 p8 _$ ?7 G, G* r6 N4 Q
newDirection(@);
* |- y6 o% i+ e2 a% [& e @.HasOrder := true;: R W# ]6 J3 O
end;, X& `" Z& l) j' g" W4 @0 H
end;# x* I3 K6 O4 x
end; -- of the method- d9 z7 c* j; f9 W
|