/* called by: entrance ctrl of the object 'track'* G* p0 R( ~$ F
*/
6 y- {/ K* H+ [" B) ?$ a$ tis
* u4 m0 r b$ V+ h part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 p" E4 f7 y( C- I" ^0 j
do4 e$ T5 F: p" d& M3 y9 k# ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
# H% a7 J. q+ ?7 C if current = @.Destination -- else return2 t M9 w2 ]6 e5 B E* q
then
2 i" K- D' ^" b, ^& N8 B( [ @.Destination := void;+ Y) h+ B# |; i9 C2 B
if @.occupied then
! o; Z% j8 _! g# M9 S part := @.cont;. X, R! \, O" d1 y8 `4 v& j6 t
@.transpOrder := void;3 J0 o. Q. ^ u9 W% n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* O/ Z- |: }: t6 C/ O) Z" X
@,root.eventcontroller.simTime);: `* b% r8 P1 B/ M) v
@.HasOrder := false;
* _, N2 V) B8 c @.DrivingHome := true;
' I3 w! l' c+ B9 X ?5 { rgManager.tryToStartTransOrder;/ e7 g; a- c; w, D' X+ a6 h
if @.Destination = void
3 I; W, a5 Z$ [+ n: p$ H then -- no transport order for vehicle @0 e8 l6 v$ d5 n5 t2 N% ?: M
@.Destination :=
) z& l- K G. p7 Z4 \1 M0 l rgManager.nearestFreeStation(@,track.~);: q% m% {1 G- T. d
newDirection(@); - G4 v7 _7 F+ I. k1 K2 W
if @.Destination /= void then! W1 ^0 l2 R# M3 W0 t M6 r
@.Destination.NumReservation :=
$ j, m6 c+ m" v6 ]8 b @.Destination.NumReservation + 1;! w! f9 A+ d2 ~' v1 P
end;
7 L' [" J2 z" J7 L @.CurrIcon := "drivingHome";. t9 L A# X/ V8 @* b
@.DrivingHome := true;
$ ^1 B' {8 E* k8 R% D5 A end;
2 `9 u, f' u2 E# `: d else -- the vehicle @ is empty, both vehicle and part are in the same dock station& b; W0 j; |; ?% ] I7 Q5 D
part := @.transpOrder;& u4 ?! _0 t- r7 Y
part.move(@);-- load part0 S0 Z% g; K5 o, O
@.CurrIcon := "load";4 \) q8 {. Z+ O1 }0 [
GlobalDistObj := part.globDestination;5 ?/ N- r: B ^( j4 y
assignLObj := rgmanager.rgAssignL;3 w, [1 N/ G# {+ b5 k3 {. l
row := assignLObj.getRowNo(GlobalDistObj);
8 A: i w5 k6 M4 j* r8 O if Row = -1 then -- since 70/ I' Q6 L Z, i2 @8 v( _3 a
if lan=1 then
- Z1 e3 W8 y- ~) R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. |1 x7 s/ R2 X) N) Z
to_str("in der Andockstation: \"",?.~.name,"\""));
) O5 A$ [) G t+ n+ ^. ~ else
/ Y n4 D' r5 B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 G$ d8 z6 c7 [1 D1 c, i3 m& W
to_str("in docking station: \"",?.~.name,"\"")); 3 h8 L7 n0 w1 p
end;0 I* r5 E$ C( F
else
$ M# A* Q! e* t @.Destination := assignLObj[1,row];
# i8 Y$ o1 r! i' f/ k8 X# C9 H6 \ end; 2 b4 D, a9 I3 C5 g6 W7 p
newDirection(@);: i! ?# p7 C7 f, b6 |# s
@.HasOrder := true;9 L8 `* j; J! P) I% f5 m
end;% F1 [% T$ e6 [0 F# k
end;5 h$ C* f& F1 [ j6 F5 w* i. Y
end; -- of the method
# y& {& ?/ ]0 Z& K5 b$ K( b |