/* called by: entrance ctrl of the object 'track'
5 \2 ?( u+ F- P; }7 c*/
K( t; F0 i$ L/ _is
) ? }7 W6 \0 K! j( ]* U% x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 Q' c5 w) M- U+ m% ], N+ Fdo
9 R8 A! i7 W2 B5 T( p Lan := rootfolder.Internal.Tools.AOLlanguage;
# X' N8 ^8 F& I* Z if current = @.Destination -- else return( x4 y, {1 x1 O a9 z6 _
then# W! {) g$ \$ q1 {! Z
@.Destination := void;3 B6 z2 O8 c {
if @.occupied then
5 V2 C+ I0 z9 U. A3 R0 G# d- [ part := @.cont;
' X6 ?2 ~% N8 v. ?" @, [" j' g @.transpOrder := void;1 D* Z9 p8 j! }! j7 v7 R) K- Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 G! ^) j' o7 M
@,root.eventcontroller.simTime);
2 C5 g) ~- d9 K3 f1 v2 o% K0 u @.HasOrder := false;' O; v, z5 O8 I; T I' S
@.DrivingHome := true;$ |4 g( D+ ^7 S; U* }9 r
rgManager.tryToStartTransOrder;0 \% I! Z3 a3 _) N! C. H5 q
if @.Destination = void% N. u% }" p' q0 d# y
then -- no transport order for vehicle @
& z% Z' A3 _3 F9 x2 x: b @.Destination :=
$ Q8 d" Z2 p5 i" f% ]; L rgManager.nearestFreeStation(@,track.~);
* A! t. x: l, I% q+ Z newDirection(@);
* f" w; V) _- F) @. h if @.Destination /= void then
; B# v' b) E' [4 G @.Destination.NumReservation :=
# [1 D) r" g/ |5 r @.Destination.NumReservation + 1;- y3 I# m1 G" w/ }4 t- }( I
end;$ K: h$ l1 a" j: |1 Q. k' o
@.CurrIcon := "drivingHome";
7 B% M3 l7 Q$ \6 T: k! k @.DrivingHome := true;
9 J" u) q* e! D, a d4 u. a end;$ L: ?" w6 Z4 X3 G/ `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* V% Y1 @& h8 S; w part := @.transpOrder;3 k8 I4 V4 I! D, B. F' |6 b
part.move(@);-- load part* J1 P" {* w. d- B3 l# Q' L5 `
@.CurrIcon := "load";" k: k) A7 \; T0 C: }7 f
GlobalDistObj := part.globDestination;7 I3 S( _: }6 Q3 ~
assignLObj := rgmanager.rgAssignL;) \" c, n0 v/ U+ x
row := assignLObj.getRowNo(GlobalDistObj);
+ N" E4 e5 l; p, x5 ?" x if Row = -1 then -- since 70
5 c- Z% K. j9 y7 L) V if lan=1 then6 m6 [8 O6 g2 u/ X, `6 k- @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: p4 x8 L8 Y1 w5 a& V( h to_str("in der Andockstation: \"",?.~.name,"\""));2 z$ _( M, _3 p) I5 V$ p1 I
else5 W: X) y0 {% H5 s" i- X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ c: U7 a' d5 d2 n2 t to_str("in docking station: \"",?.~.name,"\"")); 8 M; ~) t9 o% W7 z5 G% q
end;
% F4 t5 O# g2 r2 w else( X: I4 Q# c" N+ g# F% K3 b
@.Destination := assignLObj[1,row];! ~& [9 A5 ~3 e. f5 [
end;
5 D3 W' ~4 p& Z* r; ?0 m newDirection(@);1 ?$ O; R% ~' M6 A/ S
@.HasOrder := true;
7 V0 R3 p+ J H) r8 G' }! z end;/ T1 c+ D% w3 y+ f3 V
end;# ^ x: E, R% w/ U) V C' ^+ Y2 h
end; -- of the method9 m8 z# C+ V4 \- z, [3 b
|