/* called by: entrance ctrl of the object 'track'* c% }- _' h4 U, q! m% H
*/$ l! L& S$ i. S0 K
is
$ S$ V5 A W7 a/ E" { E" w2 I0 c" O+ t part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 e0 C1 o% R" Y7 P, ]
do
1 x& s& H. j- W Lan := rootfolder.Internal.Tools.AOLlanguage;( s4 ^9 k6 P6 g
if current = @.Destination -- else return p- k5 ^, V4 V5 K4 z
then
* E) z& X' U( t3 N! y% e6 c @.Destination := void;
2 c( x3 ?4 l X# I8 |5 C. [ if @.occupied then
, F4 w1 `! w1 C2 [. X part := @.cont;5 X/ u, q! R8 M
@.transpOrder := void;
) v; B' ?' b/ M, Q1 x! K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 L3 t- f# w1 i, Y @,root.eventcontroller.simTime);. `5 G2 X/ _2 d1 ^; T* |
@.HasOrder := false;" h q! g) S" W/ P% k" o
@.DrivingHome := true;
' ~) ?" u$ _. G$ H7 L0 G rgManager.tryToStartTransOrder;
5 J/ J; P8 u8 B8 { j if @.Destination = void$ q) Z. r1 G5 [! D. n
then -- no transport order for vehicle @; @3 y$ F0 C8 F1 M
@.Destination :=6 c/ G" D( z9 n
rgManager.nearestFreeStation(@,track.~);
$ Q8 {" Q q% d# r+ i( ~ newDirection(@); 0 r3 O- z u% y% K
if @.Destination /= void then
1 V* r$ t; |. b: G8 a @.Destination.NumReservation :=
# m# ~3 y" c, D4 T% q @.Destination.NumReservation + 1;
/ H7 D4 m: E& F; Z O6 t3 q end;
" Y' g0 ]' Y, ]. ~ @.CurrIcon := "drivingHome";
) z9 q' q$ d5 k- W. a" e* u4 p @.DrivingHome := true;
$ ^% ?5 s6 A3 J( f5 E$ } end;# P) L' L& z! \* @, e: H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- T/ k. E* i5 T M% n# k part := @.transpOrder;
: | I- M; F [( ]- A, l: P9 j part.move(@);-- load part
) o+ x) ~ @( w2 [ @.CurrIcon := "load";5 T$ c/ V1 @ t! T
GlobalDistObj := part.globDestination;
! l1 \8 Y; Q: y W; Y assignLObj := rgmanager.rgAssignL;3 _# F% z/ X+ u; l. }1 L7 G0 z( Z
row := assignLObj.getRowNo(GlobalDistObj);; O3 `6 R' j! E7 v, F# l
if Row = -1 then -- since 70
; ^' _; P% u. X' ]0 u if lan=1 then {2 Q# ]3 r9 j) o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- D3 r$ T9 {) s" x/ R
to_str("in der Andockstation: \"",?.~.name,"\""));8 r; l7 e+ P& [# \, C
else2 d* o7 e% b, ], @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; Z8 l* }0 l+ O* U
to_str("in docking station: \"",?.~.name,"\"")); + _1 l7 ]+ M8 m
end;
5 J4 j+ n/ l8 R0 w: N# r1 n2 O else
( W9 j# c9 Z! f1 z* L" m0 F @.Destination := assignLObj[1,row];
& v; m$ C) h' f end;
5 w o0 ^0 T2 j) | newDirection(@);
" E9 S' C7 n. Y+ `2 M) _* B @.HasOrder := true;
+ d1 p: h' j" ~5 h$ [0 {$ { end;: e3 v6 E6 u1 ] R# E
end;5 B& F& ]) E/ s
end; -- of the method& v7 b/ y# G! T2 a) o* V. A
|