/* called by: entrance ctrl of the object 'track'
3 P' p9 D: t3 l7 ]*/
8 y% Y: Z3 }# V6 B* m0 Vis
3 z4 V! B: W5 j. J part, GlobalDistObj, assignLObj:object;row,Lan:integer;( m% N. c/ m2 D+ I. o) O# E
do
: [- w ^) G" ? Lan := rootfolder.Internal.Tools.AOLlanguage;8 y$ c+ Y2 h3 Z6 x. x" e" a
if current = @.Destination -- else return- \) p# @, ]+ r/ D a5 x7 ^
then0 W& ~* ~- C+ ?2 h
@.Destination := void;
* v4 [9 ?4 k0 B1 V if @.occupied then
* F. K5 D3 Z' @3 s$ d6 @% Z part := @.cont;
8 f, G6 w/ m5 l& `1 F; ~9 }: _ @.transpOrder := void; G! S1 _- z+ |" d7 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 i, @" U7 q! P9 @ @,root.eventcontroller.simTime);
1 Q( N' w8 f, _. G) g @.HasOrder := false;
/ K% h1 S: P) q% n7 M7 {, [ @.DrivingHome := true;
! D3 s# ^5 A8 q+ ]! t rgManager.tryToStartTransOrder; R; J4 N9 p! {% _
if @.Destination = void
% k: O/ y4 N8 J: b* N then -- no transport order for vehicle @; Z) c% E' `0 [# A2 T
@.Destination := H6 n1 p" j8 p: s4 E4 k
rgManager.nearestFreeStation(@,track.~);& u: S9 u) c6 D
newDirection(@); % N/ [% l7 P9 E( n1 }
if @.Destination /= void then" ^! Z+ ]. P3 T: E( R' N4 _! D
@.Destination.NumReservation :=3 } E+ R$ j2 {" i6 D
@.Destination.NumReservation + 1;
: h, Z) O6 R" ~& o+ d9 R$ A2 c end;8 K, p; }* z7 {) ]: a
@.CurrIcon := "drivingHome";0 [7 K6 ?+ P0 `
@.DrivingHome := true;* q* q0 x w, i' N8 I6 s
end;' O* n: ?% L' p v4 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 @+ R. d i; @; l2 v& i+ e8 f t
part := @.transpOrder;
3 C, @' |7 e) T part.move(@);-- load part- A. y, K4 F7 y2 r
@.CurrIcon := "load";. K8 f0 o6 N9 ]8 z
GlobalDistObj := part.globDestination;" F! K, E/ [( ^ I
assignLObj := rgmanager.rgAssignL;
/ e& U9 k0 K* B$ e! d- T, S row := assignLObj.getRowNo(GlobalDistObj);
6 q+ Y& [1 k' [/ f2 } if Row = -1 then -- since 703 ?# E/ a0 _# i
if lan=1 then
! O+ ~. e- h9 ]2 m2 f8 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ G" v9 a* o, l9 O5 ?' s9 W1 X) k/ v
to_str("in der Andockstation: \"",?.~.name,"\"")); [5 Y/ f: ]3 G% g
else
$ f! K* ^( G- ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* W& ^" ]' T1 u: V# K/ Z# J to_str("in docking station: \"",?.~.name,"\""));
0 `; U" F( j6 Y! T- a* T' F2 v end;
4 t/ L5 P9 ~; J else
' \) |3 E! o, l# z5 W @.Destination := assignLObj[1,row];) S, j" c( q8 D& |7 I4 j5 p7 h
end;
4 X$ T: E# H& n) i# Y% a newDirection(@);
1 g, o) v) A& f; e, Q @.HasOrder := true;# I2 R: n0 e* B1 v$ {& o
end;
: Q3 N6 ~/ g& E* m% _ end;
. x" ~3 K+ _4 ^. I: ?, G/ Dend; -- of the method5 Q2 X7 g! n3 n" {0 O y
|