/* called by: entrance ctrl of the object 'track'
, S& |* x! G d/ n7 X+ L*/% v) W- _+ V* R. t
is
% @" G8 T' E8 K( @2 O, I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- n7 N" x; v2 `- X7 x n1 P- Ado+ k, B/ @& x+ d: l2 U' S
Lan := rootfolder.Internal.Tools.AOLlanguage;" E7 h0 E" L" y% h
if current = @.Destination -- else return8 e1 |8 M! n: M7 |! S! l* l
then
% f) e: E3 Q, B, D* Z4 ]2 f @.Destination := void;
7 G. k) o$ `. e- h1 \( [8 W! Z if @.occupied then
" o% I B" z$ n2 ?) {& n part := @.cont;; Q# f& O* U; ^$ e* b4 v
@.transpOrder := void;
6 N" n9 f% h( g P2 J/ e. o. l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# K9 ?& ]& y7 r5 z5 | @,root.eventcontroller.simTime);) o1 |7 ] X+ m: h: E
@.HasOrder := false;6 c! i/ ?$ A# u _! D
@.DrivingHome := true;' G% P# z) u5 t6 |+ b4 L( u
rgManager.tryToStartTransOrder;$ u) k6 }# {* I: n3 A5 }
if @.Destination = void
4 L6 G. t6 ?0 p/ y then -- no transport order for vehicle @$ g. w. T& S3 [' A, Q" ~; y; e
@.Destination :=
+ Y+ C9 W6 n: W( X; ?3 [1 z% z: W rgManager.nearestFreeStation(@,track.~);
; t; Q& {$ d, V" X4 Z l! ^ newDirection(@);
* R. i0 h% s! U+ l0 W9 h7 _ if @.Destination /= void then
* }. r- Q2 [9 Q5 h0 x3 z. n$ d @.Destination.NumReservation :=
+ i* j; B$ Q+ T; ]* A" ^. U @.Destination.NumReservation + 1;
. ~8 ^/ x- [3 z. F* B end;" m' H2 N! f. W4 u' g1 `
@.CurrIcon := "drivingHome";) g! X0 k- I4 w! I9 R/ D0 H8 ]
@.DrivingHome := true;1 g3 x5 J$ c# I) b5 h
end;
- W4 e% g+ R( h6 x$ r w, } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 M R; |% e. o+ T: m% s part := @.transpOrder;9 V) u8 Z) T1 v8 ?8 H
part.move(@);-- load part' u/ X+ j* t( ]; a0 g ?# ~- W
@.CurrIcon := "load";1 z0 \; Y! @" ^. s
GlobalDistObj := part.globDestination;
9 d# C4 G z4 D$ }3 ] assignLObj := rgmanager.rgAssignL;
* b0 j" i' U5 O6 P; U( m) a row := assignLObj.getRowNo(GlobalDistObj);
; c2 ?1 j" U k q) h if Row = -1 then -- since 70. @6 S0 S% R; m' |: m0 l
if lan=1 then
7 G8 r7 c0 S! r5 O7 S& y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* i9 H7 d9 ~, g2 \6 H. Z* q2 k( J: Z
to_str("in der Andockstation: \"",?.~.name,"\""));9 ~. t* ?. ~& t8 U
else3 X |& D9 Z0 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 J' y$ N) {0 v; a1 c. W; o
to_str("in docking station: \"",?.~.name,"\"")); ' h9 T3 U. K: j0 L0 j1 g8 [
end;& {- j0 m+ q& q! q5 D
else
9 J% z3 C7 l* s9 \ j& ^: J! v @.Destination := assignLObj[1,row];
0 I% z0 @; a. W/ c7 P end; - x% B' L# m8 l) ]6 X3 a2 Q* D
newDirection(@);
0 g+ {- `* Z+ h& G- ^% C. x$ I @.HasOrder := true;' `6 S# {6 @0 K* s* Q# a
end;
5 Q* n; v8 J* _& o+ g$ u. v end;
7 E1 W4 L8 q1 E& M) Nend; -- of the method }0 S3 b1 i# m+ \6 n0 w4 ~2 P
|