/* called by: entrance ctrl of the object 'track'
: Y' {4 i* c# B( k+ O*/
# O* f% T) M! H; q# \* Mis: W4 }, } I p+ l" O, q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" E. Z) K C( j' edo) Q9 \0 ?; J; A5 |8 t" p1 i
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ L* N$ p. @7 {9 N% ] if current = @.Destination -- else return
) s5 [+ `5 K. ] then5 m% S, G5 u$ y, X$ p6 {$ ^
@.Destination := void;7 K4 O. g" x- `9 C; _* n
if @.occupied then
' \, H% I- S5 c6 y: J+ }$ d part := @.cont;
# q* P$ G; M' [9 l+ \6 N @.transpOrder := void;
* e! i5 _. E5 E" j8 I0 K$ L' Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& {) v( X! d5 m/ R9 y% @
@,root.eventcontroller.simTime);
* T+ n# Q a$ J) z' X @.HasOrder := false;% u' G" m2 p6 e) q
@.DrivingHome := true;4 W3 E4 U- w3 E5 t5 d0 a" N' d
rgManager.tryToStartTransOrder;; a7 i6 p3 r8 [, v# i5 G; R! u- {
if @.Destination = void4 r% g1 N* t% g' P% z: _' ?# c
then -- no transport order for vehicle @
+ M& T1 ?( ~1 O; q$ D) ^ @.Destination :=
7 V) p c* e7 B rgManager.nearestFreeStation(@,track.~);
9 c0 i" \% {! {2 j& L* p newDirection(@);
0 ?* l, k0 y1 C& z if @.Destination /= void then
i+ d0 {. ^9 @* n( m# w+ E. c @.Destination.NumReservation :=# c9 r. V: e: s1 N$ V! g1 Z1 F/ q
@.Destination.NumReservation + 1;
# K0 j% @9 o# u/ Z end;, t% o3 f% {! \% f
@.CurrIcon := "drivingHome";; Y9 L. Z P& H, m
@.DrivingHome := true;
& f0 k" x5 r$ u& w* ^; C end;8 y, ]0 \+ Z. B- c8 w5 f8 }; D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Y1 r6 X; {3 V+ \3 G# m" i o9 ] part := @.transpOrder;+ i) y* f6 o$ p' M
part.move(@);-- load part5 N/ ]- J4 ?; V3 \
@.CurrIcon := "load";5 A8 r2 z; q1 k1 y/ ]7 |
GlobalDistObj := part.globDestination;" o5 Y7 h, J3 a' A0 |: @
assignLObj := rgmanager.rgAssignL;- X% ~: |% S" ]" o, |
row := assignLObj.getRowNo(GlobalDistObj);
+ e- v. b4 p% L% M& U. w if Row = -1 then -- since 70
- S t( x3 g, \& d) I% B if lan=1 then
8 M$ S/ X6 F4 i+ N4 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" c) D- ?* t/ `* M( q! Y- m5 Z to_str("in der Andockstation: \"",?.~.name,"\""));1 X/ t. L' t9 F: q
else
# r% A( g* k6 [! E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ G8 Y6 a9 Z+ m) v/ x
to_str("in docking station: \"",?.~.name,"\""));
+ }* `2 t1 N }' r3 T6 k/ D end;% c* P3 k4 c8 T# c" X) T) P: h
else
8 y& n2 e8 p4 |4 s% | @.Destination := assignLObj[1,row];2 L! w+ f6 u/ a; }; z& P" _9 I3 |
end;
, w- t' t9 r8 @/ O9 W newDirection(@);
! D+ x0 g6 w D/ \* x7 C9 m @.HasOrder := true;
4 z; f' s `* @$ K& j# J end;2 X( F, h1 ^1 S- P% P( F7 B
end;7 k' A, H5 C& g! T
end; -- of the method U; Q8 f+ q; c* X) Q" i* L) g
|