/* called by: entrance ctrl of the object 'track'2 \0 C* _6 X4 D0 R# J/ h. W
*/0 w% l" y6 v9 }( Y) }9 D
is
& X! |; [) c2 Y, L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# x0 i: f6 a6 x, W: R7 @% Rdo
$ [2 ~! }% I8 r1 R$ I1 J$ w+ j; ] Lan := rootfolder.Internal.Tools.AOLlanguage;
! x4 }$ f% i$ P3 I4 X0 x; E4 g if current = @.Destination -- else return
; G% D4 Q' \" A7 H1 o* Y* H then
% m' L- M: y% N* v# O, H9 D @.Destination := void;! {2 s1 _3 r8 g6 `6 Y& P
if @.occupied then6 J4 B6 p% B* D8 k$ ~% v% x, N
part := @.cont;
/ Y- ]' i0 m% F L' w; `! C @.transpOrder := void;
2 `: c3 p$ n, O1 B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 G6 D3 I S5 b; |! n
@,root.eventcontroller.simTime);
! f% Q8 u9 w2 c$ K6 K; J3 o( K @.HasOrder := false;
+ c# t9 Q% O6 a @.DrivingHome := true;" |) o. ^1 a% G& W2 a ~! t
rgManager.tryToStartTransOrder;* K3 y: T4 Y# O# ~( f2 s# c
if @.Destination = void
" R# z8 K$ Y8 z: J then -- no transport order for vehicle @2 m$ D6 o/ Y7 e* {1 ~
@.Destination :=
+ y$ f" D! h! r+ O3 R rgManager.nearestFreeStation(@,track.~);
* k# H1 r, R( u1 `: d newDirection(@); b4 m% O* L t; }5 \- C. y6 r: ^
if @.Destination /= void then
5 E, X4 o# N# ]% u @.Destination.NumReservation :=
; w) c5 Z l, [9 r& r: e: {. E @.Destination.NumReservation + 1;
8 ~; G: g3 z* O0 `; x end;# h7 D7 O% Y8 E7 z# \0 D
@.CurrIcon := "drivingHome";2 D# x# [ ?+ n. ^
@.DrivingHome := true;
4 J% V5 Q, i5 i4 w& e. z4 v end;+ H* B" _4 V0 d% |- c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# O6 L v( V# z' ?3 g
part := @.transpOrder;$ |5 W" o& k1 x# m
part.move(@);-- load part
1 I x. {7 |( |$ O @.CurrIcon := "load";# a7 y; |" i6 B, r5 p6 C! v# _
GlobalDistObj := part.globDestination;
, d8 X+ |0 p/ z. X- N assignLObj := rgmanager.rgAssignL;
I; W- B7 b3 e7 d# }5 a( r: R row := assignLObj.getRowNo(GlobalDistObj); p2 I% G \- c; {
if Row = -1 then -- since 70' r @: c# R; l
if lan=1 then7 c, F$ [- g/ ?" C) ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 @ ]8 J z+ r- |" i
to_str("in der Andockstation: \"",?.~.name,"\""));
$ J6 p, a, p3 `" [! @6 Q else
9 |+ P* G9 K2 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# o! L! W$ N3 t# Y# h: U+ T to_str("in docking station: \"",?.~.name,"\"")); : n1 P6 {. T3 q& H, @& E
end;" q I7 T1 a. w) J
else
: [4 D6 U/ H- F7 p7 Q+ q @.Destination := assignLObj[1,row];, r. d+ L! K- O2 x
end; C& r& ^8 h7 [2 s7 c: k
newDirection(@);
) m8 y, ?- M5 C8 E8 _0 M+ s @.HasOrder := true;
# L* @4 c( K# p4 Q6 v* B end;* o4 U. ~, \& s
end;
8 |$ U% k6 z$ m/ b$ b! K2 ?" c: W% dend; -- of the method, ^2 \1 S/ t/ V$ |' ?% w0 Q
|