/* called by: entrance ctrl of the object 'track'( P% P1 ~! C) }+ ~' E1 u
*/7 o8 [. k4 \. C* a+ ?3 s- t
is
$ V3 N' @! A% Y* p; ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ^7 ]; s7 x, g" n4 h& V) Jdo
; c: {% r$ e1 l% N! B! r/ L3 B2 z Lan := rootfolder.Internal.Tools.AOLlanguage;! j$ k- i) w% a7 z& w6 Q7 A; K
if current = @.Destination -- else return! q! [1 u# C# R, Z' Q7 n2 _
then
; o7 o( U7 U# q @.Destination := void;3 x; w6 S, U7 d9 y( x
if @.occupied then
" K" N- _5 \( Z% _1 X0 C Q1 P' y% O part := @.cont;
7 a. g% H8 Z2 M& ~ @.transpOrder := void;
' w( E6 H. M8 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 t, ]# U5 }4 O" ]2 I
@,root.eventcontroller.simTime);0 S1 F& r0 F- I. \' A4 G
@.HasOrder := false;
, \1 D, H+ o9 @& @' C( A5 M @.DrivingHome := true;
. r( z" q4 g# t/ K0 v rgManager.tryToStartTransOrder;, D" W- E/ E9 e3 J7 |
if @.Destination = void W% K; o' y& j0 x8 z
then -- no transport order for vehicle @
+ L9 }2 W9 U* S- H5 G: S6 x @.Destination :=
9 b+ \3 K. W, d. O rgManager.nearestFreeStation(@,track.~);5 N8 {- \6 ]( _ |6 F
newDirection(@); 2 w6 O \9 b0 L9 r2 ]
if @.Destination /= void then
\/ Z: ~ v4 s @.Destination.NumReservation :=
$ D/ V! e' Y5 j @.Destination.NumReservation + 1;" [( r2 X# Z. ^6 D& H
end;" `, w- [+ D4 E1 [
@.CurrIcon := "drivingHome";
. \- z5 a. ?, C$ `& ? @.DrivingHome := true;/ H* U/ A0 I8 H4 [$ s
end;. O& {% L9 z9 O* ^# ?: [/ X/ k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 y1 Q& N9 A+ {! z* U4 T
part := @.transpOrder;' ]' Z0 w$ B% a' z2 Q- L
part.move(@);-- load part
" l9 l5 @ i/ ?! c4 z- c% W& n @.CurrIcon := "load";
! X$ n- T& N' A) s3 h2 n! b* J) j GlobalDistObj := part.globDestination;$ i% w- S5 K/ L+ z, Q- J
assignLObj := rgmanager.rgAssignL;/ n4 P- m2 X- z4 r* H
row := assignLObj.getRowNo(GlobalDistObj);
1 Y* Z6 \4 F0 E: T) t/ p if Row = -1 then -- since 70
9 z! r2 J* M4 r0 w3 e" L( y if lan=1 then
( ~; w0 M2 W$ T2 M* T6 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* a; \- P8 f _+ g to_str("in der Andockstation: \"",?.~.name,"\""));/ O- P- y: p7 ]
else& A6 U* T- y9 ^# \4 s- Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 L+ w' Z' n2 I. N- Z' k to_str("in docking station: \"",?.~.name,"\"")); * G3 [0 [, Y0 u4 t
end;2 w' {; S' G* s
else q; G3 ~' Y, C% E7 {
@.Destination := assignLObj[1,row];3 c9 _- ?% I! ?
end;
+ U# \0 m9 u' F& R& R8 o3 w newDirection(@);
7 q6 R+ Z: x# ?6 G9 C0 [- ?/ ? @.HasOrder := true;& P0 ]% V- B( C
end;# _7 Z% J4 G, R: J
end;
, z; [+ R5 | [end; -- of the method# l1 r" H' h. u7 ?* d
|