/* called by: entrance ctrl of the object 'track'
e3 g% j8 {$ B6 _8 p9 K, [*/8 @: L A- j: y1 }) M
is
6 E) k8 q+ p5 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
e5 M+ t: x& d5 ]) s8 N2 Gdo, E5 x) L! g$ w
Lan := rootfolder.Internal.Tools.AOLlanguage;
% A- Q* l2 R# t# a3 a3 f if current = @.Destination -- else return( z$ S/ d& V# ^0 \! e
then8 ^2 o; z4 i' T* e4 J0 a
@.Destination := void;
2 t4 M' q8 l8 d if @.occupied then
; ?: e# h# U4 S4 q0 v; v! J3 I) x5 [ part := @.cont;* B$ V5 G" B/ C! g' I! W4 w+ x6 q
@.transpOrder := void;
; Y5 x# Y! ?8 D7 S: ?* ]! ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' l7 g/ J. B# a, G6 @3 S6 V
@,root.eventcontroller.simTime);. O& G1 k- b8 D Q2 V7 E
@.HasOrder := false;) `3 P+ a9 k! T
@.DrivingHome := true;
i' U. `/ R6 ?- q$ B rgManager.tryToStartTransOrder;+ _, ?7 R9 w! m" [; d
if @.Destination = void Y+ @+ ]& s4 u
then -- no transport order for vehicle @& Q% P1 ?, ]9 ]. n. g/ M: z* P
@.Destination :=
0 ^ {$ F( b' I- Z rgManager.nearestFreeStation(@,track.~);' ?# X" q3 x& h5 p
newDirection(@); / q2 ^3 Q8 C( \& b5 k3 S
if @.Destination /= void then
]3 Z; }. a6 } @.Destination.NumReservation :=
! S% F0 I T1 Y1 x' ?7 S: p @.Destination.NumReservation + 1;
, |; n8 c, F+ ^ B/ Z end;: ]- s0 u+ E8 T4 S
@.CurrIcon := "drivingHome";: r3 z3 J. v0 R
@.DrivingHome := true;, c7 V" C8 V4 [0 @. ~8 r/ d: k
end;
2 }/ d( m% l' f `# s) g else -- the vehicle @ is empty, both vehicle and part are in the same dock station* `9 b2 {6 `0 T9 A3 {) V) ]
part := @.transpOrder;
8 i/ x2 O: \; U part.move(@);-- load part# N) j' ~' N- a l% R1 @# k9 p
@.CurrIcon := "load";) B& ^; T% m, X7 E! S6 O
GlobalDistObj := part.globDestination;
) e5 I9 X" ]1 v! ] assignLObj := rgmanager.rgAssignL;/ Q% h8 y4 @2 p
row := assignLObj.getRowNo(GlobalDistObj);
& I4 t6 C% ]3 a5 J9 i( S if Row = -1 then -- since 70
4 G U0 i) Y: C4 N) W9 v if lan=1 then9 ?/ J* e* v8 v. B9 `0 r% [9 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( S" _6 |4 E* U8 @" s3 u; u
to_str("in der Andockstation: \"",?.~.name,"\""));
3 i" y8 g8 \4 Q: W( O else
+ Y F4 L7 c0 A4 X" S/ S0 }( T( W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 e @- k, B+ X" _% i9 f to_str("in docking station: \"",?.~.name,"\"")); 9 j* c7 g3 d1 [! P
end;1 x6 T p/ k) Z* M
else9 Z( x6 u+ g0 \1 s5 }; M/ i
@.Destination := assignLObj[1,row];+ H& Y- E( R: O# Q8 Y" _- S
end; 1 `) b0 ^" S4 w" X7 ~3 X6 l
newDirection(@);
0 L* @5 K" h8 n1 j: C! z @.HasOrder := true;* ]8 x* A. d6 ^' l$ B
end;; T# B' n& t9 s0 _# A) P
end;
$ ^) V! \& q" I9 n2 b, x( m7 Kend; -- of the method+ {. h( ]! c- [2 J+ U f: \8 U
|