/* called by: entrance ctrl of the object 'track'
# W- N$ c6 v9 W% \8 [/ a*/
5 O! M0 T# f8 P% J6 n5 I1 `is
4 Y/ V( z! U' `; L0 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 ~& P }# g) Q" I Wdo+ N( w9 Y" i( B$ \& r. r
Lan := rootfolder.Internal.Tools.AOLlanguage;
, D9 N7 d8 g+ e0 H8 Q1 K, E if current = @.Destination -- else return9 L5 k e1 S0 n9 P8 G
then
' Z" C2 z) U+ z% `8 r @.Destination := void;
% e- H; m7 X( C9 u [' U0 v* ^3 y if @.occupied then
5 |6 Z! K& D, o1 u& ^+ [. p part := @.cont;
+ R; w/ l4 S/ X% Y( {0 D @.transpOrder := void;( F2 q) l0 W e# Z, c4 y9 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* f; u7 ]0 y( z) {
@,root.eventcontroller.simTime);+ c; ]1 i2 B) \: t% B
@.HasOrder := false;
/ h4 e9 K" C0 h' R# x5 g @.DrivingHome := true;' A0 b2 c3 y w) X+ M6 p
rgManager.tryToStartTransOrder;
& k1 y; ~; o4 a p! v4 \% J1 O if @.Destination = void# Z) B% Z, y9 f1 ]
then -- no transport order for vehicle @
! k- i+ H3 x; X* U [- k$ s @.Destination :=) f1 |& Q9 G& u. D; f3 Z1 B
rgManager.nearestFreeStation(@,track.~);, D3 {( p0 Q* x% F( a4 m
newDirection(@); . k" c1 y7 \; H/ U1 \
if @.Destination /= void then
8 H& u2 A) L. q8 z @.Destination.NumReservation :=
( b# f1 v; [, ~! f3 i @.Destination.NumReservation + 1;
8 w1 F& ?0 B& k- S }# C/ L- P& g end;
1 D- v9 ]5 W1 {) j- N @.CurrIcon := "drivingHome";* X: m7 p- G) |1 p% x( `" @) k
@.DrivingHome := true;* S) j! V- f9 f8 d: \' A
end;$ U1 o& Y0 l; S. @$ m5 P. e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! Z9 m- c* f; i$ R6 C' ^ part := @.transpOrder;
7 C) {. e8 t* M& S& N% O7 M& \ part.move(@);-- load part
- X. E; \/ B, _2 V: ^. [! e& ^ @.CurrIcon := "load";" ~0 I! }* c% _& N) }
GlobalDistObj := part.globDestination;, u: _$ `6 q( f/ }& |4 ^; p
assignLObj := rgmanager.rgAssignL;( V0 v# O' k' a$ ]7 T
row := assignLObj.getRowNo(GlobalDistObj);% V5 @# M4 l+ w7 l
if Row = -1 then -- since 707 M. x7 g/ a) P
if lan=1 then _* p0 F$ n# C0 \. D9 o( ]! O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! R( I" _( j3 `' |0 @' v
to_str("in der Andockstation: \"",?.~.name,"\""));: a) N4 c3 l& X7 R# J& O
else+ @2 h5 Y" K: S* G! l5 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 y$ l5 f' U5 B- i8 v! V to_str("in docking station: \"",?.~.name,"\"")); 6 ~+ i4 b; O4 E
end;& F: D0 O" u3 |
else# e* T3 o0 ~; y! w" ~: a
@.Destination := assignLObj[1,row];4 I2 t: \, o, e& S' s
end; 0 o: e% z0 z# _% J
newDirection(@);# P/ M7 ]( B# [/ @8 V
@.HasOrder := true;5 U" `1 h5 w, S; g! S$ Y, [3 r0 y
end;
& z3 y7 Z9 b6 ?8 T( ^6 \ end;* r( z7 [% X( x
end; -- of the method
* \4 {1 Q& S7 L2 R/ c |