/* called by: entrance ctrl of the object 'track'3 Q) [6 B# d9 H: M
*/3 G1 Q# N6 l; Z G0 T( T, W# Z$ r8 l
is# m: x3 I4 T# P' N: [7 X4 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 s. R" Y4 S+ J9 B# L
do
8 l/ O- V% }4 Q- Z9 O Lan := rootfolder.Internal.Tools.AOLlanguage;
3 T, G W& p4 Q2 X' S ] if current = @.Destination -- else return: G- @$ g( U+ l4 R
then
# t1 G9 I5 z" x0 z @.Destination := void;1 T9 u, v2 U4 ?, l2 N3 Z7 d
if @.occupied then- _: @" f: z5 Q o7 B% d% ?
part := @.cont;
. G% t1 S$ w7 [$ Z! t: r$ k @.transpOrder := void;
. v% x/ O! z1 k. Z0 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Z; p: l; n+ c9 ^4 a2 M/ q @,root.eventcontroller.simTime);
$ x& J4 h3 \$ Q- V; n @.HasOrder := false;
) Z; A, y7 z ?6 A: y U @.DrivingHome := true;
5 T5 L) E8 A9 H( b rgManager.tryToStartTransOrder;8 X+ j9 L$ W6 K9 i. l1 |
if @.Destination = void5 m3 p1 f9 v2 {3 \
then -- no transport order for vehicle @& N. V- b. U, V' w- b+ k& y
@.Destination :=
4 Q4 i- v. z6 u! D5 K4 X rgManager.nearestFreeStation(@,track.~);
' [! P. B" t8 D+ \ newDirection(@);
) p% d( F+ V' [& o if @.Destination /= void then4 h+ z& F; M2 z' i1 J# [
@.Destination.NumReservation :=
- N, j6 { R F7 B0 Z3 b @.Destination.NumReservation + 1;
- w, ~! _; }9 Q( L' J2 m end;
9 N6 p7 A4 U, x9 h6 o @.CurrIcon := "drivingHome"; z% x1 K' E3 `8 P) P
@.DrivingHome := true;
# [( {4 `( i) V/ H6 ]" [ end;: g$ E, N* C" _" H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 ? H" V' a) D. @5 O part := @.transpOrder;
1 @4 p0 u: S+ w# s part.move(@);-- load part
9 N& A4 o5 H1 o* q% o @.CurrIcon := "load";
& B3 c' {1 F1 g/ y' ?5 n! k) G GlobalDistObj := part.globDestination;7 Q! a; N8 d7 U5 J8 X
assignLObj := rgmanager.rgAssignL;
' e5 t5 r3 B' r# v& g; \ row := assignLObj.getRowNo(GlobalDistObj);
( z F! Y, m. s9 t if Row = -1 then -- since 70: h1 @/ L$ \3 D8 R
if lan=1 then4 i+ V0 W, L, d8 n7 O. b5 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 w% @) C( ]+ `4 q to_str("in der Andockstation: \"",?.~.name,"\""));* B6 c4 V2 e9 G2 W5 M
else. I0 l' k Q' ~1 M" R6 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! {& O$ k) r, t( H: F, c) F
to_str("in docking station: \"",?.~.name,"\""));
& ~ ?6 I5 L# Z/ Y end;8 c/ H3 w3 y& Y
else
7 {& r0 t1 F2 O" r1 ]# ` @.Destination := assignLObj[1,row];! B3 u% d$ I: P3 G, |
end; , M: j7 h- _/ ?. r2 i+ y3 F
newDirection(@);, y' ]$ P$ R \$ m
@.HasOrder := true;
! b [% s8 o& X/ }- |* {8 l end;5 o, o; f$ o% o2 S! G
end;% B) k4 K: ]8 y+ G# u, ?2 g, t6 w; X5 u
end; -- of the method0 J, g* q+ H. z2 A
|