/* called by: entrance ctrl of the object 'track'* x. f$ h: t8 _3 ^
*/
' j' F4 z/ E" C" G1 gis
c6 e1 b1 `* l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ q {6 S" V9 |3 s# Wdo
. X8 t1 Q! E3 z) h# \- ^6 ^6 A4 J Lan := rootfolder.Internal.Tools.AOLlanguage;
. I! {8 A& z; L- g) ^, o3 M if current = @.Destination -- else return
3 H) H5 {' h1 H* x: a then
- E( ]( v1 Z' m3 z. a8 W @.Destination := void;$ U0 Y- i- F5 x7 {6 m8 y
if @.occupied then
9 I" q" H/ p; Q ]; k( P part := @.cont;) p9 S/ A1 }2 F) K1 b0 l# }
@.transpOrder := void;
J4 J; X1 K) Z- } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: |; z, S) G/ B3 n& h$ V" O2 E6 w3 _
@,root.eventcontroller.simTime);: I }) v" y; i- O: W5 B: S
@.HasOrder := false;/ q3 S! C" K0 a" V( H
@.DrivingHome := true;
; Y0 u7 K5 N8 B4 u8 r i0 m+ p rgManager.tryToStartTransOrder;
% z, r d5 x5 B% Q if @.Destination = void5 ]0 B3 H8 K8 w% [3 ]3 ?8 D/ M
then -- no transport order for vehicle @1 i4 l5 W _. u$ u: @& [
@.Destination :=
9 C4 K- M3 D& ^6 b rgManager.nearestFreeStation(@,track.~);
% a5 g8 y! t- }( `# S" i newDirection(@);
) |& W) R7 |) i# K/ f$ k9 I if @.Destination /= void then. M# {0 g- B' A1 S! ~* i; f
@.Destination.NumReservation :=
4 W& e3 T* j0 M/ |) q+ a @.Destination.NumReservation + 1;( u+ k9 T5 w* l' r n9 ?
end;8 `' d# K+ d& f6 x/ {2 j
@.CurrIcon := "drivingHome";3 r" j3 _; q! z4 m/ _# m+ w
@.DrivingHome := true;4 `0 u; {) f9 i# U8 m
end;
0 a) ]3 Q- e/ F. G* D6 f& Z0 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station; _2 o1 o3 i8 \ c" A( }
part := @.transpOrder;' n0 i" b) R, m% P+ u, [
part.move(@);-- load part
3 p8 W# V! B z& w! P. S1 q1 Z @.CurrIcon := "load";( O+ \; G0 |: r4 X9 l* V. V
GlobalDistObj := part.globDestination;+ l1 @$ [, p L/ U4 Y9 r
assignLObj := rgmanager.rgAssignL;6 R8 a2 l2 {7 b1 |
row := assignLObj.getRowNo(GlobalDistObj);+ q2 F% e$ e* N- c5 C9 U
if Row = -1 then -- since 70
% W& p) j9 u2 S9 s# U% X if lan=1 then
- J0 `9 f) V8 ]0 T9 t% F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! a3 ?& Z/ n2 ^0 R- c: m to_str("in der Andockstation: \"",?.~.name,"\""));* H8 ]- d% b0 m' d1 F
else# G' p1 I" j& k Z6 U* k2 i5 g; S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ~+ }8 l7 w0 o$ \2 `
to_str("in docking station: \"",?.~.name,"\"")); - j- ?' d" [) J* U
end;( y) z9 \! r! e: O1 L9 k6 @7 y
else9 E1 `' X7 I' B( o# v. n
@.Destination := assignLObj[1,row];3 k2 v& ~3 i6 D' w. `
end;
7 ]( ~ m( T8 l& V newDirection(@);0 v% f9 [9 m: p8 ~$ ~, v9 I4 [
@.HasOrder := true;
; N6 q1 D- @% n2 y$ t# G end;
1 s1 o! c( G. q5 X! t5 J) k h1 o end;4 g" d* d4 e8 @9 M4 r" w" O
end; -- of the method
* e0 ^# z, d1 e4 u; s6 d# ] |