/* called by: entrance ctrl of the object 'track'5 R) b* `; i2 p G' w. p; B. i
*/
7 Z( o" N" }. L# Lis6 l0 `/ @/ ~- s* G8 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% P- d! F0 z) q8 `; h/ J4 s) |% m
do& Y: d$ Y) `, L$ n" _$ C
Lan := rootfolder.Internal.Tools.AOLlanguage;8 ?2 V7 e$ r. X& Q
if current = @.Destination -- else return
, {* e+ a" t6 m0 R' S# \ then
" G- `! N9 t% |. ?$ j' q0 T @.Destination := void;$ w- D; [# v5 [0 K
if @.occupied then3 Y- p# D$ T2 |4 f+ P
part := @.cont;' b6 U/ g" g7 H- [5 _
@.transpOrder := void;8 }' w1 C! u0 R. n. l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 F, _' i* y/ ^% W; f% y
@,root.eventcontroller.simTime);$ W: ]$ E# H& L* D
@.HasOrder := false;0 g. w2 n1 p/ z/ [4 V7 R
@.DrivingHome := true;: P4 i5 A% U" f# J8 ?
rgManager.tryToStartTransOrder;
7 X9 w) x) ~+ }! J( W- H if @.Destination = void
. W6 c9 O2 e$ m8 ~$ t then -- no transport order for vehicle @
5 O1 i& C5 `* }% E: Y @.Destination :=$ |3 M7 \: f9 m z4 E4 Z
rgManager.nearestFreeStation(@,track.~);7 U- `8 O, }& U1 x7 ^2 q
newDirection(@); : r" K" C( R, U( y
if @.Destination /= void then9 Y$ l( T* t' V- d
@.Destination.NumReservation :=1 y+ d; _& F, w
@.Destination.NumReservation + 1;& Q- k8 v' B. c
end;2 B" @4 o- e8 x9 X& w6 a
@.CurrIcon := "drivingHome";
4 d H& I) i7 l @.DrivingHome := true;7 I! Q N3 i) A/ J7 @# n/ |
end;
& _/ P1 {4 S/ J else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ D5 ~4 x* `0 O9 G8 ~6 g
part := @.transpOrder;9 n/ E$ s# U' C# g& j
part.move(@);-- load part A" I4 z7 X" S" x& X9 X0 }
@.CurrIcon := "load";/ k4 |0 _% U" d
GlobalDistObj := part.globDestination;
$ \$ X) b) B. O T' H# R assignLObj := rgmanager.rgAssignL;/ d5 ~: \: e; l2 {5 d q
row := assignLObj.getRowNo(GlobalDistObj);. r. L. b& C5 Q2 }4 b/ y' x c
if Row = -1 then -- since 700 j) O: }- o k2 Q6 C
if lan=1 then
6 }; p: x& P. O4 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! Q$ k1 w3 d1 c8 I6 h
to_str("in der Andockstation: \"",?.~.name,"\""));7 _. Z6 ^1 f) e/ p& q' }
else
# Z9 d8 N+ O1 {0 v6 u. u; P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 j5 U( b5 D* y$ J$ c
to_str("in docking station: \"",?.~.name,"\""));
/ `; L; C3 k, }. L4 K' s end;
1 U! y2 ]- v# O else( K! }7 F" A- r- d( [
@.Destination := assignLObj[1,row];
, Z0 K. o2 @9 u; N% b1 J end;
. d2 b7 x; { C0 H newDirection(@);
$ O; F; z, |9 n/ E5 Y; }# p% u @.HasOrder := true;
6 e5 k7 x) W7 q: y% z" {# A end;
, m" H n4 L: u, S5 } end;
0 A5 c+ T* w6 v0 Cend; -- of the method
* p7 z& C' t- f" ~& M |