/* called by: entrance ctrl of the object 'track'
) ~. K. b9 Q# a6 _7 d*/
# a4 v4 C/ o# l: ] {is
, f, Q4 c- s. Z) t/ S- s( n4 A2 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ o4 J4 V+ f; b+ n) s/ m" U# Zdo
0 e# n! S/ Y/ t& U8 U& g: d Lan := rootfolder.Internal.Tools.AOLlanguage;0 T' }# r8 l8 \# [6 W. {2 }7 O& |
if current = @.Destination -- else return. b5 v6 \% E' J
then6 j' \; f: R- h( E, z, {, |
@.Destination := void;8 J: W# _3 ]; r" t* w( Q0 X- S
if @.occupied then2 L3 F3 ^1 y2 K% m
part := @.cont;$ B; y4 N2 R% u$ u
@.transpOrder := void;1 z, L' G& t0 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' A* z% c; z$ d/ S, _# Z8 V* J) S
@,root.eventcontroller.simTime);
5 u, u- N; `/ J5 W @.HasOrder := false;. D- {2 x" \( k% N2 {1 Y( k
@.DrivingHome := true;
% w6 _5 T9 {: ~( P- }& z+ U rgManager.tryToStartTransOrder;
: o# s. g! g: K if @.Destination = void
3 T) J/ c7 |6 Z' h then -- no transport order for vehicle @5 {0 ]5 \* [+ @/ N. o- g
@.Destination :=( E/ A" G4 M F1 x. k5 w& h# U
rgManager.nearestFreeStation(@,track.~);
$ K: Q: U% C1 ]0 Z% f newDirection(@); $ \. B/ U c0 S! g) Y
if @.Destination /= void then
* F$ }2 U5 j4 I3 U) A- Q @.Destination.NumReservation :=
; _# C& B- J' D) r4 N1 v D @.Destination.NumReservation + 1;; x7 Y7 M% @: x& V7 Z' P% p
end;& ^( n3 z' V' a9 s7 {( f6 I
@.CurrIcon := "drivingHome";' R W* \4 v- d' Y6 a6 A* ]. `
@.DrivingHome := true;
0 z( i+ m3 s: L# ]+ R& k8 F end;
" p% v" J# w! w: i' ^8 m S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# y e) ?# ?: Z3 e9 \ part := @.transpOrder;
8 F; j3 R7 z) P# s part.move(@);-- load part6 a7 N" ~, F6 Q% ^
@.CurrIcon := "load";
: M! p5 E! ?5 ]6 ` GlobalDistObj := part.globDestination;1 t2 @; ]% T* }0 a
assignLObj := rgmanager.rgAssignL;
8 j8 ]" }2 k" q row := assignLObj.getRowNo(GlobalDistObj);
! I" {3 R1 K, n" e% ^) v if Row = -1 then -- since 70( k. q9 L9 q& h8 V$ x( \
if lan=1 then3 Y$ h; m) L9 r3 Z1 d4 M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Y6 E. }6 U) s5 M8 h
to_str("in der Andockstation: \"",?.~.name,"\""));
/ L5 l1 o5 t6 F+ c% {7 Q' Z% k else5 B' F. x* x( h/ i- j& R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
i* ^9 L. E8 v* Q to_str("in docking station: \"",?.~.name,"\""));
I l: C3 F5 | end;
: }# m: r6 f) v* X else
5 P R- f8 I) H. V @.Destination := assignLObj[1,row];
* f5 H# P# z4 w; Q B: ~ end; 8 ~+ `+ ~% n$ T4 Q5 J* l# L
newDirection(@);
/ f0 I P3 i4 n& T @.HasOrder := true;
" V0 M* Q1 O$ w0 F0 k: q end;# J& @5 }; L% l7 L) W; [- H
end;
& k6 t" w6 d9 |2 gend; -- of the method
4 h' A' Y; I) W" i O3 j( \( u |