/* called by: entrance ctrl of the object 'track'
6 m6 r- ]0 N0 m4 b*/2 @$ C: n9 O6 C2 |
is
" ~. `$ J- t5 H/ Z+ F5 C+ x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, z6 ~" y J; J5 l6 X7 ?2 {do6 G: `2 M; N& Y G
Lan := rootfolder.Internal.Tools.AOLlanguage;: B8 q" m$ v2 U" {+ J4 h& i
if current = @.Destination -- else return
# Z+ d8 w9 ?/ O( D then
# ?2 U7 h& f2 z3 q4 ]! w @.Destination := void;
! i) {$ M( o7 n) [ if @.occupied then) J: [1 o% {& [6 p3 @6 l
part := @.cont;* l& Y4 ^- g2 x
@.transpOrder := void;3 x% ^! ^* W1 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 G! E2 O- x8 K8 ^7 l! g( G9 m$ }3 y
@,root.eventcontroller.simTime);: L0 N$ d! ^2 b* ^
@.HasOrder := false;
( z* P! Z6 L1 f8 z @.DrivingHome := true;
8 ~, V3 V* V# c; c% m6 `1 ~) z- E" L rgManager.tryToStartTransOrder;
$ E7 J! ^% O6 D5 A2 p if @.Destination = void
6 x( c- w1 U0 T, P' F) ] then -- no transport order for vehicle @% x5 m# y1 |) j
@.Destination :=
8 i3 b- [8 u3 }" ^ rgManager.nearestFreeStation(@,track.~);( j; B x" s8 p! q# x. v9 c
newDirection(@); / I- @, l1 u: e
if @.Destination /= void then
P* E6 ~% |' S' C% j! K6 h @.Destination.NumReservation :=
: @. h* ?/ w5 Q6 O7 p0 [4 T% P @.Destination.NumReservation + 1;9 _2 B- o* M# j8 x7 z
end;
/ l# x& S. V S7 `1 Q @.CurrIcon := "drivingHome";* ^ M! C- |' M
@.DrivingHome := true;
. E1 v; W1 Z4 I/ [ end;9 z8 s, l! S+ F. B: c* a1 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( {3 q2 ]& F7 |, p+ i8 K" I$ m" L) M
part := @.transpOrder;
( h) L8 b4 ?. \" W& E3 s part.move(@);-- load part
5 y: o# y- o/ g: `8 ?. Q- a @.CurrIcon := "load";* ]) U# Z" v5 r- v" g
GlobalDistObj := part.globDestination;
7 }5 S. J( U- k4 ~* s$ M assignLObj := rgmanager.rgAssignL;& D2 n/ S9 _5 X4 F2 y9 `' `: V
row := assignLObj.getRowNo(GlobalDistObj);6 N% _' j1 n- o
if Row = -1 then -- since 70. g$ x3 Z. n+ @* u8 A9 n$ I8 l: m
if lan=1 then
& J' A8 f! k7 I+ f6 n' h& a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 n* G9 k0 p) l& u/ K/ \: i# q" A
to_str("in der Andockstation: \"",?.~.name,"\""));1 o) k; A9 O9 e+ g9 M
else! g6 m. }6 t4 W/ T1 p% m% C( `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& P) m$ q N' v% Q
to_str("in docking station: \"",?.~.name,"\"")); . c- L$ ?' `$ {/ C7 e3 I
end;4 M* D6 L5 s* h# @7 Z) R! y
else9 n7 s! a2 t- Q0 I$ A
@.Destination := assignLObj[1,row];$ {/ Y' d9 w2 {5 U, L
end;
; [$ q8 i) G G6 }4 B9 F$ h0 N. X newDirection(@);
( U8 ^4 k- f) y5 _& @ @.HasOrder := true;9 @& e$ x9 c( ]. ?0 y
end;# [1 z& d+ L/ F: V4 g( ~/ J: o
end;9 P8 ~" h% |/ ]3 r+ A: [4 m
end; -- of the method4 D& r: L( a. y- y0 E( D, R( v
|