/* called by: entrance ctrl of the object 'track'
/ H2 D0 w' r9 e*/
7 q* Q% Q) \5 w5 B, m M0 h, m3 Tis# C0 X) r) d8 L4 i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ E% n- N! Z% i# \( z' Odo
" f" ~3 m/ U% Z6 `- } Lan := rootfolder.Internal.Tools.AOLlanguage;: t+ {& c& p! D- a: a M
if current = @.Destination -- else return
( U' W9 n6 K0 [4 Q% A& t( ^3 r then
8 O' {$ ?8 a& z @.Destination := void;$ K! V' k% G* {3 G) f" d8 T9 W
if @.occupied then: X7 o4 s; o& c
part := @.cont;9 X& S' m" U0 m! O3 ~
@.transpOrder := void;- E+ \, j; @) k% U f1 { \* h7 d5 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, C @2 _% Z" V5 s0 G* L: c
@,root.eventcontroller.simTime);7 F3 I, ?1 {) j/ q. ~& J* r1 ^
@.HasOrder := false;
A2 M1 ]6 D. ?8 x1 } @.DrivingHome := true;( ]( P' }! H6 [" ^
rgManager.tryToStartTransOrder;3 Z$ [' u5 U' U0 d! [9 k K% z- d. h
if @.Destination = void
6 P$ B5 l- v+ g' |! @7 P then -- no transport order for vehicle @4 ]9 p) K/ r6 `; t: g+ }$ @
@.Destination :=
3 j' u% E1 h4 Q; _3 Z% ?2 ~& G rgManager.nearestFreeStation(@,track.~);$ s q+ h: Y, U
newDirection(@);
6 E' q0 i# K7 [0 S1 B# G! g if @.Destination /= void then
% Z) Z+ U) K& h$ H# X @.Destination.NumReservation :=
- R) L6 R C7 t3 a$ V @.Destination.NumReservation + 1;* R6 v7 a- g" j3 e8 F6 ~
end;6 \' I1 e1 ?& K
@.CurrIcon := "drivingHome";
2 i0 {* b; j: h @.DrivingHome := true;* N0 l5 i& P8 r3 z/ q/ ]" n- h$ a
end;
% Y: C2 b# b5 W# M Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station) K. U) X4 z. m$ R( i
part := @.transpOrder;2 x" [& q% Y( g+ n
part.move(@);-- load part
4 H6 R: J: `1 l/ H0 Y @.CurrIcon := "load";5 Y' C; e' Z: G8 A; N4 ` O0 l( w
GlobalDistObj := part.globDestination;
' T n/ y$ }2 Y, Q6 E assignLObj := rgmanager.rgAssignL;3 b) m* h T8 W1 z+ x
row := assignLObj.getRowNo(GlobalDistObj);
; ], n9 z. D4 ^0 K+ ?! U0 O if Row = -1 then -- since 70
5 f/ @. K! D9 R r if lan=1 then" C* S6 S) p7 H% ]0 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- U+ N* C$ Z+ x
to_str("in der Andockstation: \"",?.~.name,"\""));8 q+ R0 j7 ]/ q9 b* q# |
else
2 l3 u* _* H7 y7 @' g% k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 L% P# g" z u# h+ X7 U
to_str("in docking station: \"",?.~.name,"\"")); . T1 P+ v) U0 R1 R9 ^
end;
. Q& W& ]6 n, H. y$ A4 m else
/ G8 [( A5 k" d3 ?, D2 I @.Destination := assignLObj[1,row];- y! ^. g+ L& t5 n8 y2 X; a
end;
; w9 V, n0 b# n1 p8 _& x newDirection(@);" }5 X' w4 [ O( c9 O# | K
@.HasOrder := true;
! \, Q9 z# ^) m( n end;
4 u+ b n- `' Y5 }- T: ? end;% N" f" b/ }2 w
end; -- of the method
6 K2 C* \2 D- q! T4 y) d+ F0 d) S |