/* called by: entrance ctrl of the object 'track'2 Z9 w- s1 e G3 B$ |. L
*/. C9 N7 r M8 S. _) W0 t/ c0 \# A
is e: [1 ]& D; |1 x7 f: n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 l+ o) H8 C) f% x/ s
do
6 v- A5 z7 @/ b% F' f7 _4 u8 j Lan := rootfolder.Internal.Tools.AOLlanguage;
% D- W" P/ x0 G3 j6 {2 }2 a if current = @.Destination -- else return
7 F- S b4 o3 D& S, X then
- f$ A) J4 O5 m1 j* I; V @.Destination := void;
' P* H" i# g$ Y% j% B% b' V if @.occupied then
9 v+ r' Y }1 C- A. ] part := @.cont;( _- D! d; C7 u1 i; x' n* A
@.transpOrder := void;- }( x" |- U/ g3 Z9 p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 G- ~( w0 E! W9 t @,root.eventcontroller.simTime);, Y/ H, T6 D/ C8 }0 ?# D# b
@.HasOrder := false;
8 D9 d. G+ G, B% U! i @.DrivingHome := true;
+ K% T2 C# x5 l& ? rgManager.tryToStartTransOrder;
1 V. d* L- Q0 z if @.Destination = void2 s. p* m' L$ A; y
then -- no transport order for vehicle @+ Z( K0 i. r" ]: O& S
@.Destination :=
4 R# I% W7 |/ r+ f' H rgManager.nearestFreeStation(@,track.~);: l; I0 x. l5 Q5 b7 k( j$ }
newDirection(@); 5 B3 l, Y6 r$ z- B. D
if @.Destination /= void then0 Z, P# Y( ]' N! E/ B; ~
@.Destination.NumReservation :=
+ f( g' x3 S0 c& X! g7 N/ m @.Destination.NumReservation + 1;7 ^% `. i& J; ~ l' t
end;
& k3 s1 P) A2 y3 |6 N) E @.CurrIcon := "drivingHome";
5 P7 x( A4 I/ Q) w @.DrivingHome := true;) L+ j/ N' c# D/ v# Z
end;0 x5 @; {+ p6 i8 @# Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 o- m4 P( `' L7 i$ D* i
part := @.transpOrder;
& n. ? `; A6 r* q/ ~4 a part.move(@);-- load part
2 Y2 I) L0 Y/ x. g3 D @.CurrIcon := "load"; s8 F! `! |( Q9 ?0 m: a0 v( t
GlobalDistObj := part.globDestination;
+ T' p5 j9 ]3 _1 H9 q" l assignLObj := rgmanager.rgAssignL;
- ?! R& R4 I6 y7 N- V row := assignLObj.getRowNo(GlobalDistObj);8 O# @0 p- h4 V& w3 G3 Q. W! `
if Row = -1 then -- since 70
# S0 ?7 ~# X k& s1 N8 L if lan=1 then
4 |) d7 M9 l( j; z% j2 O; R7 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 A9 X) ?1 z- R0 W! r- d
to_str("in der Andockstation: \"",?.~.name,"\""));
- {1 T4 \/ G" O7 K else' T, G8 A3 N( [) q# ?2 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; x2 C$ z" @- S! k
to_str("in docking station: \"",?.~.name,"\""));
& s9 ~" p/ R1 {7 ]2 E* i; K; D end;
( T" ^3 `5 ?& s% n( J1 } else
/ e/ Q _5 |3 A @.Destination := assignLObj[1,row];2 V" G5 s% I' {: f
end;
0 _* g, |: ]+ T! n newDirection(@);
8 X" ] \- Y1 ]0 l @.HasOrder := true;
$ _3 O E$ h$ H6 t8 u: f end;) o' j* d5 n$ U8 l9 [! I0 {
end;7 a7 Z6 v" ^& U& ~, v& a+ ?& m
end; -- of the method' Y( d: B0 }; d- A& N) t5 b. V
|