/* called by: entrance ctrl of the object 'track'
9 w& N% s Q( m L' \/ y- p*/7 E2 R' j/ j# P
is
9 Q" v% ~" I* U: D part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 C! v5 N( I. N. t O+ m/ ]
do; c c2 @9 r. r9 Q; v+ `3 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
( {1 |! D8 L/ w$ S3 s& ?+ x if current = @.Destination -- else return
) ?2 j2 q- V" t/ j then. |7 p- D# T' V0 `. A
@.Destination := void;
! b. B- g$ j' c/ h' M5 O# [! z if @.occupied then
' J0 G3 `, [6 A7 O8 k0 Z9 Q; e3 r part := @.cont;: G4 ?5 M9 V, E; I+ @' w q' ~2 t; z
@.transpOrder := void;
0 C5 ?8 ^ t1 x! x$ B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' k x5 A0 ~( P5 v' D
@,root.eventcontroller.simTime);! d# u) [8 ^* ` R; i
@.HasOrder := false;
, o; a4 @' s- a; ^' W6 y @.DrivingHome := true;
( _ M( a# Y0 n% j/ T5 P rgManager.tryToStartTransOrder;. V& @% D% B8 y; n/ t
if @.Destination = void
3 q; b8 I: [. p then -- no transport order for vehicle @
: L' u/ p8 a# ~ @.Destination :=' u: N" U: V! D( r
rgManager.nearestFreeStation(@,track.~);
1 [* v* m9 _* h. [+ \) d newDirection(@);
7 g) c$ k, T& b3 z2 u% b' N if @.Destination /= void then+ R8 b, q* G! v+ `3 B( a' \
@.Destination.NumReservation :=( o/ N' X/ v8 A J* T
@.Destination.NumReservation + 1;" I. B8 {9 t/ M+ M! ?
end;6 K; _" `: x& D: l+ E: n; a& h: E& W# g
@.CurrIcon := "drivingHome";- e% B( z5 }2 V3 M* ?; V3 Q+ U
@.DrivingHome := true;
5 M+ a t& Z( Q7 }9 V5 ?1 z end;
( J8 O* R R4 F! W else -- the vehicle @ is empty, both vehicle and part are in the same dock station. @. T$ k% v2 [# s, v* C Y1 o' G
part := @.transpOrder;# D$ n+ S$ r3 H+ E2 w
part.move(@);-- load part. D) Z5 I c0 }% H% J
@.CurrIcon := "load";
* S3 |0 E: W! ^4 X. i4 H) f GlobalDistObj := part.globDestination;
$ V! @( e' F, m assignLObj := rgmanager.rgAssignL;
! t9 E7 h% F8 K+ s* }! O8 A) E row := assignLObj.getRowNo(GlobalDistObj);2 ?4 N+ V+ R/ c6 ]7 o& `+ V
if Row = -1 then -- since 70
8 J0 Y9 T; H3 D: `8 J; z if lan=1 then) h- v+ p# e7 g2 S" y& w2 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 y* j+ x) E8 c+ ]! y4 E
to_str("in der Andockstation: \"",?.~.name,"\""));
+ b; \1 l" e9 C3 _# d% } else
) x/ @/ G: b0 T1 m7 C. o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ^& o( `6 t% O0 G0 ~
to_str("in docking station: \"",?.~.name,"\""));
% z4 s6 w8 e& Z end;
4 {' | U) V- C) x else, m" @ n3 J6 T( U* k# I
@.Destination := assignLObj[1,row];0 F! y! V# G* r2 F9 L( E0 x
end; 3 L8 z* t( j/ z1 T$ S
newDirection(@);
& Q* a+ F2 @2 r0 w9 _( _ @.HasOrder := true;
* ^, J1 U( N E8 U* ?, t end;6 y/ u) C6 D$ P& g: d* Z4 m
end;
/ B4 A9 c4 s, e6 p- uend; -- of the method
. @' J2 ^- {, b* z |