/* called by: entrance ctrl of the object 'track'/ Q9 Z2 |( B& p) k+ z3 H
*/0 R' D! N$ j$ q9 r9 V3 ]
is; G' c4 a" l4 P7 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 X$ _. ~6 p4 @
do& ]# j) S! M8 N- O# P' Y
Lan := rootfolder.Internal.Tools.AOLlanguage;/ G" c6 t9 Z" M
if current = @.Destination -- else return
; F4 T: [" {; z! s1 Z( B then1 g! B+ l9 e8 h" t
@.Destination := void;) `4 s0 m% v% @. V9 u
if @.occupied then
. G' C( i8 D: X3 t# T part := @.cont;% W* e% ^3 C- ?2 w, T. H
@.transpOrder := void;
0 h- s* J+ N X8 n3 v$ z" Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 ~6 d. F9 U: t: ]6 v
@,root.eventcontroller.simTime);
# X J4 q0 v$ Q2 I \1 h4 D @.HasOrder := false;
1 ~. V1 q1 y% ~3 L$ { @.DrivingHome := true;
5 H1 A w3 b$ G$ s- E8 @* D' w3 l rgManager.tryToStartTransOrder;8 J2 @: w Y. w3 }/ m) ]2 w
if @.Destination = void
5 d, R8 M: w T `2 V8 h$ h then -- no transport order for vehicle @ H, b5 j3 }9 k# G
@.Destination :=
; Q+ _+ X8 J9 y2 \% @. [ rgManager.nearestFreeStation(@,track.~);
' o7 F# N0 j, T# h" @: h* M newDirection(@); / N6 P9 x" J0 Q. j. q( l
if @.Destination /= void then
- o, F3 P4 @- F& I @.Destination.NumReservation :=
0 X" ]0 @) A2 B8 d: @ @.Destination.NumReservation + 1;- [9 V! n2 u7 c, G
end;
: [2 e9 O# {5 B m( c5 u1 {: N @.CurrIcon := "drivingHome";: D' e- d" A! y
@.DrivingHome := true;8 S3 M8 B& c( k4 Z
end;% W8 m$ R" l4 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& q# H3 O2 u* }/ A, W* K; f part := @.transpOrder;
4 b R2 O0 `2 \6 w part.move(@);-- load part7 G: N7 q$ ]3 [
@.CurrIcon := "load";
: ]+ {6 _& h. U GlobalDistObj := part.globDestination;
5 J% Y$ Z/ Y5 R- D assignLObj := rgmanager.rgAssignL;6 q7 s* Y( t( Q' d, t
row := assignLObj.getRowNo(GlobalDistObj);
9 V5 x( S* U, J( q3 j+ @% n if Row = -1 then -- since 70" Y9 ]% [" t; {/ \& B7 }3 f
if lan=1 then- D; w; l( G. i- x! r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# B9 T& u# t2 E# ~* J2 a. m9 ^ to_str("in der Andockstation: \"",?.~.name,"\""));$ d& l( E6 o* R) i/ e( L- U; m
else" C: x# y" f; d) X/ P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," w0 R0 G `, N9 s4 g
to_str("in docking station: \"",?.~.name,"\""));
6 n `! B+ K1 K! ?( [/ z8 Z end;% e" b7 F/ O* S& \5 E
else* m2 M8 q% l, {% F/ z5 q
@.Destination := assignLObj[1,row];
9 [/ s7 o8 N5 e$ W4 Z) b* f end;
" p4 t! g/ i0 |6 q5 I0 E* k newDirection(@);
( G* r. q9 c0 m' [' X' }6 X" q( N0 E @.HasOrder := true;/ I3 ]* U! G0 A6 A. ~- L
end;
) Y5 D4 {& O8 ~7 g% f A; _ end;" Y7 k* w# H' s a9 l3 d8 Q
end; -- of the method; j6 R- A: T6 M- Z. s o* B
|