/* called by: entrance ctrl of the object 'track'& p2 Q1 ]' c7 d2 O f
*/0 Q, _ S1 r/ j: B. W' [0 P6 X
is
: d: t- f* H$ C3 e+ M/ Q$ Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" a! I6 X5 @, r6 F2 A( udo$ n6 d* [' } C6 N/ I z
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 [. u1 j8 N! E4 N( r* ?' ? if current = @.Destination -- else return5 \0 H4 L+ x( c" @/ ?' C. ?
then
% |* J! j3 h2 }6 @8 L6 F- T( q0 T @.Destination := void;% L+ ]: u1 V" X0 L# ]# U1 g1 Z
if @.occupied then9 H r3 k1 M1 e8 m
part := @.cont;
, M* W# f' ]5 U+ Y @.transpOrder := void;
" a6 p# F1 f0 Q3 X; D3 X6 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& V: D8 _/ ^; Z$ L& x @,root.eventcontroller.simTime);
6 d# g* z' c) e" ]: w @.HasOrder := false;
. Q [& h$ e- A# E) } @.DrivingHome := true;
- r0 z3 |' Y9 ^ rgManager.tryToStartTransOrder;7 h0 D) h* i0 X
if @.Destination = void) Z- E' n+ O& K6 T
then -- no transport order for vehicle @% x- O# z# Q6 Q" q1 _2 [6 E
@.Destination :=: a. ^1 {% K2 ^; w% d
rgManager.nearestFreeStation(@,track.~);0 s, b3 F+ W$ G8 p) w. c
newDirection(@);
" J" P/ e- K7 K7 B$ ^& [/ k3 z8 N; E if @.Destination /= void then7 k( p! w: k- n! k8 H
@.Destination.NumReservation :=
$ L- r0 m( Y# Z0 q4 \/ S k# \ @.Destination.NumReservation + 1;
$ l. I( A% A, b) q+ Q' ~ end;' [# K9 K( s; l0 S% L3 s' i' I1 S
@.CurrIcon := "drivingHome";
( @0 q% [1 v( [* ?0 W @.DrivingHome := true;# ^, M$ h+ O; n0 V# M
end;
* w) {! a: s) h( U. E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 G9 y* p. ~% M# G part := @.transpOrder;
$ f* \; v5 n& C: }% K- O part.move(@);-- load part
* {/ W/ l! }# E8 p9 c @.CurrIcon := "load";: x" s8 F# g6 ?. Z2 C' }7 |1 P, {
GlobalDistObj := part.globDestination;7 [) v( _1 U3 {! ^1 q+ Y
assignLObj := rgmanager.rgAssignL;
) X% [' L! r' f. A# F" N/ y, T" k) o row := assignLObj.getRowNo(GlobalDistObj);
5 D$ k# S$ p' \, T1 d2 C: f if Row = -1 then -- since 70: w6 F- e/ j5 p6 T2 S
if lan=1 then
- r6 a2 U: r y3 A) E# E0 {2 v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' M$ o/ @( n+ z to_str("in der Andockstation: \"",?.~.name,"\""));
! ]$ w0 F# Y, m% V else. \* d) u1 Q& f1 ?' k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! Q2 [. ?9 y& L) Z. F" C. y to_str("in docking station: \"",?.~.name,"\"")); - s: A( [( L, H2 I3 F6 v! G
end; ^4 R$ V4 \) Q" _+ e5 W
else6 g. J- M ~' R- v9 g
@.Destination := assignLObj[1,row];. a8 K3 C% L. X8 B4 u3 m
end;
" v( k d( c R1 G- e' j8 \1 R6 b newDirection(@);6 R- n2 Q/ ^1 f
@.HasOrder := true;
/ V3 _2 \0 B$ ~6 x end;! l: m8 q j7 e0 m
end;
! q3 J: |, ^3 Q/ K2 b" T/ Tend; -- of the method6 Z. K( f) r4 D. k# q+ v
|