/* called by: entrance ctrl of the object 'track'
, n+ T9 S5 c' M$ S+ h- E1 e1 d*/0 p! l# p( B/ _$ ~, u
is* a7 G( y3 |# x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
g8 Z0 B* Y. P1 Gdo
3 w0 F2 a0 `$ P. e% i Lan := rootfolder.Internal.Tools.AOLlanguage;
! O) D7 T/ S% b3 T% |; x, } if current = @.Destination -- else return, B- @5 J q! {* @$ w5 B
then0 B. W- @0 _* s8 G
@.Destination := void;
' I" E8 b4 Z7 { if @.occupied then
" V; ^! J* X/ n part := @.cont;% I0 C' }8 S- `) ^ g; }
@.transpOrder := void;
y! K9 {( l$ b% Y+ k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 P$ S$ N* c L) P: T1 I u
@,root.eventcontroller.simTime);4 @+ A! q1 x6 E: ~- `
@.HasOrder := false;# p9 s1 }2 p6 J1 s
@.DrivingHome := true;
3 e# u2 }3 w! S' q* ] rgManager.tryToStartTransOrder;( t0 @# h' P4 {; h' E1 e6 _
if @.Destination = void1 Y) x& }5 _6 k7 k% y! G
then -- no transport order for vehicle @
# l# T' b& q, A# s. Y @.Destination :=
/ s- j) K' {5 o rgManager.nearestFreeStation(@,track.~);
: O4 k! S2 T$ R) L6 d newDirection(@); : r$ P5 X8 b3 m: f) ^) H
if @.Destination /= void then
$ `8 J3 X! Z e @.Destination.NumReservation :=
7 p4 }+ v$ \ j% R% H @.Destination.NumReservation + 1;$ T. q! y0 D. L3 B7 P8 A+ e# G
end;. F8 J! |: j6 X6 y J# O
@.CurrIcon := "drivingHome";$ T2 I( x9 c6 L, s
@.DrivingHome := true;: _7 S' f3 ]2 r5 C5 [8 ~
end;
1 Q t' B! q1 l# c* a; _9 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 c! W7 |' p% i( J S' c part := @.transpOrder; y5 Q; U: @$ @% p* n) p6 A; A6 ]# O
part.move(@);-- load part# _: g# o; j: t1 y/ J8 [
@.CurrIcon := "load";
( T9 n$ p( ^6 r, b$ }# C4 b/ N GlobalDistObj := part.globDestination;
3 `1 E M# e+ c) X& [/ K assignLObj := rgmanager.rgAssignL;
2 {. b2 `. G ` row := assignLObj.getRowNo(GlobalDistObj);
: M5 [2 V, B9 Q5 I7 Y if Row = -1 then -- since 70" n( @% ?1 `) z d" h3 N) t; ?- I0 j
if lan=1 then! E- [0 ^8 ~- N' P8 |/ B. b0 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& }! E2 h. d' X& R to_str("in der Andockstation: \"",?.~.name,"\""));" y0 l0 x- e! F/ K
else
0 L3 B5 F9 c7 |( m8 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 v5 X( A; K0 l, [# @$ F0 d2 l to_str("in docking station: \"",?.~.name,"\"")); ' r1 U4 H/ a# z D7 q: F
end;
7 W0 [) o; O" H7 ` else
8 f9 U1 M6 D' C4 y% K1 Y1 l% q @.Destination := assignLObj[1,row];' x( `4 A! o: O, F6 `# d
end; : w9 f7 J8 h% ~8 f3 Z6 t, m
newDirection(@);
2 l$ |3 H' G% a& U( Z3 B) u @.HasOrder := true;) W/ ^( ~8 V% b
end;
4 e' T; `3 n" i( ]! M4 l: K end;/ K; \% E% c4 L
end; -- of the method7 Q( T- _/ p1 y
|