/* called by: entrance ctrl of the object 'track'
0 B6 a% f7 A4 D" O*/3 J% p' z! M! ]2 A
is9 v9 }+ ~) U5 {4 e- k3 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. A6 H0 a: C% q c
do2 s- m% a+ m* E* |/ W" H7 `1 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
( ^- }9 c) _+ @ if current = @.Destination -- else return4 Z) D- l/ b4 G
then) j6 `. V. R# p: N
@.Destination := void;* \8 S% q2 |4 w) Y* i/ Q8 Q
if @.occupied then
' B+ j0 K/ l0 T9 b# h part := @.cont;
8 C5 V/ P3 i# \1 n @.transpOrder := void;
3 Q1 B( _3 h6 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ C2 k. C( W9 C+ \4 C1 H: \
@,root.eventcontroller.simTime);
# `+ S& W8 k/ E' n9 H" [ @.HasOrder := false;
. W; F: N" D! ]& [5 r" ]7 z @.DrivingHome := true;7 n1 G& R3 q$ R& P. e" F
rgManager.tryToStartTransOrder;6 n6 R1 O5 r' ?/ e
if @.Destination = void u8 Y; i0 M% `# c
then -- no transport order for vehicle @) u+ h6 d5 _6 G: y
@.Destination :=
3 C3 g" [& Q8 W* j rgManager.nearestFreeStation(@,track.~);
6 p) j$ u0 _+ }* K V; g newDirection(@); , {; O7 P3 V9 b4 G3 V+ a. y- }
if @.Destination /= void then
, c) x/ I9 S) A3 J' m @.Destination.NumReservation :=
. Q5 m6 |1 E; U @.Destination.NumReservation + 1;
0 F; \2 Q4 y" ]2 \/ ^0 x# L# L, k end;3 r" e* q- f3 @/ q
@.CurrIcon := "drivingHome";
! r* \6 s( C [& i7 E @.DrivingHome := true;+ H; K, S5 K6 O! m
end;
6 k: C( w! S0 H' Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- T* Z; I5 c: H- i/ T) } part := @.transpOrder;: i6 @! R0 @5 L6 P: o, T* o. ?
part.move(@);-- load part* P+ w- ?. p& M( F9 `, S
@.CurrIcon := "load";
5 S7 }# t" E* {. L& l, ^) o+ v GlobalDistObj := part.globDestination;
2 M7 m1 ^# j: ? assignLObj := rgmanager.rgAssignL;
" I; @4 _6 v G row := assignLObj.getRowNo(GlobalDistObj);
9 E$ k4 E! L! L& @2 u4 B if Row = -1 then -- since 70
1 j/ _* c/ j3 h* V if lan=1 then) Y! ~6 P6 w2 `9 P0 k4 A* H4 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 ^+ f* Z$ W% r7 k
to_str("in der Andockstation: \"",?.~.name,"\""));" a7 t( ?3 E1 a! m" W) h
else7 b2 |3 w0 ] t! @7 `7 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 t0 n2 C3 T5 ~ to_str("in docking station: \"",?.~.name,"\"")); ! ]# ^+ `6 `2 ?( u8 {; z, b8 t0 M
end;
" Z( i: {8 \6 S else
" I( ]9 s% D6 O4 ~' I& h" \ @.Destination := assignLObj[1,row];
$ m, k H; |) w9 V end;
/ @3 y2 b" h- i+ _9 ?: {. X newDirection(@);
( `) _) r; m8 M @.HasOrder := true;
# O, G9 Z* c+ b" l0 p2 _ end;" }* S) F* z2 o/ K0 ^8 B
end;7 @6 j5 ^4 c# E: v1 t
end; -- of the method
! l% D! }3 Y- N% L |