/* called by: entrance ctrl of the object 'track'
" d% t8 q. K" X7 _4 B8 k*/
# [8 q3 X5 ?2 o; V3 A vis. O% i8 `$ M2 Q; E1 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% i- h' }3 m/ [$ ~7 G) h, ?7 B3 {" ddo; F8 f, V7 m! v9 q4 K
Lan := rootfolder.Internal.Tools.AOLlanguage;3 h) r. E4 V0 i% L6 E+ T
if current = @.Destination -- else return/ F" r w1 x M! c6 ~1 F6 I6 y6 a* x
then
0 v. i+ W, p" I @.Destination := void;
6 u# o; M+ ^& G* ^, Y; G if @.occupied then
7 a9 K4 B/ x" d3 P+ Z3 t& I part := @.cont;
) b7 Z' I1 G- }# b$ a @.transpOrder := void;) Q1 ]* T& x/ C( M3 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: Q6 o O9 ~) }2 ~6 i& C# o% [
@,root.eventcontroller.simTime);6 n- J! @$ `3 v
@.HasOrder := false;" A# U; r( P6 C8 P7 D
@.DrivingHome := true;1 G) D$ E9 g6 x& r- q4 |) |
rgManager.tryToStartTransOrder;
; ~' X, w9 M+ s6 S" f' D: E if @.Destination = void, \7 S+ Z; }/ i$ G5 ~% f
then -- no transport order for vehicle @* v4 }/ ]( g8 \$ R5 m2 m7 O
@.Destination :=
; H1 }2 y3 G2 O5 @3 I rgManager.nearestFreeStation(@,track.~);& W- S' ~5 U; h' w R6 s
newDirection(@); * X! E: W) D' C
if @.Destination /= void then
/ o4 b! E8 b$ u2 `6 R3 M) { @.Destination.NumReservation :=
/ _- \. P5 V; `& s: x3 ?( W @.Destination.NumReservation + 1;4 W0 e" Z# v2 O0 E+ o% y# u* e# _
end;
: V, F+ \) ?' X$ `1 ^. H! g @.CurrIcon := "drivingHome";
) J$ E# p4 ? ?! R @.DrivingHome := true;1 T( d' L! _8 D6 ^1 _/ t8 S ~
end;
( G# g, O6 H! W( C else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 L2 [/ N8 ^5 w7 P/ f
part := @.transpOrder;
D" d7 ?6 O6 d m# L part.move(@);-- load part
8 u9 S f$ J# z$ c: v, Q @.CurrIcon := "load";
4 Z) G; B; W+ O$ \ GlobalDistObj := part.globDestination;" n3 G1 B4 L# s( p5 k) Z
assignLObj := rgmanager.rgAssignL;1 n: D, ]/ D! e0 h+ V s* [
row := assignLObj.getRowNo(GlobalDistObj);
1 i' |$ Q& E3 J/ N/ f if Row = -1 then -- since 70
$ N$ }& v( m; G9 n- \2 i/ f. I if lan=1 then p* I2 P, \6 k4 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: V3 Q" Y O' N to_str("in der Andockstation: \"",?.~.name,"\""));
/ l. B& S1 c; G2 _ else" O- l8 @' E4 @' W# ?( A6 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 F* A! @, x0 o
to_str("in docking station: \"",?.~.name,"\"")); ! t5 V8 K1 O! E9 \+ A# F
end;
. K) @: O, t4 {3 d& U else
f: [, K. R5 G1 ]' j9 q# E @.Destination := assignLObj[1,row];
. V' p. P8 O' L' ~ end;
( ^ C' T/ B( z* w# K newDirection(@);
; X. x1 B7 Q" ^+ w2 P @.HasOrder := true;
' F" Q; x! o$ k. F end;
' b3 }3 J# J0 x+ @ end;
, z; [) L1 H/ t0 S! o6 |end; -- of the method
9 f! X$ `1 J- p9 O |