/* called by: entrance ctrl of the object 'track'/ s( w- E! A/ D) ]7 f) i, f
*/6 ?/ q* Z u. O2 E/ A
is
; B. w# V* e" @% Q0 m part, GlobalDistObj, assignLObj:object;row,Lan:integer;% r1 Y% l6 B4 l# v I9 _
do2 k, \7 q2 j; M* G! e
Lan := rootfolder.Internal.Tools.AOLlanguage;0 s( r& I* m( Z+ t
if current = @.Destination -- else return
n7 ~ V I0 e) d" V6 ?- d5 Z: }# a then5 r6 B3 Y( S" r5 H. b% I3 p1 ?$ S
@.Destination := void;
0 `( S/ z( O) J4 F+ E8 B if @.occupied then d0 ~: ^4 s7 O
part := @.cont;! A) e/ [( T+ C3 p6 a0 K
@.transpOrder := void;
e" R# F3 }! k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* p4 D* n$ y* Z$ I9 u4 U' Q @,root.eventcontroller.simTime);
1 ^; @, R! \! Q6 n2 G, e9 m/ ~ @.HasOrder := false;
2 `% \$ }6 }; K' M$ U8 w @.DrivingHome := true;
* C4 |5 @- b6 Q v- @* |8 A rgManager.tryToStartTransOrder;
. t. Q/ l2 o; K" m$ u* v if @.Destination = void. d+ Y9 w# o1 ]6 G- n; r
then -- no transport order for vehicle @% L+ \% ~( |# C0 z; `% E
@.Destination :=! `( c; q; @0 {1 ]6 c
rgManager.nearestFreeStation(@,track.~);
# e: u4 p. ~, _; X5 h# m/ O; a newDirection(@);
4 W/ z F! p; e if @.Destination /= void then6 I9 {9 W" A/ w% v
@.Destination.NumReservation := i& `: A I8 Q0 F
@.Destination.NumReservation + 1; f9 F1 o; X$ u$ `: N3 [7 G. `: K
end;
7 E; f% u$ h9 M% y' X1 S9 z @.CurrIcon := "drivingHome";* {" a9 Y$ t3 W& E9 N
@.DrivingHome := true; R3 v! _3 H1 Y
end;$ l1 A3 r. @, w' w+ L3 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ \4 v/ |* ~$ U) g part := @.transpOrder;
3 g) {4 D, ?! O3 O$ ]4 J3 f part.move(@);-- load part
1 A! d; u( E0 g7 w& v$ e1 A8 i @.CurrIcon := "load";
# w3 W0 r2 `6 m5 o0 w GlobalDistObj := part.globDestination;# D' L& p2 i5 v/ T4 N7 z, w
assignLObj := rgmanager.rgAssignL;
1 E7 _+ y I w1 _9 O row := assignLObj.getRowNo(GlobalDistObj);
8 \' V2 C7 i4 J5 M1 J/ O if Row = -1 then -- since 70/ B) [) v* f6 `" C T
if lan=1 then
l# F) ]$ Z: ?; s# @( T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% o0 b6 _; }# Y& o$ X
to_str("in der Andockstation: \"",?.~.name,"\""));
6 m6 k6 S* u; h) l( w- J7 \ else
8 z* t" \& E2 H3 c/ i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ W0 P) o7 j2 T) ?# M: z8 ^* r
to_str("in docking station: \"",?.~.name,"\""));
\5 C* s3 Q ^9 Z end;
' E$ J# B& h) u5 C: c! C' d% O else+ X, e! e( T. f G3 R m
@.Destination := assignLObj[1,row];* W- _' r Y0 Q, }
end;
E, z) F& f% I3 \4 A. R newDirection(@);
: t e3 u+ P: c3 i1 y @.HasOrder := true;1 H1 r9 D5 s$ K
end;
- @. T( i4 y4 \& z/ S. h end;) Y* f6 q( u: e1 D- B- w0 u
end; -- of the method
/ z! o6 i) h: w* N1 o: t7 B7 O6 e |