/* called by: entrance ctrl of the object 'track'
9 q, @- t0 a. Z$ k/ X*/
8 v6 d8 o8 t a" V+ }is
% o$ I. i) _- Q( b I3 ~ i8 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: I9 _% {) A( n# }! p5 q$ {5 ddo, D2 w1 E5 q) C& x, [3 [+ `
Lan := rootfolder.Internal.Tools.AOLlanguage;5 R; K' g3 v; w
if current = @.Destination -- else return) \( J+ b9 w. N0 r1 D" F7 \# }, m
then
F2 a3 W) t8 r: t; b0 n @.Destination := void;7 }8 t8 S8 l9 e
if @.occupied then
/ W2 K* H8 Q# U6 b) @ part := @.cont;
# ^3 X: ~$ B" Y# A, g6 s3 z. l @.transpOrder := void;
6 T/ J( c, `+ t5 y, v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: F' U- R6 M! N( a$ a @,root.eventcontroller.simTime);/ h k3 e! D4 [) X2 a0 b: y
@.HasOrder := false;
% m" C2 n. S+ [2 q6 \8 {9 G @.DrivingHome := true;
2 `: M& M& r1 n P rgManager.tryToStartTransOrder;
0 m7 g1 K; w, G% @ _ if @.Destination = void7 ^% j3 `: l7 H$ M+ k \
then -- no transport order for vehicle @ j6 B( l0 t0 S& i) J5 q
@.Destination :=0 R; a) {# ] Q r
rgManager.nearestFreeStation(@,track.~);; v0 _+ V9 X% T! n2 [
newDirection(@); 9 k7 k( R/ m2 _! p8 B# }+ s
if @.Destination /= void then- H. x& v% Y" x+ I
@.Destination.NumReservation :=* ?9 T, e0 G7 j( h, d7 R
@.Destination.NumReservation + 1;
& A' ^5 i! P F end;3 l8 S8 b7 B& Z) ] |% k2 Y
@.CurrIcon := "drivingHome";$ |. l( S, S. v& M: ^1 O% b
@.DrivingHome := true;. Z# Q1 }4 { V
end;5 d, T) z+ g# a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* i. K" k I" R4 @
part := @.transpOrder;
5 z. [! `! _4 D. P: U% S/ ? part.move(@);-- load part0 P4 w+ C+ ~5 K$ @1 L. Y" a3 P
@.CurrIcon := "load";+ K, K! g5 ~. n1 Z7 g$ j
GlobalDistObj := part.globDestination;
# j& b6 k1 P' [5 `: w5 s* k6 r4 ~ assignLObj := rgmanager.rgAssignL;- M- C( O, ~. V6 C9 s: J X, h
row := assignLObj.getRowNo(GlobalDistObj);9 x, u( W) b+ F+ w( G
if Row = -1 then -- since 70' D6 z0 a" P) w+ H- c3 A
if lan=1 then4 ^3 A7 A& `& N( M$ ~/ a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% w& K4 z( j' C- c' D+ ?
to_str("in der Andockstation: \"",?.~.name,"\""));4 w* n, V/ H1 A' C i" L
else# E6 t1 ~1 m7 j+ [: N# e1 y2 N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 ~6 x0 H8 U+ F# Q to_str("in docking station: \"",?.~.name,"\""));
5 y2 Z/ o5 v" L: R8 a: U9 C( C end;
+ ^9 `% P" n& R6 x: Y6 T6 M else
8 ^ n/ v: U2 d5 a: I @.Destination := assignLObj[1,row];
% [) g: y: t& D/ |) A/ u- Y end;
* t9 v V8 `) s: k7 Z! x1 G5 o newDirection(@);) D8 k: ?" `, U/ a4 K
@.HasOrder := true;; k' ~; C& `$ Z$ `6 P2 b
end;
1 ^. _. i" ?% q' |8 p- _) x end;
" A Y+ f* `# f# l. D# ]2 Aend; -- of the method: G' F O' m8 m7 q' d9 P
|