/* called by: entrance ctrl of the object 'track'
1 r8 H5 v. U! K$ F- u$ D* ?* P*/
. \1 X! S1 R. i2 Kis7 N$ I6 a1 ], `! D2 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# |6 s8 X$ X" b$ B- C: m% o% p. b
do
! E- W/ c7 P3 R$ D0 S Lan := rootfolder.Internal.Tools.AOLlanguage;; P0 K9 p: x: ]
if current = @.Destination -- else return
/ \3 [2 ?; j6 W& Y4 Y# N8 \0 G! g, x then
/ p/ e) o! H3 g% y# u @.Destination := void;
9 X- v, H& P; [/ y: E if @.occupied then9 y, c! |/ Y$ ?- g: c
part := @.cont;
, P4 H' o0 \4 i# `9 T" {2 u7 t @.transpOrder := void;
1 [7 T0 F6 a# N% o$ Z: |" V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," r/ h2 ?+ W0 \" y' c& k
@,root.eventcontroller.simTime);4 _/ W: k& |9 y% h; J+ U
@.HasOrder := false;! i5 \* b# ~5 R$ Z
@.DrivingHome := true;
. w; f/ w" U) I4 b2 M9 r rgManager.tryToStartTransOrder;
9 V# T3 x/ o- y8 p u! v L if @.Destination = void
! z+ y" G! D: A% R then -- no transport order for vehicle @
0 H; j8 _" d6 i: }; F @.Destination :=& |/ ]2 P0 E) P$ V- z5 ~
rgManager.nearestFreeStation(@,track.~);* I6 z' T. o6 j
newDirection(@); A% b* P1 s1 M% H
if @.Destination /= void then
/ @: m2 t) D8 ^. s3 T @.Destination.NumReservation :=+ v0 e) Q3 p' L- k
@.Destination.NumReservation + 1;* w$ X6 a2 J1 S0 H
end;
% |7 H# v4 Q3 Z4 ~. N$ ] @.CurrIcon := "drivingHome";3 O3 J$ y, I$ w3 C6 s" [/ S
@.DrivingHome := true;4 H R! p( _! e1 M6 @9 ~9 j8 Q( Z1 C
end;
$ J9 J8 Y$ r% o1 a k* J2 @# A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ W% _/ k+ [0 z v3 [3 ^ part := @.transpOrder;
* t- r. h- d5 Y% {2 C part.move(@);-- load part
4 Y$ }- m: O# u$ y3 d/ a @.CurrIcon := "load";. p$ p' c& [ `- X' X9 u. f9 t0 z
GlobalDistObj := part.globDestination;, f: a; p9 L! q# L5 K
assignLObj := rgmanager.rgAssignL;
: l+ @6 S% ~& j. s5 f3 u! u$ g/ q row := assignLObj.getRowNo(GlobalDistObj);0 P' h4 m- J' n9 ?
if Row = -1 then -- since 70
, C# \2 K2 f" T/ B0 x% p K if lan=1 then8 x7 g% ]7 L& }+ h* u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; |# I: ~% S, ?: T+ d to_str("in der Andockstation: \"",?.~.name,"\""));6 k/ \+ e5 i; P0 s, h
else8 W6 s- C. V$ Y/ n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 r' s5 h( u" V1 q( O0 I to_str("in docking station: \"",?.~.name,"\""));
5 w6 l" H/ Y/ E- c end;1 E# K% \; c. C( ?
else
0 g% c% R. G( O0 @ U @.Destination := assignLObj[1,row];& Y0 F6 F7 F: w" a2 Z2 D$ T
end; 2 i9 P" ~8 N8 M
newDirection(@);
( ~* ]/ G4 E/ t1 d @.HasOrder := true;+ N- ]) ]* p* i4 R
end;
- p5 a; Z( T; l0 D# V! O% j$ U0 M end;
1 A$ g w$ ?4 C- t. M& Jend; -- of the method
! n) S% p- V% F4 Y |