/* called by: entrance ctrl of the object 'track'4 n& Q( ^- D& f0 p: o) N
*/
& w1 t" ?& W4 _6 X' lis3 x, h8 X. {8 e0 `) a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) n& u. H9 D, N0 g
do5 m7 W$ Z3 I1 s6 l; |( I
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 z9 |' [: N! |5 m1 q if current = @.Destination -- else return
' Q% o# u" \, I: Y9 l. a. k then
$ D. M% ~- V6 W! { @.Destination := void;
. M: }7 `7 L* x# z% @; w. U if @.occupied then0 C2 |2 X$ Y5 r8 d* `$ \
part := @.cont;3 X' J% q) J* n1 \8 O
@.transpOrder := void;) W" O, T6 v& C4 J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( C2 B) [3 q# F% Y4 r) r L+ e9 y @,root.eventcontroller.simTime);
8 b) |7 N |( C2 b0 X- v @.HasOrder := false;/ _+ t! W/ M# S) F
@.DrivingHome := true;
6 d7 X. R* ]* ^# ? rgManager.tryToStartTransOrder;
$ J4 X0 x" v2 [0 W if @.Destination = void
( q8 B* ~! r1 j* l8 o5 k1 @( o: L then -- no transport order for vehicle @
* A1 @- g8 U" F, L4 A @.Destination := h! K7 d; q2 F6 g8 g9 b. w) o
rgManager.nearestFreeStation(@,track.~);1 h& b& ^) h: o$ Z. b) N
newDirection(@); 6 A# h) O7 r3 Q% i6 W, B
if @.Destination /= void then
: ]) j2 f- G& a* E @.Destination.NumReservation :=
, _2 L; o# t5 [9 { @.Destination.NumReservation + 1;, R9 A' F, B( K' s
end;8 |! O/ N' ?2 E B( D# ^4 x
@.CurrIcon := "drivingHome";: o7 v& Q2 e6 n% B$ w6 i w+ {# P
@.DrivingHome := true;, y% A% V3 `! y- r1 J* l) b
end;
2 L6 P; p) \2 x2 E8 S: O else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 i- f. ]. q+ p
part := @.transpOrder;
/ s5 W# e: g; I5 [; b- o part.move(@);-- load part
3 K/ [7 W1 `1 M* S [ @.CurrIcon := "load";
/ A) D+ c4 Y6 W7 z) A8 o/ ^ GlobalDistObj := part.globDestination;0 v' \$ l. J/ P( \5 }' J& B
assignLObj := rgmanager.rgAssignL;9 k1 J& E/ [0 C% b$ U6 Z/ A
row := assignLObj.getRowNo(GlobalDistObj);% S: p3 P8 [2 ]/ d' P7 j
if Row = -1 then -- since 70
3 g( ]. q! _/ e. b% U if lan=1 then
+ s! k- p4 z, k w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# ?: E# q% Q/ E; O4 M" G+ v
to_str("in der Andockstation: \"",?.~.name,"\""));
+ C0 W, N: Z* o' o! x! ^9 T else
7 @1 N% H5 U5 I/ x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 X4 V, e1 y* A4 Q
to_str("in docking station: \"",?.~.name,"\"")); 1 B5 a' Q% u4 D$ u# v
end; C7 l" f. N" x" p: ]
else. t% P, @2 Y0 m
@.Destination := assignLObj[1,row];
; M, J5 c; |5 \# c) s end;
# n# @) |# e1 D+ t newDirection(@);0 x+ L+ c& W, x# {- C7 K# @) C
@.HasOrder := true;
: D8 a# G5 E F H, C$ q: Y end;
! E' Y, _! R6 s- M% ^7 I end;+ h( V- G& M, K7 j' V& p, T
end; -- of the method
0 c/ B9 a# \8 H2 a |