/* called by: entrance ctrl of the object 'track'
# P, {$ y1 @" O2 o- i T*/, \+ F' h7 F3 X" H0 `" Y2 Z
is* r, a0 {) k9 s3 f/ H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. e9 w5 O8 c1 kdo' y9 g: ~9 P: J, m2 B/ v9 D
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 P9 Y$ l* a* k8 v4 J) i if current = @.Destination -- else return
; ?# z( Z1 f: Q' | then+ B: x* g6 R7 M( V6 F3 f
@.Destination := void;
. j/ _3 s: b8 U$ i if @.occupied then! `9 U& n: ?+ ]3 Q$ w4 @
part := @.cont;7 \2 ]+ V" U) Q9 q' q
@.transpOrder := void;
9 \% a4 E: P5 T6 \' i6 g/ W+ k0 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 s' H+ E4 ]9 M4 b; d9 p- k5 U. n
@,root.eventcontroller.simTime);3 v/ s7 K) R4 X* ^% h9 r
@.HasOrder := false;
6 t, z2 V9 R" |/ O) s1 J @.DrivingHome := true;
! Y3 h( I2 s* l) X rgManager.tryToStartTransOrder;
! Q; Z! I9 i7 ^$ L; Y if @.Destination = void
1 z6 S5 [. u3 w' w then -- no transport order for vehicle @
# a' m2 h. r6 w @.Destination :=
9 _& [' @5 w: x& o0 F8 X rgManager.nearestFreeStation(@,track.~);# A- h; c$ x R( T* z2 k
newDirection(@);
+ r* E6 d% h4 ?/ t1 P; w5 W if @.Destination /= void then
' s7 L! U, O% H1 _, [+ q @.Destination.NumReservation :=
& K" v9 {7 a1 N7 j. Y3 o @.Destination.NumReservation + 1;6 {) x% d9 H/ }, Q& F& a& p
end;; ^1 |1 z8 @* n. ^' j
@.CurrIcon := "drivingHome";+ w* B; w% J9 b7 k
@.DrivingHome := true;
- d: i2 e- [, g9 f$ i' l% Z& O( I6 v6 w6 b% \ end;9 F: V* b& A t h6 j9 t! v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# Q- _5 J4 S' _9 q3 J part := @.transpOrder;3 N/ s, v* s1 w9 h& c8 ~) k4 q, n. f
part.move(@);-- load part
, u2 M' b% B5 {# W- f @.CurrIcon := "load";
* F0 s \- w4 H F5 m; S% W GlobalDistObj := part.globDestination;% Z0 u. o+ s& k3 Y5 f3 B5 b2 Y
assignLObj := rgmanager.rgAssignL;
. D7 h: ?1 L0 N; \6 C2 t+ q! r, E row := assignLObj.getRowNo(GlobalDistObj);
1 a$ z. W" \9 Z5 q- C if Row = -1 then -- since 70' n6 J1 a f a2 u
if lan=1 then
" c/ H* h3 o4 n( C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( ~6 W% r x7 K' r
to_str("in der Andockstation: \"",?.~.name,"\""));1 S; o5 [9 |" V. c: r
else
# U( m# R. f6 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 E2 x: w1 |& ?2 D3 k- V8 P2 |
to_str("in docking station: \"",?.~.name,"\""));
4 D6 i h* d# l5 B% E! k end;- I* J) f; W! U+ q2 }
else5 x; C; Z3 u) M- L$ d0 F: p/ S
@.Destination := assignLObj[1,row];5 H9 x8 H) L( J# M% k0 Y
end;
; I& a" C! B# Z newDirection(@);$ @9 b9 S, |6 d6 n" A- |( y( h
@.HasOrder := true;4 r% n1 g+ p7 w/ x/ n
end;$ T3 r6 B0 |9 R9 q: M
end;
8 o: ?( O8 k8 V8 pend; -- of the method
; J- d7 }' o+ k2 Z9 p- {# l, z% q* o |