/* called by: entrance ctrl of the object 'track' {5 {( Z/ K [. D# N
*/1 Y, O# d2 f1 u4 p( A# Q, n
is9 ^! u3 P* h, ^# [& K& ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! }- E; ^2 [; `) V. x
do
4 B4 o' I# C4 N1 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;! x( m) D# l( _
if current = @.Destination -- else return: u. E- ^4 j9 y0 B
then& k2 f- f) O3 |; T
@.Destination := void;5 ?5 k r1 C" T. Q+ B0 N4 S
if @.occupied then$ j+ R: a. ]2 T/ a8 \
part := @.cont; G0 {8 x3 K2 X/ L9 y' d
@.transpOrder := void;
) d* J* ^$ e( v5 O1 U q% g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# M& f- R' ]6 ^* H/ p2 A1 l @,root.eventcontroller.simTime);
$ |' ^7 m3 H% { V0 r. T @.HasOrder := false;
- A. B3 N& Y' R( ^, O# K @.DrivingHome := true;
4 J n/ ~& w b$ v; z rgManager.tryToStartTransOrder;
' F, }- n* [, K; l1 F if @.Destination = void, L9 z# f. b: Z
then -- no transport order for vehicle @+ n0 ~0 V* n% r/ w% u
@.Destination := {: S2 d0 @. p) \9 g
rgManager.nearestFreeStation(@,track.~);7 q( x- ]+ x0 p
newDirection(@); + H9 v! f% g: M! T0 e+ w: U
if @.Destination /= void then+ Q; a0 n {2 \6 S, W
@.Destination.NumReservation :=7 p4 u7 a2 U. u* e1 v- B& }" |
@.Destination.NumReservation + 1;# M/ q) L& j: {; W% F" q3 F8 A
end;
1 o+ N8 I, X/ C9 t6 g, q8 [ @.CurrIcon := "drivingHome";
; P0 p$ f1 `& Z; t2 x9 ^ @.DrivingHome := true;
8 H$ g* W; E/ l5 y end;
9 G, t5 ^/ q v8 `1 s& o: y4 K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* C% \. ^" c" S' @* Z. h) C4 A part := @.transpOrder;' U9 e5 Z9 a1 X3 o* Z
part.move(@);-- load part
/ e. l4 c: o7 t Q @.CurrIcon := "load";/ t5 Y+ g$ x5 O3 O+ q$ m
GlobalDistObj := part.globDestination;
, ~; \ R, x; D' g2 [8 c assignLObj := rgmanager.rgAssignL;* S( U. h- O9 H: [6 }3 q
row := assignLObj.getRowNo(GlobalDistObj);
M" V8 B: Y7 F+ ~ if Row = -1 then -- since 70
. s6 @! \: \+ S if lan=1 then! S ~8 o# |3 H2 I+ ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ T% F6 v+ ^4 t
to_str("in der Andockstation: \"",?.~.name,"\""));; Y; c; z$ b1 V. @& T3 I
else
& b$ k! V4 E0 `- K9 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 h1 e# c% F7 s
to_str("in docking station: \"",?.~.name,"\"")); : r% a; u z: ]# ^3 J
end;, s7 _- a+ K# |
else6 V0 R, ?! q) l6 [/ Z3 r
@.Destination := assignLObj[1,row];
6 M+ E9 a1 S$ ^! ^ end;
# d+ o6 y% z, V1 Q newDirection(@);
* I, [4 O0 z, z$ ^ @.HasOrder := true;8 U B/ [1 _. w
end;
4 i1 H5 l9 b! N6 { end;
/ F- C8 f( i5 x" G/ k5 D Lend; -- of the method: e) |# v) L. G9 A$ G
|