/* called by: entrance ctrl of the object 'track'
1 J* B* x8 Y5 x. x7 A1 e$ s. B*/9 C! J& u8 q5 z( f+ [ x
is9 S, u& k6 s- l' f# D/ P7 H4 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, M% D: R, }! `$ v$ N9 Q. y. [do
6 w+ E% F5 Z* B2 `( g# q& @ Lan := rootfolder.Internal.Tools.AOLlanguage;
2 k. V, u5 i& B if current = @.Destination -- else return
# y/ b* P( Z) C, G. _4 G/ |9 w then' q) ~1 q$ O/ m- O1 A* n' x
@.Destination := void;$ \( i4 z2 [+ D8 r
if @.occupied then0 S* ^3 p4 W Q) R4 P- B$ N1 o
part := @.cont;
( y$ G# b9 B" f+ C" R- C) Y0 J+ b0 d8 I' b @.transpOrder := void;# a4 F! W3 Y1 c/ }% Q! s$ u+ P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) \9 l* Q3 T8 ^' N6 L% { @,root.eventcontroller.simTime);6 A, z: r' f; d( f4 S5 P9 y& E) g. r
@.HasOrder := false;
; c& H4 i% v$ A4 [ ^1 h) R @.DrivingHome := true;
! p& z4 B! b- f- l5 | rgManager.tryToStartTransOrder;
/ G3 a+ b9 e3 I7 ~ if @.Destination = void% G6 \' o' f8 B: _
then -- no transport order for vehicle @
, t; C0 T6 i1 B% L @.Destination :=, S' r: L, M4 B4 w/ s
rgManager.nearestFreeStation(@,track.~);- H$ o7 Z; ^* ?8 r0 J9 s! G0 c# }$ C
newDirection(@);
' O# \" x3 x n2 {, h6 b if @.Destination /= void then
0 k e R& f% X+ p( g @.Destination.NumReservation :=
7 p8 ]$ z/ s9 r9 C @.Destination.NumReservation + 1;! \& x7 N3 e7 j5 w
end;& S- X2 r% c: F2 P6 v3 v
@.CurrIcon := "drivingHome";/ u* d( D; z2 z W$ v8 R
@.DrivingHome := true;
8 {$ {& m a q1 K end;
. H0 j, m D v6 D' L! L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! A/ m6 {- a& t0 [& \7 _4 o6 B part := @.transpOrder;
4 }. ^0 C. L4 J" J% {5 ^" o& @ part.move(@);-- load part* r4 F$ y0 Q# ~( d; h' z+ W& u) w
@.CurrIcon := "load";
( Q! J" A4 O. B U/ { GlobalDistObj := part.globDestination;
, r/ Q% _6 [" Y1 E8 N assignLObj := rgmanager.rgAssignL;
5 T' ^* U3 j6 A8 u6 L" t row := assignLObj.getRowNo(GlobalDistObj);* Y6 z; a8 B$ [) g! w
if Row = -1 then -- since 70
% {) x: t- _' Y$ h2 o7 S; L4 b if lan=1 then
# ~4 h7 `/ u6 A1 a. q8 N1 Z- \- c" f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ~2 C3 `1 i8 S2 n! ] to_str("in der Andockstation: \"",?.~.name,"\""));
! u7 y0 T b% a, g5 `& o* f9 S else+ L9 Y* Z. A$ N. U7 X' k" G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% A; I: f) ?3 O/ V2 h! [8 T3 F' h; s
to_str("in docking station: \"",?.~.name,"\""));
# L# `; @4 C. X4 H3 N$ d end;
, n( p# @# n3 Y8 i* }3 A' C else, e5 d3 E3 A9 H6 N# h
@.Destination := assignLObj[1,row];
# E$ `- @+ I+ \$ R- N end; 7 f0 S: c) ?1 @1 l* r+ X1 f: l
newDirection(@);) |. [; O" F* [* X/ t4 Q
@.HasOrder := true;
& P/ R" {6 ]6 i# K9 g end; p* }2 w2 u- z" Z; A) R
end;( j. n9 H" D k: Q8 }+ K5 M1 m
end; -- of the method" P: h, D; V$ h2 E7 q
|