/* called by: entrance ctrl of the object 'track'# x$ g9 M! z( S( |2 ^7 W3 ~
*/
& l+ O, N# }8 R: [is
( a. ?& H1 g, B+ i9 T9 D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" Z2 Y | _9 Fdo( u1 J, d) E- Q% ^ u
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 x1 A8 t3 O* J if current = @.Destination -- else return
# k! e" C* Z& ~# H then
9 t* G8 X$ z, L" U# ]* U+ ? @.Destination := void;
. Y+ E& b/ t7 }; ^) f$ K+ T if @.occupied then% ~7 Q8 B$ M/ ?/ r+ O/ ~+ T: w
part := @.cont;7 p9 x1 ~% F& \+ y6 E- C5 a
@.transpOrder := void;
/ n) K* l+ T2 e( }" y* b7 I6 } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 i/ w! G% S2 C. [ @,root.eventcontroller.simTime);' C* V' ]3 H; X2 h
@.HasOrder := false;4 y9 Q1 k! a, c) x" d' @5 y8 l
@.DrivingHome := true;+ A* f) _# _ K' m6 f4 b
rgManager.tryToStartTransOrder;2 B1 ^" X8 K2 [- Z0 s# P+ ]
if @.Destination = void
6 L" ]- w# R4 h3 t3 A then -- no transport order for vehicle @
$ B! j. K7 u& v& y* y9 u' Q @.Destination :=
0 h+ \! d# h: k% Y& Y$ U rgManager.nearestFreeStation(@,track.~);
! C$ Z0 I: u) V% x% K) ~$ b5 L. k newDirection(@); ! o2 V, i! |9 ]- y) c/ ?
if @.Destination /= void then
) d6 K0 S' m( a @.Destination.NumReservation :=6 w: P- o- D5 N
@.Destination.NumReservation + 1;, z; F% Y' A" T; `- H4 Q7 r% |
end;
. j5 z8 m( Y( [ I: H3 | @.CurrIcon := "drivingHome";9 h3 i D8 |% ^' E9 I
@.DrivingHome := true;0 E" h5 W5 c: b, \* Z1 N \
end;
+ s7 }# K( J' k; I# d) ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; W4 G- x E( o3 { part := @.transpOrder;
; @. d( a4 T' F9 g# S' o/ \" N2 i part.move(@);-- load part! Z$ R( J+ }, _. q' E ^6 R' g+ m
@.CurrIcon := "load";# N; y; N! z; c6 Y! [
GlobalDistObj := part.globDestination;- `* F8 U0 D0 m; U5 E
assignLObj := rgmanager.rgAssignL;
9 j* X5 J9 m# F& c7 m' X) g row := assignLObj.getRowNo(GlobalDistObj);" F2 r& @9 }" A# {3 ?) q! a
if Row = -1 then -- since 707 z5 i! h' f# ^% X
if lan=1 then
. @$ |( P6 [" h7 Y* f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ ]4 E- A8 I, H
to_str("in der Andockstation: \"",?.~.name,"\""));
7 y8 D5 u0 U' P4 @4 V+ c6 R else
9 a" S. `$ }1 y5 a- B# ^; Y# ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ]& z5 j1 T6 P, a$ }; C/ M: \0 M
to_str("in docking station: \"",?.~.name,"\""));
% T X2 v: c3 A+ \ end;) ?4 V# Q7 D+ o0 v( ^4 D% k' b0 x z
else) C- n6 t% e* h( c e! n" I
@.Destination := assignLObj[1,row];
" x8 }2 C$ k; N end;
0 Z( h7 h' u: ~/ U/ E newDirection(@);
; K) }' k: m! n& Q. X9 k @.HasOrder := true;' _( i) d B9 A8 N3 d
end;0 l( i7 l* J" B5 J; Q, x
end;
; I! h# ^1 N5 b# M4 A' v& aend; -- of the method/ L2 p t( N! r3 K0 f7 c7 W
|