/* called by: entrance ctrl of the object 'track'( p0 `7 J* P' _( k( K
*/
$ e; g: w5 y+ b% W: his
; e1 ~$ g0 L$ I2 a" j# [ ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! R, _! _2 s2 ]. J5 i( Wdo; C& j5 u/ a0 w) i7 t* x
Lan := rootfolder.Internal.Tools.AOLlanguage;: d7 J |3 x2 q7 ]4 T/ h
if current = @.Destination -- else return
# m* M- G; s4 z3 n: P then9 n8 d! C4 e% Z# M# V/ K" n, E
@.Destination := void;+ V( X0 M* l- M- C5 x4 X3 t& _; | ?
if @.occupied then B) l1 q" M, t9 L
part := @.cont;1 N% C2 @# F/ z$ R6 N
@.transpOrder := void;3 w; K9 ? M: L, w1 m$ b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" s0 |. j4 t+ I( f$ I% p6 B @,root.eventcontroller.simTime);
5 n' {8 l. d; S6 R9 l5 N: u1 R* y @.HasOrder := false;* Q) F! B$ d# L5 g0 u
@.DrivingHome := true;
( ?% i' N3 {9 v3 c+ q, g3 p rgManager.tryToStartTransOrder;! J" { `! @3 {! c
if @.Destination = void0 a7 } n/ Y) X. f" u
then -- no transport order for vehicle @
8 j+ \6 g8 K {; D, h8 f, v; C4 L @.Destination :=
1 J$ E5 z9 B* e2 { rgManager.nearestFreeStation(@,track.~);6 q6 e: k. Z- B3 }* }
newDirection(@);
( {( a( r$ Z6 H& ]) v5 d( U if @.Destination /= void then9 S( t5 O) [: ~% f! ~
@.Destination.NumReservation :=
7 C; N/ M( U1 z* n1 u @.Destination.NumReservation + 1;% u$ z8 |2 X- u, W5 U2 P) t+ m) S
end;! v) x& C# U6 S! g3 O
@.CurrIcon := "drivingHome";
m+ a `: g1 V( x7 b- H! p @.DrivingHome := true;! q S* ^5 {" i @
end;7 f# ~1 \( Z u1 `+ O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 Q) o# \9 A+ E# J: E- t part := @.transpOrder;
/ U6 m% i h: V part.move(@);-- load part
( q5 Y0 _2 U! K; `1 w; W" X/ E @.CurrIcon := "load";8 {# e5 f2 u3 @, x- M* V$ b- c$ H+ ^
GlobalDistObj := part.globDestination;
3 `9 L4 S8 G+ r2 U* c2 t, `" D% ]4 r assignLObj := rgmanager.rgAssignL;7 X, s. i1 x" O4 @' r/ Y4 }
row := assignLObj.getRowNo(GlobalDistObj);+ k3 p+ [& }3 z+ P1 v6 F
if Row = -1 then -- since 70
7 k% H' M% B& k+ d if lan=1 then0 ]* w6 ^" W3 G y# q* @- T8 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! u N* ~2 ]: g1 U4 U2 C) [ to_str("in der Andockstation: \"",?.~.name,"\""));) q9 k* W- h9 g2 H
else
2 ]0 J6 @9 h( E& b5 |( o" t# S j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; [' ]5 k1 y: D+ v to_str("in docking station: \"",?.~.name,"\"")); ' Z6 c# c( Q. ?; e" G2 \) V
end;
E4 K \# J) [, ^6 w! c2 ?8 J9 x4 S; H else
. r( K+ Q5 r5 v9 ~" R/ s @.Destination := assignLObj[1,row];
) j' x/ a0 r+ Z* P( T* W end;
# S! Y# k" ^: O/ c/ q. W$ |; ~ newDirection(@);
. ~+ n' ]+ p4 s" R6 N @.HasOrder := true;
3 e) u- ?# i$ L end;
8 f" Z) l( h4 f. q) U- q end;3 W+ `2 t8 e( N; t
end; -- of the method
" S N1 i O; \% E" `) C2 n W |