/* called by: entrance ctrl of the object 'track'
/ [( l, J/ S* O. F/ x6 Q*/, R% d ?" p# V' I; \7 ^& u3 j
is
8 D5 v. p3 q- u" l9 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- E$ a, b0 L: Rdo
D9 m# W& ?# s0 Y% c4 r9 G5 b Lan := rootfolder.Internal.Tools.AOLlanguage;7 {9 Z1 m7 i4 c- @
if current = @.Destination -- else return- f3 L9 w% \ ^4 a' W
then
- K2 A% E6 F* w1 f4 Z/ e @.Destination := void;
( U* c4 f) @2 q) x9 \ if @.occupied then" {* [$ P: g8 c0 M
part := @.cont;
$ ^: i3 x/ {3 s9 e! d @.transpOrder := void;8 B# I$ N8 ]; M/ k: P9 T# l M0 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ x, G; U8 l4 J8 g
@,root.eventcontroller.simTime);$ L8 Z, C8 J6 ]5 x% N! g
@.HasOrder := false;( n* X9 D4 E. f2 a8 e5 ]. \" L$ N7 W1 A
@.DrivingHome := true;
* y2 F1 c- Q( l rgManager.tryToStartTransOrder;/ }6 x) @0 G' g# y8 ^$ w
if @.Destination = void' K6 ]& N6 V9 {5 }0 X
then -- no transport order for vehicle @; S' T2 A+ u+ b. i# y+ t8 H
@.Destination :=6 e5 i$ j, k0 O+ D8 U; e
rgManager.nearestFreeStation(@,track.~);
" j! u# w) U5 v% q4 l8 E newDirection(@); ' H% E. G+ h v' e5 ? I5 b; j
if @.Destination /= void then4 E5 ~' R- _" M; M3 M8 R) h
@.Destination.NumReservation :=# Z: ?9 n7 |# u* r/ O
@.Destination.NumReservation + 1;
! q" d, H. Z, k* ]: A% c0 Q end;6 k- r# y/ `) I. |
@.CurrIcon := "drivingHome";
& m# ]8 ~0 y Y9 j' N3 {& ?4 c @.DrivingHome := true;# M9 T$ L+ `8 D6 l
end;
% B0 h v& |/ W1 D8 [1 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 i& h; [: u# H& V8 ^ W part := @.transpOrder;
9 g" ?% l5 I' M# n$ z part.move(@);-- load part9 g4 l/ ~- g8 _# W9 I+ @
@.CurrIcon := "load";
# Q" ?4 n! K" U; _5 Q( H O GlobalDistObj := part.globDestination;. @5 ]" G/ h9 J, V2 h; u
assignLObj := rgmanager.rgAssignL;
) u( f3 ~" b# O* F0 x row := assignLObj.getRowNo(GlobalDistObj);
. {3 L$ c9 E5 K" f8 x) {2 L if Row = -1 then -- since 70
: V! ?7 n8 E4 D# y3 ~ if lan=1 then
8 f! K+ N. I3 d8 [3 a. k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. E3 Q5 H! i! l) Q
to_str("in der Andockstation: \"",?.~.name,"\""));
+ q; o# B" X5 D else
0 @, q2 m, C) m% |& A g: m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 V1 G' a! N$ B: X to_str("in docking station: \"",?.~.name,"\"")); 9 R2 \/ F# s: T9 Y- u6 M' [
end;
1 w- A/ `8 X* ^ else
* @$ [# N. _, [& C: R4 x3 z @.Destination := assignLObj[1,row];
8 A3 ?" d. F) l+ R L Z end;
3 ?& i6 c; s5 @: G# @# q# _9 y) q newDirection(@);' B; A+ c3 F3 M) S& x
@.HasOrder := true;, L" q" C0 W" k7 A
end;
" ]' m) _2 G1 _% A, b* b end;$ T) {/ C# c& X
end; -- of the method
4 R. r! i, G- M. j7 f |