/* called by: entrance ctrl of the object 'track'
' [7 w6 L/ G u1 P*/1 g4 K: F4 \; [% s/ N
is
2 z1 t3 W; J* \- l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; k+ {. u( c, }9 s A- hdo
/ [1 F5 B- g# {! o Lan := rootfolder.Internal.Tools.AOLlanguage;
& a: `- W2 `4 V+ C if current = @.Destination -- else return
9 p8 b$ V: J( h) e then
1 s$ u, z4 {7 q: }4 A @.Destination := void;; i( I$ P; l h# Z. [9 i$ T! O5 p
if @.occupied then# F- v+ @7 D( ~! K" P6 o
part := @.cont;
: a; F0 H1 j T( w @.transpOrder := void;/ x& G; Q6 R' ~" r' X5 \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 Q. O; d- g: q) V/ f7 k8 d f1 ] @,root.eventcontroller.simTime);
% D2 b8 X# L4 A6 l7 P6 ^ @.HasOrder := false;* @! [. T5 E8 j5 g
@.DrivingHome := true;% }3 Z1 t2 v# j4 k+ L W
rgManager.tryToStartTransOrder;
6 H0 E& e* J6 ?/ k7 x) x if @.Destination = void; k) B9 Q) P7 A' c2 h& U
then -- no transport order for vehicle @$ K4 P$ Z8 g$ E) E% v7 z5 |: Z$ T( E
@.Destination :=9 ?. Z% Q( k( U: X) p6 X
rgManager.nearestFreeStation(@,track.~);$ `; h# Q- q& W4 m% b( s. k# ]2 r
newDirection(@); ; \5 G/ B7 W& `8 L
if @.Destination /= void then
4 r* s" M9 b- z; f- P; ? @.Destination.NumReservation :=
0 I% ]9 o( e1 |4 X @.Destination.NumReservation + 1;& Q! @% ~9 s( ~0 W1 Z# i
end;) {# {) S# T3 A
@.CurrIcon := "drivingHome";
: ~- ^ ]- m7 x q& u$ v @.DrivingHome := true;5 S4 N6 d5 Y9 f: ^9 s
end;
' X! E9 x/ W5 K5 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 F$ q* { S: T# r+ Q% v# T# D part := @.transpOrder;
6 s: y" l; f7 ]" [: `! F* M part.move(@);-- load part: c* j s4 A) N/ \. h# G& n) d8 m# K
@.CurrIcon := "load";, x% A- T4 X6 t$ p9 u3 B
GlobalDistObj := part.globDestination;
; h3 [ x1 }% }. K M+ v5 K+ K7 [ assignLObj := rgmanager.rgAssignL;: n& g4 @# @! u p
row := assignLObj.getRowNo(GlobalDistObj);1 y& w" {! S' ]6 l
if Row = -1 then -- since 70
, ?6 H; J: R$ W if lan=1 then
3 _/ m- v0 i3 q1 p4 |0 C2 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# l; j, }: F; `% h5 g
to_str("in der Andockstation: \"",?.~.name,"\"")); `% `& O2 z$ d% l$ {; ^6 ~, f1 Y
else
! |8 D+ c, K- [8 d: Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: i! M3 `1 p! I5 M9 ?' |% E to_str("in docking station: \"",?.~.name,"\"")); ( W+ D+ J/ O3 l1 ]6 I2 q+ N7 o
end;
# q+ J2 T7 k/ D5 q5 O else
9 E, w" f6 I5 w @.Destination := assignLObj[1,row];- }; W) n4 Z- _1 z. q4 ?
end;
6 V, l: u& Z: H4 M( s% n' ] newDirection(@);
% E6 A$ N( W$ U- [% D6 C @.HasOrder := true;0 l: o% h/ h* \
end;3 J1 e6 K1 A& A( U! C, I1 v
end;
! J% }8 R9 l8 ?end; -- of the method2 m( \+ n+ H1 w4 K. i
|