/* called by: entrance ctrl of the object 'track'+ A7 ^3 a- E' _5 W" {
*/* t6 Q4 V; p, _. c, h% H) g8 R
is
, V% p; W* E/ g2 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;, t; D4 v* T& o4 @7 E, B7 u+ k) f
do3 j5 D% \" n- Z0 ]! P
Lan := rootfolder.Internal.Tools.AOLlanguage;
* ^; [4 l9 |9 t' ~9 {* n- _ if current = @.Destination -- else return
! p E6 s, s0 K& L# R% v* _ then$ R7 u9 W6 T! H1 z0 j( A2 S; y
@.Destination := void; Y, |0 S' A; C- N( j# U
if @.occupied then
8 ~; R2 z' ^8 M' W part := @.cont;
2 m# M0 e/ V9 z2 F' W @.transpOrder := void;
& e5 f1 ^* ?9 W9 l }" z/ h' c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 ?# E6 T3 P4 r0 J7 m5 c @,root.eventcontroller.simTime);" }5 E" }# [/ ?" e
@.HasOrder := false;! o3 e5 l/ n0 k5 k
@.DrivingHome := true;
. u0 @2 P: e9 P0 a( _7 K rgManager.tryToStartTransOrder;
$ f. i) u) }* w9 ?, c1 ?+ ` if @.Destination = void
8 {4 X" `0 y& } then -- no transport order for vehicle @; p" I) e: T7 p) b4 G; D7 j' `% F
@.Destination :=9 Q0 W8 I" O* J. [. [1 O8 Z
rgManager.nearestFreeStation(@,track.~);: e8 A U/ E; s5 L/ l/ X& O# P
newDirection(@); & h' K. A4 t9 P* u& K
if @.Destination /= void then
/ J" Z4 N2 j$ A5 U# I) }! M @.Destination.NumReservation :=
, D6 q2 v+ X M1 w @.Destination.NumReservation + 1;
r. Y4 r1 D [& O# \) M end;, ~1 X2 @' ^! L! Q2 G; e0 M9 A
@.CurrIcon := "drivingHome";$ C8 l) G# F8 ^" ]
@.DrivingHome := true;! ]- y% {4 I+ R' H+ m7 J: `# [
end;
+ |1 P9 g6 V& H: M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' c9 ?- d* N1 |& p8 |6 a8 D* g V part := @.transpOrder;
( P( ^* F$ Z: }1 d! ? part.move(@);-- load part) v/ N& x. q0 Z
@.CurrIcon := "load";1 C6 N" k8 o' |; r) \: ]
GlobalDistObj := part.globDestination;
0 D4 d0 {8 S2 G# U assignLObj := rgmanager.rgAssignL;8 |: o/ p6 ~/ }3 G& K/ d
row := assignLObj.getRowNo(GlobalDistObj);
& L* k9 |. v. @, b0 A if Row = -1 then -- since 70
# _& U$ u; m' Z1 t. v! W4 G if lan=1 then: Y! o' g& k7 q# \. U" X: K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 w. @& W$ v, ?" C4 W to_str("in der Andockstation: \"",?.~.name,"\""));
$ S3 B e0 O" A2 |9 O else
2 s7 ?9 O$ G! z7 N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
u# }! {6 G2 N6 c1 a, a to_str("in docking station: \"",?.~.name,"\"")); * U5 W: H$ g, O. z
end;
5 A/ x! ]; a% A/ z9 D else" f% G7 }( j: n: P& o% X6 m
@.Destination := assignLObj[1,row];* s4 i8 k \8 o2 z9 A. K
end; # n. e! K6 _) ]
newDirection(@);0 ~! \5 ~7 ~4 J) |8 y
@.HasOrder := true;
# O' S2 a8 ?7 H end;; O2 n, K* O2 z
end;( O: M4 X {9 B+ A: Q! W
end; -- of the method; K/ u9 I3 T7 G# N; I
|