/* called by: entrance ctrl of the object 'track'
( T: \1 w" Y; T2 \% k6 E# ]*/: z3 I: H* X }
is
4 y$ R8 W8 d3 U3 E/ f" P8 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;" R$ _- U% I* q" P4 Q% s
do
; T, U, _* J! W N7 m0 W* t; A8 B Lan := rootfolder.Internal.Tools.AOLlanguage;' E9 Q: {6 f" B5 m2 v0 j
if current = @.Destination -- else return" z; ]- T8 P8 J9 C/ V: t! J
then
) B1 H* ]# P J% {8 q, V @.Destination := void;
! N! z$ o1 n2 T6 u) ?1 g* ?1 _ if @.occupied then8 z1 m T9 W9 b3 R0 e
part := @.cont;
+ w8 f' q5 K3 o/ q! t @.transpOrder := void;$ H5 S. x, a$ G/ i6 r: B4 ^1 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 C& k3 ~6 Q9 `/ h @,root.eventcontroller.simTime);/ F1 q2 |0 j% R: ]. T
@.HasOrder := false;$ I, ?* M; j, @; s9 H* x
@.DrivingHome := true;
5 E5 [8 ?( v1 y* K# ~ rgManager.tryToStartTransOrder;
! v/ D5 u( G, P. i$ g if @.Destination = void+ F& z5 w) s0 e+ y; u
then -- no transport order for vehicle @) D" m$ [- J( t+ N6 E I& N6 K
@.Destination :=
1 n, R2 j; S3 y' L rgManager.nearestFreeStation(@,track.~);, j" P- D# g4 t- @. F
newDirection(@); 1 P6 g# `( P/ t9 r7 z
if @.Destination /= void then
9 S! P- |, m' y" c @.Destination.NumReservation :=, l6 B+ `% b# |, {* d+ q* A3 [
@.Destination.NumReservation + 1;6 w R; `) G8 t7 t6 n3 l1 s
end;' I# n8 \8 d+ g% i
@.CurrIcon := "drivingHome";
0 s/ |2 s Z' J7 X4 \2 S8 I @.DrivingHome := true;
# h% A( v& E6 _# I4 w* ]4 d end;
$ q# [0 `4 r4 P! m else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 T. I# x! z f9 \: t
part := @.transpOrder;" r; _# o6 u) j0 Q- {
part.move(@);-- load part
# ]9 O% j5 d, }! e. } @.CurrIcon := "load";
2 |) O: ]: A9 y' W* j& h2 v GlobalDistObj := part.globDestination;
: b5 r2 y- i2 ] assignLObj := rgmanager.rgAssignL;
0 m/ F; f) k) w1 X6 R row := assignLObj.getRowNo(GlobalDistObj);! ~$ {+ ~5 l# h% ]1 c2 S: P: i: ^
if Row = -1 then -- since 70! S) z; P, v, Z' _
if lan=1 then, G9 }* n6 _$ j5 {' E [0 b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ d: k+ G* A$ O& c
to_str("in der Andockstation: \"",?.~.name,"\""));
# t) G0 }+ f+ A. d7 z else) Z7 Q& w+ ~/ g0 e1 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' \7 H8 }8 H) j1 v) n
to_str("in docking station: \"",?.~.name,"\"")); % H! l* \; I$ W; R) |- Z
end;
: N! D! P& J% A- p else
Q3 p6 n5 r2 P, J# z. ^8 G; C$ P @.Destination := assignLObj[1,row];: C- L5 i, ^& r1 K
end;
: x! a( w- m6 a0 a; g newDirection(@);# j) i3 E2 w z7 {, \
@.HasOrder := true;
& l; @" b3 B! s( h% L8 p end;5 V" G* B) n4 |. J$ {5 E1 N2 @+ B9 T
end;
$ F; b+ {3 H5 h% |9 b L* Mend; -- of the method7 x4 Z/ p3 o& _4 M# J' r. o
|