/* called by: entrance ctrl of the object 'track'
; J9 p/ p% S& U7 r& ]! |& l*/" w+ ^& E& M% W) w/ C( k9 l! ^2 S
is
! i4 d& a a% h part, GlobalDistObj, assignLObj:object;row,Lan:integer;, N |- j7 Y2 |/ \, {9 t
do O" i1 M. G0 A; Q- z' u
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 {+ L% T1 R9 k! [4 n5 G: Z if current = @.Destination -- else return2 Y9 ]: z! k' [! s3 u/ j
then
$ j& s9 X$ }, O9 u/ x4 D @.Destination := void;
1 `4 q0 E+ a, a( M Z, x if @.occupied then
# f1 U. q' x4 {: P. L: w part := @.cont;+ {: O- l1 A- n" Z D# L0 O
@.transpOrder := void;' g5 ?5 `5 l: `* l8 w8 z9 q/ K5 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! G1 `! `% T) O2 a @,root.eventcontroller.simTime);# O- M; M4 x, E: j0 ~* i) c
@.HasOrder := false;/ Z& r; E; C4 }* B7 [" Q2 l
@.DrivingHome := true;! Y3 k9 l) n: ~, ]& Q: r7 ~
rgManager.tryToStartTransOrder;6 i0 E* |1 _1 u: Z; q; @" a" W' i
if @.Destination = void
5 d6 I& \. K+ G* T then -- no transport order for vehicle @$ E( @3 x# k' H( |
@.Destination :=# R) \( _' N& V; G& P3 ^3 C
rgManager.nearestFreeStation(@,track.~);$ [. S$ j; p" E! N) [& V8 A9 A' |4 t
newDirection(@); % y: X. L' D1 {6 k" Z
if @.Destination /= void then
1 ~4 W4 q( ` W- v! e8 x0 { @.Destination.NumReservation :=
& E! H0 S8 k& O: x! f @.Destination.NumReservation + 1;/ N6 V# m7 V# h) ^4 v! A# O
end;; }, K) x& }: j# w
@.CurrIcon := "drivingHome";# h8 V& B I( i5 `- \! w2 w I
@.DrivingHome := true;9 J- e# |) |6 {4 k8 I+ E
end;% t* M9 {# Q5 {1 A# U- w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 c$ h# p+ K: X part := @.transpOrder;
7 m% q) G9 ^3 ?: N' n) O part.move(@);-- load part
/ {1 R2 F, ^! ` @.CurrIcon := "load";' U O0 C5 c, _$ R& Y" N+ b
GlobalDistObj := part.globDestination;
6 V& B% E. R0 t2 N! T1 Q# g assignLObj := rgmanager.rgAssignL;
1 N1 T/ U9 Y; z& H+ Z- d row := assignLObj.getRowNo(GlobalDistObj);
" H" }4 K+ b# r. L1 i if Row = -1 then -- since 70) Q' e% Z* T. e9 d
if lan=1 then6 O5 ]2 `0 K) ^, v, v3 [0 K; Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ T9 C% Y8 ^7 k( ^3 Q/ _# p7 e to_str("in der Andockstation: \"",?.~.name,"\""));
, Q1 T. b* k% Z. {. X, r8 M else
! F9 t9 l/ J( }8 K+ p/ O) q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& l/ B9 n+ N7 H. ^; J6 m; L2 H5 `
to_str("in docking station: \"",?.~.name,"\""));
2 z9 I' N: z6 B, u end;# r" Q( L2 m c( W' @, y
else/ B, C( V5 r5 ^9 j- q9 D
@.Destination := assignLObj[1,row];
8 r6 C0 F* B$ S1 | end;
& Y* W1 F+ Y0 |, E' E; T0 h newDirection(@);
! R% d6 [& Z. C2 B, c @.HasOrder := true;/ p6 b: D( j$ Z. u
end;. s: R% c' ~- p# q
end;3 Y9 t) z" Y2 V
end; -- of the method
+ Y8 M9 D6 I- L3 {- b3 [ |