/* called by: entrance ctrl of the object 'track'/ W" O! f& c: d3 S ?6 c
*/
9 C/ @) o0 \& d0 Y) N* eis7 s5 N) r4 Q) s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 Q0 X/ [: |+ r" ^3 E0 X. o4 Q: sdo
( v5 A5 E% r: s Lan := rootfolder.Internal.Tools.AOLlanguage;
0 @- H1 v9 `$ u& D$ \/ W, ^1 x if current = @.Destination -- else return
0 Y5 o' [& y8 Z% X then7 K: ~, F7 Q3 k, l6 t
@.Destination := void;( ^/ x6 B+ T. R+ x# h1 d# z* I
if @.occupied then. L7 c# H' m4 U
part := @.cont;
. s/ S, U8 {8 D g6 d @.transpOrder := void;
; X' F6 I8 b) n7 a$ A# S x' E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
I l2 s# C2 {2 [- L; Z! G @,root.eventcontroller.simTime);# c1 q- L0 x' T1 x
@.HasOrder := false;! m5 v) Y+ ~ L; P3 R7 P8 f
@.DrivingHome := true;
$ N0 J+ U6 M+ U7 F/ F rgManager.tryToStartTransOrder;
6 @: k W! E5 \& p, v if @.Destination = void8 G% r I, P; \2 s$ z" o
then -- no transport order for vehicle @$ m. Q" \( k# D+ |
@.Destination :=
& B$ S" O4 F* i- G1 M- P rgManager.nearestFreeStation(@,track.~);
& L, L4 M$ M9 @4 O newDirection(@); ) q& D+ s9 A7 x3 t! N# R
if @.Destination /= void then
' h0 W3 u% \+ F F; T @.Destination.NumReservation :=
" @) X- R2 b" p @.Destination.NumReservation + 1;
+ {0 g% k5 ]5 L- ^5 l" U6 e9 W @+ H end;
/ e2 F: ~( Y. E! i @.CurrIcon := "drivingHome";+ S4 | @) l/ o* j3 k
@.DrivingHome := true;; ?& [8 K, x/ y
end;( |3 \' ^3 P* r; b! k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 a: `5 k1 b! G- G2 r
part := @.transpOrder;
' y' V$ N4 \/ m( X% q part.move(@);-- load part
# d; W1 b- O, G" `- Z6 h @.CurrIcon := "load";! v4 Q/ \9 j" J1 M' C! b* j, C
GlobalDistObj := part.globDestination;& }9 x$ j; h J/ ^
assignLObj := rgmanager.rgAssignL;
8 Z" d q/ p$ c6 {7 p; V' G row := assignLObj.getRowNo(GlobalDistObj);
% }. |- C1 F' z- c& R if Row = -1 then -- since 70) n# t& d6 b0 Y; J% l0 J) _
if lan=1 then q+ K) I1 D' w( ?' l+ x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 C7 M3 o `5 C% c6 I to_str("in der Andockstation: \"",?.~.name,"\""));7 a. a: V, t. N* }4 W
else
6 [6 `- h/ V# G, G+ Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 Q3 p7 p" S w. b: X5 }
to_str("in docking station: \"",?.~.name,"\""));
' Y _' X" _( H ~ end;+ p1 J6 X. v. y5 w2 [4 U0 x
else
6 b( [" A5 Y% _7 G4 f+ A$ I @.Destination := assignLObj[1,row];
: q4 d' f$ o) Y: d end;
5 G! K5 _9 c; o/ C newDirection(@);6 \( L9 }3 U4 L1 b: O9 } l
@.HasOrder := true;. m. n' H; O% u \( I- I7 b* R
end;
9 e0 a" M6 l8 C4 z1 r! Z end;
8 ?: C- u% [1 Vend; -- of the method
, t! K/ m# M6 m% S |