/* called by: entrance ctrl of the object 'track'
3 g- T% h" s) \1 A5 O( h*/% R1 Z) l1 t. G
is u4 R9 x" ]0 c; q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! }" g) m9 d% i# g4 ^3 U9 w
do. J' l1 ?/ K+ b p4 \+ P- m
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ z" T3 s% l* f2 f$ A8 H if current = @.Destination -- else return4 k% K$ G+ _9 t: d
then
. |5 }& D# N, E @.Destination := void;
1 O. N2 k4 ~2 i. u4 h if @.occupied then6 C! O2 R2 |+ p1 e, f
part := @.cont;
5 b% c; X5 o2 U @.transpOrder := void;" e* D, D# h$ U* r3 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
B0 {8 r! g" ?, v/ j @,root.eventcontroller.simTime);( E. \. @5 W$ j$ b& ?( K$ r* s, [
@.HasOrder := false;
9 Z: x. p1 Y0 L7 [# d @.DrivingHome := true;8 ] O- Q' `1 K- K! {
rgManager.tryToStartTransOrder;
* x0 I+ ^3 l! ^8 g0 D if @.Destination = void# O5 t E' ~. }7 n$ ?9 n0 K
then -- no transport order for vehicle @
+ `% F! @! @8 ?# Z: U, p+ A# a @.Destination :=" k4 ?6 m+ P; Z
rgManager.nearestFreeStation(@,track.~);2 l" |; w" Z- \. o
newDirection(@); % n4 x! r" P) s& m& w
if @.Destination /= void then
, f4 G) t5 ~6 d, V. L' \9 l5 } @.Destination.NumReservation :=( a& O! L. z! e7 k% Q
@.Destination.NumReservation + 1;
) E( K) |" k: S: m end;
+ f' X5 Y5 |. K8 F$ d @.CurrIcon := "drivingHome";/ ~" x' J8 d: a, P! q5 p& |: T4 l
@.DrivingHome := true;7 U. i% f- I, k( z; B6 y
end;
9 t Z$ {: z4 [* a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: ^4 \1 Y3 u+ ^ t% k% W1 x0 t part := @.transpOrder;/ n& |8 J* E% Z: p: A- {
part.move(@);-- load part8 [1 T3 p2 c9 y. C
@.CurrIcon := "load"; e) a0 C$ ?. q
GlobalDistObj := part.globDestination;
# g0 H$ r* t6 m3 t0 n- ~ } assignLObj := rgmanager.rgAssignL;1 u) v/ W6 `) x
row := assignLObj.getRowNo(GlobalDistObj);
$ |0 ~4 J8 q6 N, a; M# U if Row = -1 then -- since 70- I: W# F+ q, u5 i
if lan=1 then
4 [6 P9 M2 V( d/ x0 M! ]& @( D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 `* C$ n4 s5 T9 Y2 Z6 a7 S) k: s to_str("in der Andockstation: \"",?.~.name,"\""));
5 E. ]" i- y: w else/ W6 T) H/ q4 e% l. @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. }4 F$ [+ f2 f: u to_str("in docking station: \"",?.~.name,"\""));
; y8 f% V0 T0 z; l. E end;
: ]5 k# `. F+ i9 D% Z) s( o else) N: x( W# m1 O1 b* H: ^
@.Destination := assignLObj[1,row];
3 E+ L- H" d7 x( Z. O7 k6 f end; ; p$ ]" @% Z, H! s0 H
newDirection(@);$ i; ]) E8 N2 ]5 A# S L% M
@.HasOrder := true;
! ]" w" F, K* S* T7 Y" R end;
) N# s9 X7 z7 Q5 o end;; H: W% b) w8 M. E8 b* G$ K2 |
end; -- of the method
" w5 |: g& Q! [( W/ K# E |