/* called by: entrance ctrl of the object 'track', s. p( a2 O4 P2 q; c1 Q
*/, D& e3 o0 x+ f( c* L3 c6 ]" b1 F
is3 n$ [8 b; G' c# H" t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 x6 U) d, ]/ D; H
do, {8 P: B& ~ g
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 P+ y4 ]5 S# ~" R3 O if current = @.Destination -- else return J* T% J- x4 ~. g
then; h4 Y$ j5 |" \; I( l5 X
@.Destination := void;' k8 {: W% y4 {2 ]$ K
if @.occupied then; @. j V# c* v; D% f3 c4 R
part := @.cont;
/ O8 L7 V/ h' U# C$ ]6 V @.transpOrder := void;1 K" p2 k8 U' z( _0 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ T& ?6 V% E3 S @,root.eventcontroller.simTime);
- N% T8 Z0 E# J% @; }2 Z, H @.HasOrder := false;
1 g) Z# \0 j, ~" p9 B5 B @.DrivingHome := true;
; P1 {6 N1 z4 I' w' ?3 R; G rgManager.tryToStartTransOrder;; m4 H3 W7 }) W$ {4 e" a
if @.Destination = void
' K( x h, P1 A# D then -- no transport order for vehicle @% [1 ]3 ?- |+ z' J/ V; X
@.Destination :=1 W# [ S' \5 k# A; Z1 t3 U( r0 e
rgManager.nearestFreeStation(@,track.~);
8 u$ |7 E: B% ~5 U! V7 _/ c. f newDirection(@);
7 p( `- p6 M% Z% o$ n' e if @.Destination /= void then
0 l) {3 q& O8 Y$ x3 D6 B @.Destination.NumReservation :=' ?4 V* g b) {8 w' D
@.Destination.NumReservation + 1;7 c+ u- `7 v- ^) H5 U) G
end;
7 E4 Q% h4 ?. T6 E# z6 e) v @.CurrIcon := "drivingHome";
! d" J. \3 a `5 D: W @.DrivingHome := true;! s- @ B |: I2 ?3 K& y
end;' `1 A1 p- e# y2 F6 r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- K. r& L; C1 _% x' v- @$ X& \
part := @.transpOrder;
# W) V% l, h( H3 ]# R# c part.move(@);-- load part/ h" \. u6 j; j& Y {$ O# S
@.CurrIcon := "load";
( |1 G4 i: _ f+ l! H GlobalDistObj := part.globDestination;
. d. L' ?+ [& J7 V: C assignLObj := rgmanager.rgAssignL;
2 h8 n0 o5 F( t, l) K6 `6 C: Z8 n& w row := assignLObj.getRowNo(GlobalDistObj);. u: u0 s/ P( D: q7 p* S C2 L2 R8 W, g
if Row = -1 then -- since 70
' |6 Z1 Q. k& b: D. g if lan=1 then2 s! z8 N' p: h4 ]7 |4 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 H) b+ R2 \* C9 P+ C* n3 D
to_str("in der Andockstation: \"",?.~.name,"\""));
6 F7 @% u4 ]- R6 R0 y! z else! ]% \7 J, l8 u" ]. A& F, y/ X& Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
_) `# b' D5 O3 a to_str("in docking station: \"",?.~.name,"\""));
, P: }+ q# v, a8 ^ { end;
& u) F8 x0 ^; y& i; f9 @* z: t2 E( D4 g else
; `* y# W+ e; s, B( L! ] @.Destination := assignLObj[1,row];& e# X0 J* C! W4 @
end; - @! q$ A! [3 c2 Q4 H1 b: j v+ B
newDirection(@);0 J; [$ d; k- s0 |3 y8 ^, s
@.HasOrder := true;- W2 \8 O! ]+ }
end;) ~2 a% A9 x9 D) ?
end;
, _; k! T+ h5 W* v" a* ~end; -- of the method
! x' ~: o) k0 L1 I5 D7 l$ n0 [ |