/* called by: entrance ctrl of the object 'track'% \3 k# M- P# t+ S1 I
*/
1 _3 E4 m5 I# h9 E) dis6 ~0 ?6 n4 Q' x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) m, x! N) J5 Z/ w [/ wdo
- x/ H+ N- c3 b( E5 t Lan := rootfolder.Internal.Tools.AOLlanguage;( R8 a( p$ x( ]1 D
if current = @.Destination -- else return
$ i- H( A2 i$ O then4 c M' s+ F( }& s
@.Destination := void;
- N7 N/ G% T, L: h if @.occupied then
, a0 X9 L6 g2 [: x" C# R1 X9 ] part := @.cont;$ |2 Y$ F8 \/ e
@.transpOrder := void;2 h* s& j2 Z! B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, J$ W! u- F, Q5 O! ^9 ~ @,root.eventcontroller.simTime);
* F1 Q2 } j. {! k" F W" `" c @.HasOrder := false;5 L& z2 X! Z3 W( ^! [2 d
@.DrivingHome := true;
1 J3 C5 @% f$ Y2 _! q rgManager.tryToStartTransOrder;
, b7 I; l4 K [* e' _/ X+ }; o if @.Destination = void
- s# n1 V0 E' X b) ^# R then -- no transport order for vehicle @9 S$ L+ U: C! x( o/ @
@.Destination :=
+ U7 M0 B0 H8 S5 L, w rgManager.nearestFreeStation(@,track.~);$ ^; ^; T$ }6 a0 a
newDirection(@); 5 o i, N% h# K$ D! Z
if @.Destination /= void then: W6 | m$ [4 Y" V! D
@.Destination.NumReservation :=
: I4 z- C3 O- H! t) D, H5 G) ~ v8 y" r @.Destination.NumReservation + 1;9 Z$ \6 q9 ~' }4 p6 J1 x h
end;& E- h. S' l* Z+ U" N2 E5 Q
@.CurrIcon := "drivingHome";
, H [# l, T& W: O9 c @.DrivingHome := true;
6 N, S' h0 O4 |& C, K0 _ end;
( G' T- U" M7 X" ~2 }- v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 A6 \8 K# n, a# i" e3 W- L2 b/ ` part := @.transpOrder;
* j% s8 V: c6 `1 n6 b! ^ l- l& f1 f part.move(@);-- load part6 b1 k6 _3 m/ n/ J( ]; n
@.CurrIcon := "load";8 a# Y6 `+ D) f: F/ E8 _- c
GlobalDistObj := part.globDestination;. ]. S9 N) M/ r% ~0 o
assignLObj := rgmanager.rgAssignL;
$ i! b {+ G) R0 T+ E4 W: W row := assignLObj.getRowNo(GlobalDistObj);$ P7 V1 j3 {, U: `/ n8 x# s
if Row = -1 then -- since 70" j! U7 _0 r3 f
if lan=1 then- X# D* O# B# u% @8 g$ p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- R% M$ ^/ N" z8 x
to_str("in der Andockstation: \"",?.~.name,"\"")); t2 f# A5 `/ |. V, ]' H
else; \( A5 [. v$ g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 |, M! f& g+ ~6 k$ ?! ~1 G to_str("in docking station: \"",?.~.name,"\"")); * O+ y2 R6 U! ~
end;% ]$ O, b7 F- _/ h6 j9 P8 M
else
! O# V1 H b& y2 I- z! J @.Destination := assignLObj[1,row];
[" w' @% i* _2 r& J# [$ H end;
1 k% G' ^7 V7 [- B( o% h' J7 I3 { newDirection(@);" `; p' K/ y7 V x
@.HasOrder := true;) I9 q3 j- v6 M& U+ g
end;
3 f7 K( V9 o: i3 r8 u end;
/ A; q! A) w# C0 H" i( q$ f3 ~' Zend; -- of the method
9 O) g& P. s; p; V% R1 q( P; E1 [4 R% T |