/* called by: entrance ctrl of the object 'track'
$ \% T4 W9 U/ E$ ^6 P- @# \. |*/" B) G" \- n: _" t
is: r* B$ B) o- X9 n, m& b, Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 x" V8 L, t5 c _, m Q, I" e
do
2 n/ U: s: o& j- i Lan := rootfolder.Internal.Tools.AOLlanguage;& R+ `( H5 e1 Q! ` I" T3 `
if current = @.Destination -- else return. ^. h9 U* b8 e8 \* Q# ~# ~" p
then- p- i" r* c' y) r
@.Destination := void;
0 \9 e9 Y9 M9 [ \ if @.occupied then
( q" q0 `+ ~' o/ H" O' @9 s part := @.cont;
0 \5 u7 Y' B/ C2 `* A+ H @.transpOrder := void;
+ q9 J" }8 M3 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 s% B) c4 G8 m0 b. Y. h) E @,root.eventcontroller.simTime);6 P" g' V% v& o* [
@.HasOrder := false;) o, Q& k2 y; w8 H! a$ b2 N
@.DrivingHome := true;5 \0 J8 [3 \2 c1 [# c- a
rgManager.tryToStartTransOrder;+ h3 W0 D$ j# {6 x" s- f- \) r
if @.Destination = void
9 f5 H! K g$ P+ V. o then -- no transport order for vehicle @
) _2 t* {$ O, d! `! f7 d, x @.Destination :=3 B" ?1 J' [5 K( I" U7 v- y4 y6 C
rgManager.nearestFreeStation(@,track.~);
5 b6 Z3 [2 b4 m% s newDirection(@);
1 h, \9 W6 m& n2 @ if @.Destination /= void then! w, _7 \0 U: G5 S3 c7 f/ \
@.Destination.NumReservation :=7 Q- ~ H+ k {* o; s
@.Destination.NumReservation + 1;' g# w8 v o/ B# G) r3 s, d/ i! ], q
end;" l W) r5 C0 v9 Z; p) z# X7 A
@.CurrIcon := "drivingHome";
- D$ y) ]& z& ]. m/ m, j' M @.DrivingHome := true;. T% ~! |5 J# S; V
end;! U a5 ]' j G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) ?: F7 m' ^# m7 y9 l9 b, {8 P
part := @.transpOrder;
' y7 b3 O$ e# } part.move(@);-- load part6 r' @; X! J5 W1 t) @8 @
@.CurrIcon := "load"; }. h3 d5 a! J9 l! y: c
GlobalDistObj := part.globDestination;
6 H- N, w9 m3 U3 V assignLObj := rgmanager.rgAssignL;
1 K- B! w6 }. V$ I row := assignLObj.getRowNo(GlobalDistObj);; t) D; v0 X2 J0 V/ Q0 G# K
if Row = -1 then -- since 70
3 ?* _1 f" c! Y9 j# `/ L9 }$ W if lan=1 then- P' R( {4 L5 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; l) j B# W: q$ J8 l& k8 ` A/ I to_str("in der Andockstation: \"",?.~.name,"\""));
: L7 H8 J3 r; u1 [6 s5 A6 `- @ else2 e: K8 V* k7 p9 }1 ^+ O: p; ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) P; e. x. |+ I# W% u% ]& L8 j, [
to_str("in docking station: \"",?.~.name,"\""));
# r1 ~4 G. O$ `/ _ end;
1 [6 {$ @- O" y+ N5 I7 h else# ` {' s& ?! M4 z- k* K& ]" V) X
@.Destination := assignLObj[1,row];6 W2 @' t9 `1 q: g j8 a e
end;
& O( V% y, c+ l! i) P. F: h" q newDirection(@);! K- n2 |5 U9 h. G
@.HasOrder := true;; C3 z; L1 M1 q* [# g
end;8 L8 w ]1 \( l/ u% q" q
end;' e" c7 j) I4 t
end; -- of the method
/ ?9 t& r% U2 n4 I2 h! w/ N) [8 v; p. S2 } |