/* called by: entrance ctrl of the object 'track'
6 k/ q5 z: ~0 p7 `: g9 q*/
9 Q& _- }2 H. k- p! p Ais: F/ E$ `! P" [$ m6 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. C) d: I8 U' R Vdo$ B; E0 Z$ A+ ~0 M, G
Lan := rootfolder.Internal.Tools.AOLlanguage;6 K7 |& d7 d M5 j/ D# {+ k
if current = @.Destination -- else return
* n; G6 B9 h' @1 G3 Q then6 U; k% m3 ?" j7 ^0 O
@.Destination := void;* O, m5 d# |* ~- y/ g1 Y
if @.occupied then7 q3 i% e" T; J0 c# I1 _
part := @.cont;1 f. t( ^' e q% v- S/ S h
@.transpOrder := void;& s8 s& _2 @2 v8 h5 X6 {9 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Y& U0 Z' s* q6 J
@,root.eventcontroller.simTime);
" K4 ~7 m% e, I @.HasOrder := false;3 p+ b) z3 J* A- M8 f6 x9 Q
@.DrivingHome := true;
6 J( E; n* c0 `: \ rgManager.tryToStartTransOrder;
7 M1 G: Q, `" s5 C" } if @.Destination = void
( \2 t b9 U+ ^5 ]1 m then -- no transport order for vehicle @ d& Q; c( V- ?5 y7 G$ e
@.Destination :=0 v: {( k' W% I% P
rgManager.nearestFreeStation(@,track.~);
" Y5 M* P- q% s, S' B newDirection(@);
) [; Z( C% f, t1 Q if @.Destination /= void then1 b1 S( b, X! P+ s
@.Destination.NumReservation :=- n' |& J" b" c) ~; c
@.Destination.NumReservation + 1;9 N! f9 J2 ^0 L9 B( @
end;# ~, [$ A. n# m* w
@.CurrIcon := "drivingHome";* l: P$ g( g& w/ I$ O
@.DrivingHome := true;0 L7 \' P0 O: r/ |
end;) r- q# }' w. c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 r2 f, P8 E6 t# `( B3 D' P; q part := @.transpOrder;
1 T- {) z+ d* ^9 Z part.move(@);-- load part
6 \( h9 v# A/ I8 F+ ^, J& u" C+ ^& n @.CurrIcon := "load";
0 W- v" {6 I+ g { GlobalDistObj := part.globDestination;
; \5 t; U$ F6 T, a+ X; d assignLObj := rgmanager.rgAssignL;
' _9 P6 X3 x* A, ^ row := assignLObj.getRowNo(GlobalDistObj);
( J4 Q3 I% @+ W$ \- _ if Row = -1 then -- since 70( p- G, H+ d9 g8 P1 L1 P
if lan=1 then1 s( |" n2 e' O6 m+ c! j6 V# i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# q/ a# O) Z- j, L( b
to_str("in der Andockstation: \"",?.~.name,"\""));6 }$ Y) ~! P$ T2 N" I+ w1 i
else
4 ^6 R- P0 X; V: F1 m* x0 S' P. Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! `, B6 l0 F* B4 E- R! V; n1 | to_str("in docking station: \"",?.~.name,"\"")); 4 ~& ?( Y4 Z+ B2 b
end;
3 ]+ ?8 p6 y6 h( ]3 M else4 Z0 M) U0 ]$ ]& F
@.Destination := assignLObj[1,row];6 H+ p8 W1 l. }" u. z9 I% C
end;
1 `0 l! ^% k8 b% n newDirection(@);
' g# D* D% b M8 ], j5 e3 R- m3 N8 w @.HasOrder := true;
1 w# O4 V* u. ~! Q! ?& } end;2 d- H4 Z8 L) r2 B7 T
end;
$ t7 m* d& C3 `. v2 `5 ]end; -- of the method
+ T4 O* V, S/ c. |/ a |