/* called by: entrance ctrl of the object 'track', ]' f! g* e; T N. N+ o
*/
& V/ e* Y: w5 @0 `( x1 u& D! @, gis
. ]/ o) u/ G! {# w' F part, GlobalDistObj, assignLObj:object;row,Lan:integer; ~* I+ A! @: K3 Y& p/ g
do9 J" `5 t) b5 R, f0 V. c
Lan := rootfolder.Internal.Tools.AOLlanguage;
. _, c# E$ ^$ E* v0 u' v if current = @.Destination -- else return: d8 p" B% o& U! X
then, b' C1 `& K1 m/ c+ r: d; e, ]
@.Destination := void;
- H8 h9 V5 A6 [ if @.occupied then
3 B0 |2 m% S' I* _+ d# S part := @.cont;
5 m" U* ^$ G# V7 a, V2 N9 u @.transpOrder := void;: ]2 C5 _6 o# I4 p- m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& t' i1 [) E5 _- n- ~8 o& `
@,root.eventcontroller.simTime);$ C, Y- ^( t; w# |6 g
@.HasOrder := false;" B S4 P4 v' M" \
@.DrivingHome := true;1 a# L3 [/ B. @3 c1 Q: H) S
rgManager.tryToStartTransOrder;5 f1 r1 \$ o5 n* v3 v% v
if @.Destination = void
7 u; B* ^8 Z9 [9 o, j4 V% [, V9 W then -- no transport order for vehicle @& k! Y5 d) e! q% z2 r( ~
@.Destination :=
! U! r) k+ S. W rgManager.nearestFreeStation(@,track.~);
( l, h* w3 ~( z newDirection(@); " i/ D" d" z4 t+ r3 v+ V! J
if @.Destination /= void then
& x4 _6 w. a9 |0 x# ^8 e; E! u4 U @.Destination.NumReservation :=
; F8 T; I. l, y* j; r+ D. n @.Destination.NumReservation + 1;
w# \& a M9 s7 X- @ end;$ G) q3 Y0 R* z* F! Y F, }5 A
@.CurrIcon := "drivingHome";
2 ?$ T5 g- G3 Z0 h5 N3 \ @.DrivingHome := true;
9 t9 W, o p; G7 {/ c; l end;
2 ^+ n; J W" d6 y. \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ ~9 s/ k( [4 ~( P* X! j4 B
part := @.transpOrder;
+ p) z) p" [. G: ]1 \9 o2 n6 P+ _) C part.move(@);-- load part4 Y% f+ U* {* Z, [% H3 i9 a
@.CurrIcon := "load";. S- W k+ V2 @& u, u
GlobalDistObj := part.globDestination;8 [. I: A+ o8 E5 L* ? W
assignLObj := rgmanager.rgAssignL;
, x' u" X% d8 O+ q$ O row := assignLObj.getRowNo(GlobalDistObj);
8 l: r0 T+ m5 q5 P" {$ t5 ?( E if Row = -1 then -- since 70& N T7 }& r0 @- r
if lan=1 then
$ {3 O! {" r* |( Q& ]! k" v: @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* ~& ~) u& ` }
to_str("in der Andockstation: \"",?.~.name,"\""));
3 |3 I$ l3 \- ?& s. h* t) Y5 k+ L else) c, n7 K+ D* Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* ?/ F2 x Q+ U5 h* p' \! F( ~2 q+ \
to_str("in docking station: \"",?.~.name,"\""));
' L1 D$ j' v$ B end;
/ R3 z- H8 p$ ~& \ else3 y) U" M: ?8 U9 T J9 V
@.Destination := assignLObj[1,row];+ ~! S5 l" V5 d" U2 h) P# O+ G) n
end;
/ |" A8 u4 p2 l newDirection(@);
8 o; N6 Q5 p. {# }0 A; a2 }$ N9 H: n2 {. M @.HasOrder := true;
5 F2 b/ F, A1 ]8 e! K* z end;
, ?* X+ l" O. O- D4 ^ end;
! n. }" a7 E3 E+ @. e+ Send; -- of the method
9 U9 U. y% R9 A7 | |