/* called by: entrance ctrl of the object 'track'
" w4 X5 ?$ e6 E J" q& S& L4 y*/
) h* u: W0 c7 I# c6 Uis
' G& b+ e/ C; Q5 y6 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( H- S ^2 d9 w* H* G. Sdo! R$ L/ w4 x( n( X0 D4 S2 r) P2 }
Lan := rootfolder.Internal.Tools.AOLlanguage;# u! K& y) ~0 f6 p" a' t R) ?
if current = @.Destination -- else return! p: y- I1 D8 m4 V8 t& M
then5 l* D' H* h e, ]; j9 A
@.Destination := void;
' I6 P7 R2 E! O% }& b3 r if @.occupied then0 t/ ^1 q# @' T9 [. a, h) l
part := @.cont;' E8 p1 M( H4 O4 }2 ]+ r- H" V
@.transpOrder := void;
- K: U, O- o2 n& u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
J" W* o+ d, @ @,root.eventcontroller.simTime);
+ x1 V5 T& Q9 k' Y- y @.HasOrder := false;4 t- s( J% A' j7 w. U
@.DrivingHome := true;
3 Z' u b0 q/ @3 m9 D4 x+ W rgManager.tryToStartTransOrder;
; c' n: `7 m) K* a; n if @.Destination = void
. I$ ^2 l3 E0 Z! A( N then -- no transport order for vehicle @8 E; w+ J4 h- p% B6 Y2 B' \
@.Destination :=
/ N/ ~; |, U; j% K; U! r rgManager.nearestFreeStation(@,track.~);: K0 E, V- B6 k7 q
newDirection(@);
' t d& U5 f% t9 _! ` if @.Destination /= void then' L. T3 `2 @3 N
@.Destination.NumReservation :=' ^( b) m3 f1 V, |
@.Destination.NumReservation + 1;8 U7 ]9 _# E2 \) [6 c
end;
( Z8 ?1 t+ Z0 F; ? @.CurrIcon := "drivingHome";! o. ?. C. U# `- r0 M3 H# U4 O
@.DrivingHome := true;
/ F: y$ }' f* K r4 E% M5 ` end;0 r: g) o* ]4 T9 c& ]7 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, _; R# s* L0 @: n* w% {- b0 l
part := @.transpOrder;. y* i3 i9 S2 Y1 ?
part.move(@);-- load part( H4 T. O4 I# h+ a; L
@.CurrIcon := "load";7 V( ~- v; X4 R3 \3 P" y
GlobalDistObj := part.globDestination;+ p! r# _4 n/ \& M
assignLObj := rgmanager.rgAssignL;
1 i1 t$ d% i7 A5 \. D; P, j; i& T row := assignLObj.getRowNo(GlobalDistObj); B+ |) b: @! f m. b2 U1 ]
if Row = -1 then -- since 70
6 L1 x6 y# U( @8 d: l/ d if lan=1 then
% H9 u: ~, M `, Y; Z5 ~" I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" T( j! G+ V2 u! O% \; x( B" u9 d to_str("in der Andockstation: \"",?.~.name,"\""));
+ W+ J% @ w& |9 t6 T else! U% P3 A' [7 I* v9 s* I, Q, O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; b E/ p# @/ ?) {4 [# h9 y) o! u to_str("in docking station: \"",?.~.name,"\"")); ; O! U- v; e) _
end;( J) M, [; g, R' }8 C! ^
else
# J0 u0 Q. g2 q" G* @ Z ~& ~ @.Destination := assignLObj[1,row];
' P0 R6 k& ^! W6 I end;
3 E( T8 I9 I+ ^/ g% j9 g$ d newDirection(@);
1 }6 B& d1 C. E& p8 m0 a' ? @.HasOrder := true;8 ]7 [' i& W$ D- e' V& _% I" B
end;
0 f5 ^+ T0 V* d3 C5 _ end;
" l. y2 ?$ n; _2 c' D3 bend; -- of the method; f- x c: O- ^
|