/* called by: entrance ctrl of the object 'track'
5 V/ V7 p6 l- ^*/* W6 l+ |8 E- \" V; M: C$ S# ?% @4 ]
is/ Y: q2 S9 P! d( ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& R9 k2 K' S ado
& Z7 G7 z* ?: {4 w* I/ |3 s. a Lan := rootfolder.Internal.Tools.AOLlanguage;
! E3 o+ U+ P. l; w. V. g7 O2 B if current = @.Destination -- else return8 P, L/ D2 _5 x' \) f
then* U* A! j2 k( { M$ p3 k
@.Destination := void;& I5 Z, a5 u! u8 N
if @.occupied then$ u/ R3 i- u+ n
part := @.cont;, s0 B) R& Y3 G: f4 ^
@.transpOrder := void;
% A7 L/ t$ K) p8 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 c* ?) W7 o5 Y/ k. z
@,root.eventcontroller.simTime);
- Q# S2 Y2 U2 {' }6 l- n' v @.HasOrder := false;8 s- n4 D% x' V& ?5 l
@.DrivingHome := true;
: O9 I/ p, { R6 m rgManager.tryToStartTransOrder;
|7 Q( s7 N; G- h4 z j X if @.Destination = void% v9 m }7 h: G
then -- no transport order for vehicle @# l! O5 \0 n; B
@.Destination :=( ~, m! p: c+ c1 l
rgManager.nearestFreeStation(@,track.~);0 {6 J9 k2 r5 R5 v6 i
newDirection(@);
: U: o: O! h) x2 t: o if @.Destination /= void then6 ~1 F8 I5 Z7 n* }# U, i" o
@.Destination.NumReservation :=
0 Z9 @% J% E2 c% g4 n, J3 C @.Destination.NumReservation + 1;
- j3 W- A, `9 E9 S- | }0 C end;- }9 J1 k+ S" e& m* k; ]
@.CurrIcon := "drivingHome";# `5 J# k7 t: w/ G* a+ f$ {2 B
@.DrivingHome := true;1 }1 f! E! t/ w9 L# N
end;
. J3 t2 B$ Q9 [9 x9 S& G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 S% z/ E/ z& c( F part := @.transpOrder;: a( i$ m% m; F `8 V! c
part.move(@);-- load part# l% n+ e9 S2 e; D! |8 a( R! k! y
@.CurrIcon := "load";
5 {; `0 \4 K8 r. x7 R GlobalDistObj := part.globDestination;7 J/ S5 `5 h9 `+ x' e+ |# _6 p3 [
assignLObj := rgmanager.rgAssignL;
( W1 q5 \+ H. `7 U row := assignLObj.getRowNo(GlobalDistObj);
8 h- X$ l5 t) o4 d if Row = -1 then -- since 70
$ |, n5 }- J4 o, W/ i if lan=1 then7 T1 C' {! ~3 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ ^7 Y- k6 \1 F* L) w' A* ]6 x* m to_str("in der Andockstation: \"",?.~.name,"\""));7 M$ q- \0 A: q2 C6 F3 }) D# D
else
* R7 ^0 `, }4 x1 q& C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 w# B( I" t- \0 D/ J8 S to_str("in docking station: \"",?.~.name,"\"")); # I$ h1 z& K' c# s+ v. B' L
end;! ~& q7 e; q3 e+ P, |
else4 d& v$ y+ P6 `# D
@.Destination := assignLObj[1,row];
0 a* P! q" d W1 ]6 |& Z) T } end; & J: U8 L/ C) d' X" R2 _" i6 Y
newDirection(@);
5 @! ^5 R. b8 w" F, Q4 Q8 [3 } @.HasOrder := true;* {. f) V; n9 P# Q' K
end;* T; I( K+ Q o T
end;1 g& |. n( e% T" L l4 A" M
end; -- of the method
; ?# y" T3 B A9 O" ?: P: ~ |