/* called by: entrance ctrl of the object 'track'& ~! C$ C x0 G1 O
*/% H1 _5 {6 I7 |( _( B
is' k3 V7 i4 j! W7 m6 Y! o: { K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 I9 o( ` j( h
do- j$ u/ e# [ K' V: S3 A, C' O
Lan := rootfolder.Internal.Tools.AOLlanguage;- m, }- @. y/ `: H
if current = @.Destination -- else return
& B- L. x2 f! c, h9 N4 w then
1 Q- Y% x* [' l" n0 m @.Destination := void;: E+ O+ ^; |2 @5 Z7 W" J( E. r; A: X
if @.occupied then
1 Z3 T" u& C7 P5 ]3 [; C7 ] part := @.cont;! [' ]8 Q2 A( u4 _
@.transpOrder := void;9 k3 n; l7 }* a) t! O( S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 C* V% w# o7 u2 T
@,root.eventcontroller.simTime);" w# y% o. P' v \
@.HasOrder := false;7 E: ?/ b/ W1 L* |
@.DrivingHome := true;
7 |6 e" @5 M0 z, I! }4 E- f rgManager.tryToStartTransOrder;
- `! h W% C* E7 M W0 p: P) Z( y if @.Destination = void
, z% `1 y) X; G then -- no transport order for vehicle @# S3 r- w) P, n
@.Destination :=! B% ~: r" D1 H
rgManager.nearestFreeStation(@,track.~);
! d: ~' m, c; O+ S/ s! s newDirection(@); 6 M. z8 k3 s9 u! ?4 N
if @.Destination /= void then
9 D W$ |+ `, ~% y; G @.Destination.NumReservation :=
, j; d4 A; h) q: S* I @.Destination.NumReservation + 1;
: R/ N1 R. l, f- @+ I end;$ `1 K- L( @( N3 D( N6 H- N
@.CurrIcon := "drivingHome";5 M5 U* M/ t* q. n
@.DrivingHome := true;
! Q! i) L% L- a# E end;
( a. }, W" o: z, n( K6 r2 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ I2 f4 a8 [0 |6 e; J8 U: S
part := @.transpOrder;
m7 f$ m3 w2 K( Y! n part.move(@);-- load part
0 w: y3 N- |" j @.CurrIcon := "load";
% g5 u( b2 a1 b5 q0 q; Y GlobalDistObj := part.globDestination;5 C- I* {4 [# G/ `4 X* h* [6 G
assignLObj := rgmanager.rgAssignL;
3 f6 E! u: }3 [" {/ t# P o row := assignLObj.getRowNo(GlobalDistObj);+ U o' ^& [8 Y, X" g
if Row = -1 then -- since 70
" o; X5 L; ~4 r2 o, {7 h! M if lan=1 then8 f: a' ~( Z, d. u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 Y: \: g" D# G8 _ to_str("in der Andockstation: \"",?.~.name,"\""));! H' _7 ~3 X9 Y4 `* n' Q0 ~
else$ c* |. p4 k! c c L$ Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 ?! ?) P, h% L- h6 E0 N' w to_str("in docking station: \"",?.~.name,"\"")); , y( T7 y3 j, l/ Y" J' l$ J
end;7 p/ | _2 N! W7 U3 n
else
. ~ i- ^% i w, U% o @.Destination := assignLObj[1,row];& F$ i+ c! K) q% ]
end;
8 u1 I$ q5 n/ S8 { newDirection(@);
" _1 P- f& N3 N: ?! h7 B9 @3 y @.HasOrder := true;
! ^# O% n8 p. j/ W& L, {# G. u end;3 q9 {4 q8 i0 y. S7 {, O
end;
3 M" A" D8 J6 ` qend; -- of the method
* g( z; H$ [" ?9 i( k: C) U |