/* called by: entrance ctrl of the object 'track'! g# ?: X1 E8 w8 S
*/+ K+ C- L8 O e$ N% n5 [9 l
is) x6 N6 j* |2 l- e/ U4 {# b/ K) X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 W! A1 }4 W1 p( Fdo$ h0 D+ ~8 l8 o. f
Lan := rootfolder.Internal.Tools.AOLlanguage;3 ]6 f7 S' X. j0 A" Y
if current = @.Destination -- else return
3 C& K2 w! j& H, @* |7 C then
, D8 m! `+ E: a; r @.Destination := void;
: j: Z# |4 Z! Q$ E7 ~* V if @.occupied then) I, {* Y( [2 m* d! B
part := @.cont;
, X8 y! g& G' W* M7 d @.transpOrder := void;
. T5 y, H1 k- n% d6 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 E2 G, Q% i+ h% S0 K U* p: _0 }
@,root.eventcontroller.simTime);1 |. s# t* z0 V1 q
@.HasOrder := false;
( x5 u. R3 p. ~; r @.DrivingHome := true;, \/ ]+ I7 I. P: ?
rgManager.tryToStartTransOrder;8 a) W" Y) x3 u
if @.Destination = void; t; A% a9 T9 R
then -- no transport order for vehicle @
7 T- N$ O# |& j- C @.Destination :=
# {5 j2 J! x7 {2 q: Z1 h! p$ K rgManager.nearestFreeStation(@,track.~);
+ d M, Z9 ^, K8 G! @9 s3 f" g4 @ newDirection(@);
+ h2 P! w" W8 s* g if @.Destination /= void then
3 d' q# K6 w2 L/ j7 W @.Destination.NumReservation :=
0 i, {: P3 r7 ]& x) R/ w @.Destination.NumReservation + 1;
7 p# `; T, |0 r2 C( {5 o- n end;5 G7 y" A$ n" J, I+ N2 h5 [+ D9 G& L
@.CurrIcon := "drivingHome";
$ u* b. f8 y6 u$ r3 T @.DrivingHome := true;
1 f1 x0 P6 Y$ K1 M6 a# h* Z end;5 b5 j$ l; M+ n; q1 o0 @& V$ P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 e% t, O0 x2 J' t* {4 n part := @.transpOrder;6 r) z4 _; s" }" \# C7 y
part.move(@);-- load part1 n! t9 G- n" |
@.CurrIcon := "load";
( `2 u7 B: W: z9 Z: b, ?8 e5 i GlobalDistObj := part.globDestination;
( V7 O( V. F: }1 Q# b$ [ assignLObj := rgmanager.rgAssignL;/ x. k; k" f. {
row := assignLObj.getRowNo(GlobalDistObj);
* \$ x+ ~$ h0 \. z+ s) Q1 J if Row = -1 then -- since 70. q* @% f& \8 u. H. K
if lan=1 then! T& l0 d# q1 g+ F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 x J+ f) D0 d6 T to_str("in der Andockstation: \"",?.~.name,"\""));
9 K/ Q7 A. k4 }+ N0 H0 Z else
: B9 U. d1 e9 N2 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 J4 Q7 t3 C5 y6 u. n" Y' H
to_str("in docking station: \"",?.~.name,"\""));
- _5 F6 L9 w( q8 T2 \" Z7 K) Z0 ?3 ^ end;; x* }2 p" ]1 G- ]
else
. ^( X0 t3 M1 `, S' s, F9 o6 P @.Destination := assignLObj[1,row];
$ |+ i" e/ V/ P& `0 D; A end; " R+ }# g2 m* ] H0 t5 A
newDirection(@);% ^( |) \7 z, a( |/ N. O$ H C9 W
@.HasOrder := true;* t! [) ]3 d7 X. z0 p
end; t0 }$ z* V: ], L! m2 ?
end;/ G& |! s* I7 t- {+ A( Z1 M5 J6 g9 W
end; -- of the method' q( y7 Z' u: m0 b1 h
|