/* called by: entrance ctrl of the object 'track'
4 C8 z7 n! c0 t: ?/ n*/# x' N! i3 L6 Z/ j
is
g# D4 `; ^6 P! A# Q' f( R- ^& @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ k" c# o: r9 u6 A" @
do
" v9 m$ @' q# o) J/ L* j& B Lan := rootfolder.Internal.Tools.AOLlanguage;
1 j# a# a3 g }) e if current = @.Destination -- else return
6 N$ q2 _: z! W then
8 A1 i" f4 g1 N9 {/ {. T" e+ t @.Destination := void;
% J4 L2 q: o& k6 m8 G8 ^3 ~ if @.occupied then
u5 S4 X1 H1 {# I7 f6 L# ? part := @.cont;
& J0 S) J1 Q0 t& p& n! b3 t @.transpOrder := void;
0 Z! N; h# o) d i" x/ m, j7 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: F" N: [/ z o: H @,root.eventcontroller.simTime);
; g; g' ]: p& Z. N) O7 g @.HasOrder := false;
H1 q/ d* e8 g3 |& N @.DrivingHome := true;
$ @6 H. i3 P; X. P( q( a rgManager.tryToStartTransOrder;
, [ y, o5 W+ i* k; \* Y; E if @.Destination = void
, A" G) S+ q8 g9 U# v3 p+ A6 Y9 H0 k- m then -- no transport order for vehicle @6 N6 p+ I, r% S- b* e% x
@.Destination :=
# R6 ?) ]; ~# u( i* z rgManager.nearestFreeStation(@,track.~);
' w5 Q% S$ l5 i) c newDirection(@); 7 q" U# [) r0 U; V; W: Y
if @.Destination /= void then
. l! |( m) q( E: h @.Destination.NumReservation :=
6 W& X: u# ~9 ?$ T& N @.Destination.NumReservation + 1;
; x. k9 V5 r" d6 @ end;! p& V# {/ Q6 X: u1 v" k1 R
@.CurrIcon := "drivingHome";* f8 l0 a& g; m
@.DrivingHome := true;
, M5 Q0 ~( P8 y; W end;. R* G+ {$ W6 p! k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; k1 T- T7 }' ^, ^9 H% J* I
part := @.transpOrder;- g; f& Q1 O- B# W, s7 X' ?$ H
part.move(@);-- load part
% W6 y4 x9 _/ `4 V- j% Z6 r; d2 k @.CurrIcon := "load";" D; f3 k; r4 u; E; n
GlobalDistObj := part.globDestination;
0 O1 k% y5 W: Q2 B& n assignLObj := rgmanager.rgAssignL;
7 |: Z) V) M$ F9 ~ row := assignLObj.getRowNo(GlobalDistObj);* y% I& U O1 {( j: n" a
if Row = -1 then -- since 70$ Q4 ^* x( @0 ?3 b
if lan=1 then
0 ~ U5 r; F# q7 U: G; }1 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! f# b" A+ o! q3 Q j3 e8 H/ Y to_str("in der Andockstation: \"",?.~.name,"\""));
4 E% m/ v( F" }- C2 w7 F- p% b& o( ?- n else/ @" W' m5 o2 w7 p) r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 O, G0 X, I. w, m3 R& w0 C% O
to_str("in docking station: \"",?.~.name,"\""));
" ]+ [$ k/ P" {1 J end;: A5 R; ? L+ O9 k C. K9 [
else" y, b& z. K, Z1 |% X# b
@.Destination := assignLObj[1,row];
4 p s$ Q8 m4 m, A8 O5 A/ ] end; 2 B4 I7 f8 U) k1 V. I
newDirection(@);$ w0 L: K* M4 {! G- q) |
@.HasOrder := true;# Z. T, ]$ t u# l- [
end;
' r& @. f m$ E4 K end;; T+ G" ^" a! x4 U
end; -- of the method/ H/ a8 M: X+ x
|