/* called by: entrance ctrl of the object 'track'
8 k! Y& ^! ~& h8 g2 E! `4 Q*/ |( r. K3 V$ C- g: N
is
0 P% B6 D/ Z0 U/ C) e1 j. o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( m0 t% c( X, ~) l5 y v( G2 y( q$ bdo
t8 j; C% i/ S' Y* T4 T. } Lan := rootfolder.Internal.Tools.AOLlanguage;; l- V1 _% `# i$ T* M
if current = @.Destination -- else return
9 E) K l9 J6 H; @3 ` then" K8 Q a7 }+ w- L! e
@.Destination := void;; ^1 c/ A3 n9 D$ w9 t6 J
if @.occupied then
, }. l$ ^" p- g! | part := @.cont;
; e9 h8 }3 r- s- f; Y" [# p+ | @.transpOrder := void;! e0 n% B4 K4 r) y1 F% H" {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 [. A6 D2 ^8 M* s# T+ ^ @,root.eventcontroller.simTime);7 O. h( D5 h% J! m2 x' T
@.HasOrder := false;
- R5 }4 {; q( C; L @.DrivingHome := true;6 m" v, M& X- c1 j* e+ {, ^8 ~
rgManager.tryToStartTransOrder;
8 q. l+ [3 I" c0 t8 \8 I8 i if @.Destination = void
9 r" e$ `8 Q1 H w0 I4 C: S. s then -- no transport order for vehicle @0 J1 [' V+ c( Y) I( k
@.Destination :=
$ y3 e6 Z% k$ v' N+ J! z" h6 O rgManager.nearestFreeStation(@,track.~);! `! s& B* }- g' W Y. b& Q
newDirection(@);
7 h- x5 @( U2 Z# H/ k7 B if @.Destination /= void then6 V/ b; n. l: O* v, W9 Z; ~
@.Destination.NumReservation :=
1 W- H* b8 b) R# s- f4 R7 J! _, u @.Destination.NumReservation + 1;
+ E1 `" I) H# T. U! {! f& t. @ end;! r+ `) C% G+ V9 r
@.CurrIcon := "drivingHome";
8 ]$ r: p K- m1 {9 n4 g: ^& N7 S9 \ @.DrivingHome := true;
! o; _8 r d4 F8 C7 x+ R end;* N- P" Y0 c. [/ k* u9 E2 T; H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 H# j+ x" k. I$ v. r7 ]9 q
part := @.transpOrder;1 j$ F( R# i) B# u+ ^/ V* Y
part.move(@);-- load part' i1 ^/ p- {2 f9 Y8 ~
@.CurrIcon := "load";
' j. s: P7 ^* z& W* j% b* o GlobalDistObj := part.globDestination;
; U9 A: i5 Y! p% u6 C, a assignLObj := rgmanager.rgAssignL;
: {* S5 V E) B. e row := assignLObj.getRowNo(GlobalDistObj);
4 q3 c" Y4 H# q+ A if Row = -1 then -- since 70
* E) U0 V% e+ \ if lan=1 then
) ~( x/ l4 `7 D3 C: M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), d- Q7 P6 C- L. I; x, ^) a
to_str("in der Andockstation: \"",?.~.name,"\""));
' M+ \* @8 w! V else! J x8 S/ U; W0 @* d0 ?2 B5 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ z2 p. C5 G) K( r1 K( {+ i) d) z
to_str("in docking station: \"",?.~.name,"\"")); ! ?8 S0 D- o# S
end;
- Y% U9 C8 V7 M, n( i else. [# F! l3 B4 X9 D) ^% S6 J: _
@.Destination := assignLObj[1,row];2 {4 Y6 T: ~+ q$ c1 V) U
end;
5 r' `( t$ V8 R- M7 l8 | newDirection(@);* c6 o9 H: o- b1 z6 n! H
@.HasOrder := true;
& Q% S2 p9 J1 R( N3 } end;
/ h+ `& ]( C5 q! S# R end;
8 v9 w6 {, j( }6 U8 Send; -- of the method
* \3 T7 q" d% N& s8 k5 q |