/* called by: entrance ctrl of the object 'track'
& t, ~3 u! J7 R( p" y4 M# B- h! h*/
, E$ @! v. n. ^" N, p, Eis% Q n; E, [7 n6 ^# j7 K2 ~+ r& m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' r5 {) F" Z! xdo
3 T! ^8 i) a: c9 _. y D8 | Lan := rootfolder.Internal.Tools.AOLlanguage;
) R$ t- z# }6 n) c U1 W& S if current = @.Destination -- else return6 b. p8 ^6 m( j
then
( W6 r+ l1 Q% ^; x2 N3 U/ p) d! ] @.Destination := void;
4 {: [1 y/ x- V! ^! d1 E if @.occupied then0 w1 y" Q8 n n6 g" k
part := @.cont;
. U# C' D% H: ]( R7 N R1 e5 ^% ] @.transpOrder := void;
; e2 C1 W7 p: u/ v. r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 g0 }9 S4 _$ {. ?4 j @,root.eventcontroller.simTime);% ^; H o. j( J' V1 E
@.HasOrder := false;
3 A. C/ c- H& r; g# x @.DrivingHome := true;2 _+ q+ a) o7 X3 d- U8 B5 T+ D
rgManager.tryToStartTransOrder;
3 V- v+ D: q7 U+ h2 S8 M7 [ if @.Destination = void# H0 U# z' o P
then -- no transport order for vehicle @5 c2 E3 {5 K$ s
@.Destination :=
) O8 W9 l) ^3 {5 J& p' Y rgManager.nearestFreeStation(@,track.~);* k$ G4 g* i2 O, L/ c
newDirection(@);
& o, L" [8 ?+ ^! h if @.Destination /= void then
$ q$ S' i" Y+ H- ] @.Destination.NumReservation :=; x& q' d! z# R, e+ H
@.Destination.NumReservation + 1;
6 K Z& ?2 j- h x end;% L9 d' Q; b( R0 y1 J
@.CurrIcon := "drivingHome";
3 B6 F+ P1 Z4 m+ y) m3 W @.DrivingHome := true;3 p- }# p! [* e& V' A: S- p9 j% A! k
end;2 [* W! \3 a, g" j, Y W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, ^7 p! m' I6 @6 d( D$ h& M
part := @.transpOrder;+ V" x, m, }7 u
part.move(@);-- load part& m4 ~' O8 [/ |' L
@.CurrIcon := "load";+ P7 b" R5 C9 k& l, ^' l- {3 ^$ u
GlobalDistObj := part.globDestination;" d5 m! y7 s8 H( _$ \- }
assignLObj := rgmanager.rgAssignL;
d* _8 H! `1 j/ [& e row := assignLObj.getRowNo(GlobalDistObj);
" L+ f* h7 E; y! X1 G7 E if Row = -1 then -- since 70& L' z: J: F3 m* c. o8 A( A
if lan=1 then* j5 g0 F! v2 _: E% x# n" m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! p3 I$ A1 i$ X+ t5 o
to_str("in der Andockstation: \"",?.~.name,"\""));
; `7 Z; Z* d' d% X else# s$ V$ K7 ?$ g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" r o; V( \* \/ H& \: C to_str("in docking station: \"",?.~.name,"\""));
8 R& |3 ]; \6 l end;
# ?; R b* J8 K) R+ e1 V else
1 B" A4 G7 u0 W: D2 A7 S @.Destination := assignLObj[1,row];# q& \3 m& e/ Z6 D) h+ B/ [( W
end;
7 C5 s4 x/ @- u1 Y" e, B newDirection(@);
% P5 ]+ x2 n6 ^7 C @.HasOrder := true;( g2 R' K: E; w% U! T! z
end;
( |$ n9 y- L- Z4 U1 P; B end;
. _6 m3 p) J/ U2 L1 A. hend; -- of the method5 a& \' u( n& x% `
|