/* called by: entrance ctrl of the object 'track'
9 p# x6 m- c/ P* e/ Z ` L*/
" x5 c, [9 K e2 vis+ k0 |6 J+ v7 e2 V/ e+ m4 s, S2 H6 a9 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 A1 A9 Z( y4 R1 |0 Qdo" A% O. x# p0 B& W* h G
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 Q: n. r' p6 u) W" [/ J C if current = @.Destination -- else return# Y' S5 Y* D" h
then
( A: D+ u, ?4 N( V5 J @.Destination := void;
9 ^& r: Q, {5 G if @.occupied then6 E' B1 W. J$ t- q
part := @.cont;' [+ p+ q) L; M$ `+ {; E
@.transpOrder := void;7 x2 K/ f6 D Z4 q' L2 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( k/ e% X4 X$ N3 |( z" _* h @,root.eventcontroller.simTime);
! ~& c. }9 h0 P b- e4 | @.HasOrder := false;* c! N: D9 Q" ]
@.DrivingHome := true; a: N/ O/ e# P: p
rgManager.tryToStartTransOrder;6 \+ J. K _4 o; H; W
if @.Destination = void' g+ d, T7 ~" p3 Q& |# Q
then -- no transport order for vehicle @4 r' i& X: ]/ [- J( I! o
@.Destination :=
& i- @/ Z' k% b1 f5 H rgManager.nearestFreeStation(@,track.~);' p; A: @$ w) u
newDirection(@); # k0 F! H% y; ~9 ^ M; E1 W5 n2 ]
if @.Destination /= void then
, k- U7 y8 t# m% S3 b* { @.Destination.NumReservation :=* V w: v0 `* u) k+ x
@.Destination.NumReservation + 1;- [: }0 W- a7 X8 a, Q- c
end;6 C- [* }4 ?+ G f2 ~) f
@.CurrIcon := "drivingHome";7 k: v+ ?' h7 s
@.DrivingHome := true;, G% Z/ z! j+ {, x9 `
end;5 M( z# ]2 U# R; z7 B) I7 d+ W" g+ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 D" p* {2 Z# W; p
part := @.transpOrder;- H; r# }$ l' Y4 F/ n. f" }8 y
part.move(@);-- load part
; N* j M/ R+ [& @6 U5 B' l @.CurrIcon := "load";- O# s( [: b0 G8 ]" G
GlobalDistObj := part.globDestination;" V" B8 m, d$ G7 \4 {, Q: T
assignLObj := rgmanager.rgAssignL;
/ k% M' \3 p, r! j$ l7 J row := assignLObj.getRowNo(GlobalDistObj);8 C# I+ q8 ^" {
if Row = -1 then -- since 70
/ S- B) P+ l) M, Y if lan=1 then
' J$ O0 {. R5 y0 k" y* ?+ V0 ^7 h* i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 ]: T5 `' [: }* l" x/ S A to_str("in der Andockstation: \"",?.~.name,"\""));! M5 z$ M' Q5 \( B. e' N
else$ q( W. t7 Q) q6 C8 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; [. q$ R, V. J
to_str("in docking station: \"",?.~.name,"\"")); & l4 F- a" X, W: @
end;
6 F; P9 C1 |0 b$ d" v8 D' t else
1 H8 M. u/ ~4 W y; v$ c% k$ N @.Destination := assignLObj[1,row];
2 H! F1 ]9 K2 i end; 1 M5 W2 C# n4 |! C3 Y
newDirection(@);
7 k6 D+ u6 ~7 ^. h @.HasOrder := true;
5 `% e# ~& W7 Q, |) L8 f6 P9 c0 l end;) `) u1 S. W8 z& q N* J& l
end;8 t' g/ h& c5 C
end; -- of the method
: T9 Y) S+ J% U* Y% j |