/* called by: entrance ctrl of the object 'track'$ K H( [6 L* R u! [* C
*/
% `- Y8 y. h4 \, k# t% {2 dis
2 p$ q, K: \( M part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 J7 i. v' S2 s0 i m
do
) i4 ~+ \5 c) E Lan := rootfolder.Internal.Tools.AOLlanguage;; |$ ?- n) o1 R8 C: U/ \
if current = @.Destination -- else return9 o& k+ e% L. r; j( b
then
+ H9 I1 _( n( N, g @.Destination := void;0 s4 {1 x# l% R
if @.occupied then+ ^, O4 J" X9 z# O* F) e
part := @.cont;
6 w" p( I2 [( }# s4 `, s n; c @.transpOrder := void;, Q( K! P+ D: c' G3 z2 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ i% ^2 Q! d9 c. m @,root.eventcontroller.simTime);. t7 Q5 f2 l% [1 d ]' _
@.HasOrder := false;
x# n- s$ H$ @! i, t @.DrivingHome := true;$ @* }2 N' X% g3 S
rgManager.tryToStartTransOrder;' s# e) V% @) V* C; b9 Q
if @.Destination = void
% B7 e4 u$ }3 T4 ^0 u then -- no transport order for vehicle @
2 R0 V, r7 e Q: m @.Destination :=
, N7 X$ O- m" z3 z rgManager.nearestFreeStation(@,track.~);7 n- K: B2 A \1 V! {! B
newDirection(@); # d9 N, E: @9 F
if @.Destination /= void then+ k* b; ? e3 _( S4 C& _% r. t/ M
@.Destination.NumReservation :=
/ s R+ J& J7 u, r& F& h3 y @.Destination.NumReservation + 1;% e l/ ~5 z* g9 h+ \
end;
% c# _- A8 t+ v6 k @.CurrIcon := "drivingHome";* M* `8 T0 f7 ?' K
@.DrivingHome := true;) t' T, X1 q+ d
end;
2 {2 q6 L Z. X' L$ w: J0 n% I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" [8 Q; ^3 N. e* J0 z: m; n part := @.transpOrder;
1 \) h( N2 l; S) h8 R# r part.move(@);-- load part$ Q& T& q% Q0 w: z$ S4 T2 M
@.CurrIcon := "load";; M: T0 b5 o. f9 |
GlobalDistObj := part.globDestination;' F! _: J- z ^ z; \+ r$ e& f
assignLObj := rgmanager.rgAssignL;
5 [) J/ O# g' n row := assignLObj.getRowNo(GlobalDistObj);
4 j% H% Z1 g$ ?( }3 @" x- T! `/ o if Row = -1 then -- since 70( r* U, J% \+ [& k8 _8 Z
if lan=1 then
8 u# o/ d0 [, W: L5 q- { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' y& K/ ?' @5 [( o to_str("in der Andockstation: \"",?.~.name,"\""));- [. D$ s/ I0 s: q
else
/ a8 i3 A! K7 n8 C4 S, Y3 H- | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' d* m+ P4 N# A3 F4 ^+ {
to_str("in docking station: \"",?.~.name,"\"")); # t4 J# x( Y' o" d
end;
; i; m: A, j+ E h g1 x else
) Q" J, y, L! z" f# T @.Destination := assignLObj[1,row];) Q* L) a- }( p
end;
( L1 K) X$ y5 ]+ N, ^ newDirection(@);
1 ?/ r, }3 h! p3 U: ` @.HasOrder := true;' _7 |2 O8 a9 q* P
end;% U2 @- t2 E" z. j
end;* [) h! Y2 V; S/ Y L8 B- m
end; -- of the method% @; G6 L% i/ O+ K8 g
|