/* called by: entrance ctrl of the object 'track'2 o K/ }* D5 X
*/
+ J- C* Y8 I0 c" w. Vis
( @. f1 z$ F+ h4 }: X6 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 }. s( u$ e4 _9 f: ?$ O
do
" W, P; O5 V! n; i: s& U Lan := rootfolder.Internal.Tools.AOLlanguage;
8 F& N& y( C4 i; p5 c if current = @.Destination -- else return
+ [" U- U! z6 M) F) I6 E! R% x then
7 G2 E9 K) H Q% n, o @.Destination := void;
% R3 I" ]8 |( ~; q if @.occupied then
( b( j8 C7 a5 ? part := @.cont;6 t: i& s: W/ J2 U4 y0 F
@.transpOrder := void;
3 p+ a2 J: A) ?9 I+ {3 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 _% D) f0 X$ A1 `: E' e @,root.eventcontroller.simTime);* w7 }* B; J% S# g/ \# x
@.HasOrder := false;+ J% `; u% @" N" c% [9 z
@.DrivingHome := true;8 J( Q4 P% y; S4 H6 R- k/ s
rgManager.tryToStartTransOrder;/ C& s: X t: o' P7 e
if @.Destination = void2 c( E u, E$ T- ^/ ~) f4 ?" q' R: b
then -- no transport order for vehicle @7 U* W' k. Z! }6 ?9 ]
@.Destination :=6 k% E8 z m6 c: o1 L# H4 @! m
rgManager.nearestFreeStation(@,track.~);6 `9 b+ f- K; a( O1 b" B4 }( P
newDirection(@);
4 v% `( W- S/ f3 j3 Y. s7 g, o' r if @.Destination /= void then3 c: d/ \2 D9 o% p8 |2 K- }
@.Destination.NumReservation :=; T/ L; a# j* L+ H: B
@.Destination.NumReservation + 1;
& ?5 ~+ ]0 V; Q; A/ h end;
& J7 q! ~1 @: I @" T5 e( V @.CurrIcon := "drivingHome";* T. Y4 Q$ l4 W0 I2 c" h
@.DrivingHome := true;) h, x+ w+ q9 u( }
end;
& ^" r- G: Q0 L# c( i; C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 H7 Z; E. ?: ?% t. q% D6 r) l part := @.transpOrder;: J# X. _2 \% {( V
part.move(@);-- load part
4 P" ?) f" Z) T) P) p0 W @.CurrIcon := "load";' ?3 |! {6 y6 n4 y
GlobalDistObj := part.globDestination;
& Z2 K2 z( v" o" } assignLObj := rgmanager.rgAssignL;
+ O3 {/ x! }0 [# k a% G' u+ K, N row := assignLObj.getRowNo(GlobalDistObj);
# U5 Q/ f* I+ @# P0 f& d if Row = -1 then -- since 70& B2 g0 d9 H8 P5 J
if lan=1 then
z T- x1 r1 p9 T. x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& a. J3 I# [" b1 i to_str("in der Andockstation: \"",?.~.name,"\""));
" t |# `/ ?" Q9 r else- ]8 }6 p% d* L" }/ g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: w n! J1 r/ [( `
to_str("in docking station: \"",?.~.name,"\""));
$ O( i& S. X! H0 @& x end;* G( [2 a- O. u
else( T0 B' b( n" {% u$ ?0 H
@.Destination := assignLObj[1,row];1 Q! k8 L& M5 X; R, R$ v8 m) I- h
end;
, |0 p. K9 M4 T1 @, D newDirection(@);* }% s8 M1 g% q7 Y+ g
@.HasOrder := true;/ I7 P0 b y9 m: q3 [
end;
1 m$ X8 I6 o/ F0 H% l, E! ` end;' J9 d0 L9 a# t2 H0 M% \
end; -- of the method
1 u0 }; ] v- C4 H1 c |