/* called by: entrance ctrl of the object 'track'
& T1 V( G) @; D+ L" E6 U: v*/
/ {9 b' e* G7 Y* z4 p- ~0 `- dis
- A, D0 Z) _0 e+ B& Q$ q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( S( E4 q& F/ B, wdo
& w2 F- }( i* q7 m% [7 A Lan := rootfolder.Internal.Tools.AOLlanguage;
& P w7 j, r2 ?# @: V if current = @.Destination -- else return( o7 K0 o' ~$ Z- S: A9 k7 d# ~
then
) R" y' X. a6 q @.Destination := void;! X& V* B: D2 Q
if @.occupied then. `0 k, C$ r. X6 E
part := @.cont;
6 n# ~$ d* b8 _6 X @.transpOrder := void;
% V7 N0 f* R! h# ]3 { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 @% F6 q' d0 m Z0 p& K
@,root.eventcontroller.simTime);! d& Q4 w" H2 z0 u- `. f0 E3 k
@.HasOrder := false;1 l+ Q7 X4 {% l6 j, j
@.DrivingHome := true;
; E1 t, R c% Z; q0 K' F rgManager.tryToStartTransOrder;
6 {) _8 E0 P) z5 s if @.Destination = void
6 Z H8 Z# d& B. P4 s then -- no transport order for vehicle @
3 X r% t7 y0 O$ W9 B @.Destination :=' ^5 o x" B1 m0 D9 U
rgManager.nearestFreeStation(@,track.~);, T! o& F" c& G4 {
newDirection(@); ) w. P% L. H& B/ U! d0 ]; e; G
if @.Destination /= void then
6 M' P/ o4 @& e- z @.Destination.NumReservation :=
, _) N7 L6 d5 k' { J @.Destination.NumReservation + 1;
, _% X+ l6 o& M: T9 h end;
* k% C; {1 t% k4 m @.CurrIcon := "drivingHome";; a( j- j# ~8 W+ L$ e5 ^! K$ k
@.DrivingHome := true;1 r$ C# {9 ^( W0 `3 j: b- y
end;0 p8 t* P: R# H/ M2 L, H% S, |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ i7 Z$ s: w0 t! V2 [$ [6 ] part := @.transpOrder;% `/ B3 m5 H6 _, D0 t$ [
part.move(@);-- load part; b, J" P9 }: ^- C
@.CurrIcon := "load";. J; E6 i, ?' k+ T: G* e2 a
GlobalDistObj := part.globDestination;0 M% q! Z g' w) M' R& p& Y) u0 @
assignLObj := rgmanager.rgAssignL;
. g6 ~4 N) t0 F( d" X9 t3 ~ row := assignLObj.getRowNo(GlobalDistObj);
/ ?! s2 j1 W& u1 O if Row = -1 then -- since 70
% n- k' c4 Q: X# K4 s' B if lan=1 then
I1 M$ y) e. |0 [/ r: L# z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 a5 b4 A; i! I8 S8 H: i$ q
to_str("in der Andockstation: \"",?.~.name,"\""));4 f( E4 w+ g( X T( t% K
else
@; w8 Q. ^" e/ p+ [ ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- \7 \. l! ?; w; T# _" s to_str("in docking station: \"",?.~.name,"\"")); 8 ^: s5 t6 R3 W" @, [# M# C
end;
- R/ |# z4 D2 K! `: `& e2 k4 q else% }4 ?: A8 L1 P' ?, y. Z. x9 A
@.Destination := assignLObj[1,row];3 v; u5 ]+ F$ z' ]- ?
end; 1 ?; ~% X+ o! t
newDirection(@);
* O% i& ^# J3 J' |5 E; [. J! J1 x- T F @.HasOrder := true;
( Q& i8 n/ J3 I% L& c end;7 e+ ?9 p4 I$ r- e6 B) w+ j- C
end;+ f, p+ t ~7 P: U5 H+ ~
end; -- of the method r. r& H+ q! g6 |$ q
|