/* called by: entrance ctrl of the object 'track'3 N$ Y, k9 `. f7 Z0 P6 Z8 p
*// t4 {, A ]; R
is1 B, L( ^3 n( C7 j6 R. {3 M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 N0 _5 L' [" `0 [7 V
do
! c- H7 F3 D& \5 Z+ |/ i9 l: P, t Lan := rootfolder.Internal.Tools.AOLlanguage;
/ g' q. v) P" Z0 B9 j0 F if current = @.Destination -- else return5 Z7 t8 [# B7 L
then
/ l9 a+ u9 b9 ^ L# E @.Destination := void;# ?5 g$ ]- _& V1 ~; F
if @.occupied then
' D- g6 F- o7 V5 L$ m, D# F! Y part := @.cont;: _' R2 L1 o b3 _! O/ _6 _
@.transpOrder := void;8 j, J q, @3 [& Y. X, f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# B1 ~3 s! w$ i: ]8 D3 r @,root.eventcontroller.simTime);
/ J5 h# H7 y/ @& u O# M @.HasOrder := false;% f9 w2 Q% Q' ^, p/ ~3 M
@.DrivingHome := true;& x1 Z5 ^# J3 g) ^0 F* |
rgManager.tryToStartTransOrder;
6 T0 d6 r7 v# g; O if @.Destination = void
2 ` C$ a( D2 u: a# H then -- no transport order for vehicle @
, ~& R9 `0 X$ J9 j @.Destination :=( w7 m3 D' v5 `' D
rgManager.nearestFreeStation(@,track.~);4 D) v/ f1 W4 o1 i/ E0 B$ U$ J: l \
newDirection(@);
0 R+ g; C3 ^/ Z7 W9 T- i. o" R! G if @.Destination /= void then
8 f% W9 X$ C$ \$ e; |/ j) z7 M @.Destination.NumReservation :=& G8 g3 N2 w! ^" s# O7 H
@.Destination.NumReservation + 1;
/ ^6 r5 y% m- m3 Z: j* Y end;
+ {6 f7 y' d; V @.CurrIcon := "drivingHome";
+ M/ c1 m7 ?1 h2 Q# B @.DrivingHome := true;& q$ {8 i9 T8 {& M6 @
end;: {1 ]! P) j6 \+ |$ J3 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 w' U- T" J3 Z( l part := @.transpOrder;
) A& q9 p0 t% p& j( K3 I' C' { part.move(@);-- load part3 }8 z# F3 y" o7 F- T
@.CurrIcon := "load";
0 x/ ]) I, C: l5 B S9 f GlobalDistObj := part.globDestination;
( i6 j- B5 p' r' N# T- D assignLObj := rgmanager.rgAssignL;
, W$ T; z5 O j2 U0 r, ?9 _- J row := assignLObj.getRowNo(GlobalDistObj); [6 e( y/ Q2 c: ~% c1 [) ^
if Row = -1 then -- since 70
- k. U( Y7 z$ q# E if lan=1 then
$ k0 q8 R7 w" y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- M- s: N$ u X2 X" p3 \( O5 T. A6 [3 F to_str("in der Andockstation: \"",?.~.name,"\""));
5 A( `3 W) }% c! `- ` else
! V. `# O7 s$ P k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ K8 N% b6 `5 M/ \ to_str("in docking station: \"",?.~.name,"\""));
$ V% t4 o, ~7 v8 G' v end;
" {; I4 ^, g0 j else
E0 z/ ?5 ~6 `- |" [1 }, L- R @.Destination := assignLObj[1,row];4 h# w& |1 v+ I7 w, O. f9 W; `
end;
/ |0 \; Z, @$ V' ?" M _; m- i" I newDirection(@);% k" p3 M2 O% }' P
@.HasOrder := true;
+ t( l6 T3 a7 t1 S9 V end;7 u$ Y9 P9 I! j+ r$ x' d* X
end;% c+ U' H9 F! u& m2 {8 M
end; -- of the method
, b* j- c& R9 ]* s! T: @ |