/* called by: entrance ctrl of the object 'track'& L* M" m! |# o) n4 f8 h! Z2 [
*/
D% D9 ?* R- U, N/ l" k7 _* Wis
3 d$ ~* H3 L6 R. A9 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
i( Q8 l! w' a& J- E9 Vdo# T' X) D% m' c- Q- H, V, [7 B
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ S" v, E n$ b$ W+ a' F7 x& e9 \ if current = @.Destination -- else return3 T' N' Y% O0 ?# {
then/ T: j4 j6 `& E( i* p& r! C) q
@.Destination := void;
+ ` j! n8 w1 e if @.occupied then9 e# y6 ?/ c# y5 m
part := @.cont;% R- w* X$ C4 @! m9 _3 o
@.transpOrder := void;
+ w2 ~, [3 l, Z, N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 v! v+ y- s @3 N/ l1 L. \
@,root.eventcontroller.simTime);/ ~1 s% ~% s/ m9 W
@.HasOrder := false;
5 a% L2 j( h; [# Y# ^" T1 _1 r @.DrivingHome := true;
# P: t2 u. f4 N: c! T rgManager.tryToStartTransOrder;
# a0 E) p. [1 x7 U2 c0 J: t R1 K if @.Destination = void: D' d/ h! E8 ]2 d2 r
then -- no transport order for vehicle @: j3 V! ^& }) h
@.Destination :=
1 X) x3 C o- E2 r. _; f rgManager.nearestFreeStation(@,track.~);
3 G3 S7 R0 T6 X c4 @ newDirection(@); ) \/ G0 Q' d; A) q) r
if @.Destination /= void then
; _& p9 @- e( d6 A5 C' b @.Destination.NumReservation :=
1 v) J# \+ ~: w! a @.Destination.NumReservation + 1;$ r% I3 W4 L# V X( O
end;
* L% }$ ^/ v& X6 K$ S @.CurrIcon := "drivingHome";
' s* d6 ?8 Z% @# `4 R) [! V @.DrivingHome := true;
* z C' ~& g4 C+ Q" N( ?- H- w2 F end;5 N. C9 a8 X2 z& I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- b( H0 \ W- c& p# O- J
part := @.transpOrder;
" G- k6 d% @' U3 Y8 S* u part.move(@);-- load part
1 @6 r; n% R# {- h0 I @.CurrIcon := "load";
2 n# r1 x' E) L3 d: w GlobalDistObj := part.globDestination;, g+ m1 v( J c# L( e* o
assignLObj := rgmanager.rgAssignL;
4 ~( I! |2 Z& T row := assignLObj.getRowNo(GlobalDistObj);$ @( I4 G9 @ y2 P7 A& p. c M
if Row = -1 then -- since 70
8 Y) T: R. {! c# g% y! `+ ^ b if lan=1 then
9 y% U x4 S9 ]0 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% k- U8 L" C+ a7 {# b
to_str("in der Andockstation: \"",?.~.name,"\""));
) U& o. X. d5 p* `, Z: R else
; ` J5 ]3 }% G7 A6 |2 V7 q# _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 U) o$ W$ I6 O; |9 p h" U
to_str("in docking station: \"",?.~.name,"\"")); ' y1 j. U$ j: z( q% X1 ^$ j5 ?* z
end;1 _/ }/ s" T& l: J4 U
else
9 K& [! w: m9 U) W4 r- h( e2 o2 y, w) X @.Destination := assignLObj[1,row];( E0 h, k5 M! D) ^4 Z
end; / J- x/ G7 _) @0 m3 b% q
newDirection(@);7 U9 y+ l F- g* K/ ]
@.HasOrder := true;& a/ K, G8 H5 c/ l& W, u
end;$ [1 X, p) U7 ], t
end;
3 \" |' u7 l# Q! C$ d0 Y: |end; -- of the method
0 D8 o% {8 d# C$ D |