/* called by: entrance ctrl of the object 'track'3 N3 a/ Z9 V9 a& `
*/ v$ T7 F- k8 j8 C! n% q+ \, d; m2 p
is
0 L3 ?; F7 |3 }' p3 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ C$ b- ]. `- V7 {7 x& C m
do
; r# T. W4 `4 `% t Lan := rootfolder.Internal.Tools.AOLlanguage;/ j0 m/ F4 t0 Z; C7 J) u" d
if current = @.Destination -- else return) ]1 j! B: q- v$ A1 ]( E
then& A A* R- t+ P0 b/ X) u8 {
@.Destination := void;! J* q9 S: P9 A1 d% ~6 S
if @.occupied then1 H2 X: Q2 S9 m* @
part := @.cont;
, L( L& ]9 I% V4 `4 j" N8 a; N& q9 p @.transpOrder := void;
6 p# u$ K2 n5 T6 r, ^/ ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 c- ^. e$ g3 K: D$ {, o, U @,root.eventcontroller.simTime);# h+ E( k4 f2 q; N: i, @5 y& q& H! F
@.HasOrder := false;9 [( J0 ^4 e$ y2 y4 s) U2 U
@.DrivingHome := true;
( `! x9 J G' ]+ c rgManager.tryToStartTransOrder;" O) c4 r$ P; e6 g; L) J8 A
if @.Destination = void
! A; _8 y1 H. [* A then -- no transport order for vehicle @7 P+ s3 k; F/ w( l5 W2 q3 w. ^
@.Destination :=& T7 b2 t8 ~' F+ V
rgManager.nearestFreeStation(@,track.~);
% F5 @) w( D! d( p0 t newDirection(@); ; u ]& l& _. V) A
if @.Destination /= void then
% R% T# w! D0 L$ `7 Y7 z. J @.Destination.NumReservation :=7 H$ g$ h3 q6 ~# t1 R4 M
@.Destination.NumReservation + 1;- O7 L( o* V3 Z+ |6 [0 Z
end;
1 @/ {" ^# k$ E) u) g/ ~ @.CurrIcon := "drivingHome";
/ ?' H( v6 E- R6 z* ?2 E/ x1 g. S @.DrivingHome := true;& ?* E m2 k& H, U0 ]7 L
end;8 L5 R! T( s7 T X( r/ ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ h8 \! Y) p, G+ O/ p4 h
part := @.transpOrder;' i$ o. N7 ~- U- x6 H, T
part.move(@);-- load part
8 ]0 {3 y# j& e& ?1 n: A @.CurrIcon := "load";
8 r: {6 C3 U0 B: L* T, v( \- x GlobalDistObj := part.globDestination;1 ^( `9 W* U9 U0 e+ d1 r, n
assignLObj := rgmanager.rgAssignL;
3 ]: ~: C& g8 H# D2 |4 V+ ^, f row := assignLObj.getRowNo(GlobalDistObj);' y' K$ O- @% L6 @) G
if Row = -1 then -- since 70
/ F9 |+ ]7 h) O" f. p* j0 V# [/ z! R- {5 { if lan=1 then
. `- c# `. e( v# n8 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ i7 z1 R) M' S' ?3 l to_str("in der Andockstation: \"",?.~.name,"\""));3 i3 J9 q1 M0 n; \4 r$ u' u
else
0 a" \. L& c/ E1 x( P) e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ H" f6 b2 W+ O4 e$ G0 u3 x+ y; J, K( G to_str("in docking station: \"",?.~.name,"\"")); ) \0 t5 v* d& T
end;% B$ e& ~2 ]8 T0 |1 T- _- w( O# H- Q
else) f3 Q2 ^+ V$ n( }% X6 [4 Q+ S
@.Destination := assignLObj[1,row];# r$ i1 v q5 a$ o4 Q* `
end;
0 }! d- s" p$ p0 x newDirection(@);% A( D5 V) p& z. f/ O: z
@.HasOrder := true;
$ V$ Y, M# p! C. z) ? end;$ b! }! p! I! B* l# Q0 i5 J
end;1 c, m2 A9 O% M M+ `
end; -- of the method
5 \- q/ ~8 J/ @/ N& q6 Q |