/* called by: entrance ctrl of the object 'track'
; f% \. P% M/ p' w+ B/ G*/; o/ h, Y% q9 U" Y
is' c, P K! f# p: }) C9 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- b& V) H0 j$ R" y
do* w+ F3 n3 ~9 r$ d# C
Lan := rootfolder.Internal.Tools.AOLlanguage;
- E/ f$ g# R5 ~6 W# P! w- U0 g7 \ if current = @.Destination -- else return
' @3 h0 F) d/ Y6 @% |. E then
5 h6 z9 _5 T f" Y- Z8 M. t @.Destination := void;# Y* p H% E# F- t' c/ b _ d
if @.occupied then& \( e1 J! Q( J( q+ B
part := @.cont;$ _* a4 X8 ]% p) C" i0 E
@.transpOrder := void;
' W8 X* W G s+ Z; s+ B9 z! c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: X6 G3 u' J p! \' R& V( U; @ @,root.eventcontroller.simTime);
* l5 g3 d& n* ^4 J9 U8 a @.HasOrder := false;
7 d7 D: G0 A2 T8 p) z% p9 k$ [ @.DrivingHome := true;
9 G( H! ^2 a# g9 u! L rgManager.tryToStartTransOrder;
H! L- D: b O) C f% m* Y5 X. K if @.Destination = void
: f) H7 f9 ]/ O3 B/ i then -- no transport order for vehicle @
! R, h3 M3 o; w- U- R7 u @.Destination :=
- h, ? \. b: P% A3 ]! m4 P0 ` rgManager.nearestFreeStation(@,track.~);: W* A2 F' N1 E& |& g; s
newDirection(@); 1 C( B/ J( K% U: h* z4 a N% q- S5 `
if @.Destination /= void then
( C3 {$ Q. f; Q0 C @.Destination.NumReservation :=9 w* e% F: }6 Y+ Y1 J
@.Destination.NumReservation + 1;
9 |8 J( w2 g& \9 E9 ^' T end;+ z. M( O, V3 P5 O4 o
@.CurrIcon := "drivingHome";
4 L) w2 M2 l: R% M- o2 T8 e @.DrivingHome := true;3 J& ^; I% E/ r2 S7 \
end;
f6 u+ {! ]+ b/ g* X4 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) o3 o0 _, |$ p$ y part := @.transpOrder;6 }: P6 M; ~1 `7 w
part.move(@);-- load part
' t3 F8 [& k# h9 p4 g( q @.CurrIcon := "load";- h1 J; J+ m) t% j2 G
GlobalDistObj := part.globDestination;
6 `% x5 j) H0 T# H, ? y assignLObj := rgmanager.rgAssignL; C3 ~: X! z* n7 w+ s+ a
row := assignLObj.getRowNo(GlobalDistObj);
& b. x: y7 x, H2 |; r$ ` if Row = -1 then -- since 70; J/ x/ r; M% H J$ e
if lan=1 then, j: s, ^+ s8 U2 J* f0 V8 t% N# S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. {' {" O8 C4 ]/ j6 v to_str("in der Andockstation: \"",?.~.name,"\""));5 Q# j7 s! `: @/ K
else! Q' b2 m/ }% U2 P$ T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 Z: s+ z0 [. \0 S; V2 Y1 D" d to_str("in docking station: \"",?.~.name,"\"")); , P% d* X) }$ l: `
end;
- d$ u. P) ?! v' V7 Y else
4 w, q' x" U7 f1 A, L% X @.Destination := assignLObj[1,row];
7 e" m( Y4 a; j+ m+ X end; / R; ^) y5 s$ L; @
newDirection(@);
( y* _. k" ]9 v2 h2 g @.HasOrder := true;) P6 m/ a z/ z4 Y0 I K
end;" M4 f: M% n, q0 U c; n1 p
end;) _( \2 h: D3 j& k
end; -- of the method
" P! V) S# S/ f |