/* called by: entrance ctrl of the object 'track': ^+ O4 B s6 j8 c% |
*/
1 y2 z* i4 V# n3 G; [ M1 X' eis
! w/ T& b8 n% L. `) o part, GlobalDistObj, assignLObj:object;row,Lan:integer;- L u. S/ c+ |
do
6 B* y9 ^0 {, F h Lan := rootfolder.Internal.Tools.AOLlanguage;
+ P+ u$ d/ E* [+ r4 a9 H if current = @.Destination -- else return3 u9 y; s6 R0 g& ^
then
/ G8 p0 N7 q- E9 x( Z2 J: @- K% q; I @.Destination := void;
5 |- S' h( l1 `3 x6 I1 n if @.occupied then. D! M6 A+ }# E# O% W$ ]
part := @.cont;
! k$ f6 p3 E8 p4 M @.transpOrder := void;- d8 b5 v G; j. v( l% ]9 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 p3 P- q. w7 ]
@,root.eventcontroller.simTime);
/ g. d6 l2 X1 J g" `3 x- @4 _1 K& x @.HasOrder := false;
- d; c3 n$ G" m3 h: Y' D) n0 ~2 e' U @.DrivingHome := true;5 d/ t, b1 T; Y' }; M
rgManager.tryToStartTransOrder;: g; l8 [ A# I- F4 z- @& Q
if @.Destination = void2 u6 R- j$ H! E* Q8 C! T* I
then -- no transport order for vehicle @
: j& s2 C5 t& ^6 Y5 b @.Destination :=
5 N# U8 R- m4 e7 Z. H$ W rgManager.nearestFreeStation(@,track.~);- M5 `7 c+ [9 g6 ^5 f, q
newDirection(@); ( T X. w1 i2 @4 w7 c
if @.Destination /= void then
1 \+ \& w" i5 ?6 P- l) ?; J' j @.Destination.NumReservation :=8 ^& w; p1 Y/ M" E
@.Destination.NumReservation + 1;
. N3 ], v' d6 J. f end;2 V5 k. y( @$ p5 ~& ]7 t5 W$ Y
@.CurrIcon := "drivingHome";
) s" w6 }' e& H+ |5 r4 \% l8 K @.DrivingHome := true;
0 A; b) ~5 t2 o2 \2 Y6 P o% t0 \ end;
! H, X# [% F5 E8 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! X( Y6 F, W8 P/ P: u0 R part := @.transpOrder;
# ~' j' r8 o+ T" H+ Z; p, O' Z part.move(@);-- load part! e1 S6 v0 J% z! i3 b7 F/ G
@.CurrIcon := "load";
6 j/ r" K/ J* f6 s O0 Z GlobalDistObj := part.globDestination;
' N$ t9 N$ B% n L7 L3 X# X! e( ~! g assignLObj := rgmanager.rgAssignL;
" L" @ K& t( M: y row := assignLObj.getRowNo(GlobalDistObj);
|4 m' e; S' ~) x7 X! n) g if Row = -1 then -- since 70
( U0 d% p5 j6 O! e if lan=1 then
4 j6 ]% h' q7 t$ ^+ G1 A) g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* C6 X; K9 C6 @# x
to_str("in der Andockstation: \"",?.~.name,"\""));* y: y3 n8 r7 w$ C2 `3 C
else( w" |2 o- z T5 {: K5 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( _" |/ ^& c& [9 D0 `
to_str("in docking station: \"",?.~.name,"\"")); 1 d. W& ?- v9 S6 z; M$ l; T6 A
end;( G0 x7 v5 n4 e. B3 \4 V& {4 v
else
! |" L/ I' o+ x& l5 B* @; F @.Destination := assignLObj[1,row];( |9 M& }+ [9 [5 T$ M' ^
end;
# a' _( W; l. q' n W M, B9 c newDirection(@);7 ~ H1 F0 y, P# J5 T5 q6 E# F
@.HasOrder := true;: q, h" ~, {0 Q5 Z6 e5 v7 V/ s
end;
# Y! E2 A6 z4 v' ^! ^/ n( d end;
, `5 T) ~& ~! w2 ?- X5 }end; -- of the method
+ D1 y+ J: x! ]+ `& s% i0 v) I7 q |