/* called by: entrance ctrl of the object 'track'3 [3 l* ?7 Q4 A7 H8 Q* B! G1 j$ w
*/. `: o* o- Z+ O4 N6 ~& L
is8 [% N C( A, m& m- d4 b) K" T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; c5 u* C) W+ \; A
do, R6 `. ]5 m3 `
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 v% v6 y4 h* k: n if current = @.Destination -- else return$ ]. g7 ^) `; y% N' r
then8 u. I6 W- _8 O u. e
@.Destination := void;( T6 a& P$ J" t2 m2 r
if @.occupied then2 V9 H& \9 E6 P0 q- q* T% v
part := @.cont;+ \8 n6 ~4 v9 W5 \/ u$ ?
@.transpOrder := void;
6 z: ~# o$ q* ^( D; T8 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 S" ?0 g" Q! } B6 Z/ T1 | @,root.eventcontroller.simTime);
8 ?( J7 ^, a% _0 U z @.HasOrder := false;! u/ X g' c* m! ~3 `& V; h L& ]
@.DrivingHome := true;% h7 }$ E9 ^# _2 ~' H E- n' N, y
rgManager.tryToStartTransOrder;
h" r% y* [9 j3 l# s l if @.Destination = void
- I) o5 f9 v* M- f6 t- M$ w c$ C then -- no transport order for vehicle @
7 X5 z6 W9 C1 W @.Destination :=4 [9 C0 d( X. {4 y* I/ @
rgManager.nearestFreeStation(@,track.~);
# N1 M7 U2 ~* g) } T newDirection(@); " x; u8 Y( Y9 j, s" o" m9 j
if @.Destination /= void then
. ^3 Q& ]8 B* c" r4 h1 D8 n. C% | I& D @.Destination.NumReservation :=
7 T4 n% r. p- v D. f+ P' z, R* i- ` J8 f* K @.Destination.NumReservation + 1;& z6 q/ _8 f2 @9 x
end;6 N' I3 [: L7 \' A# {3 w' |
@.CurrIcon := "drivingHome";7 J3 t- t: J" ]' S3 Y: Q3 \
@.DrivingHome := true;5 t/ M9 _5 s$ I/ a
end;+ W) h! h+ X3 U3 j8 b: a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# E( b8 N. h( e5 y8 P# R
part := @.transpOrder;/ u9 ]/ g( s+ L2 A, V6 T% l
part.move(@);-- load part
. g' h0 ]3 S# j# X# d @.CurrIcon := "load";9 f: O: J9 e) U. v
GlobalDistObj := part.globDestination;
" }- M( I4 N6 e9 ] assignLObj := rgmanager.rgAssignL;8 `. ^8 g! _7 z) y Z
row := assignLObj.getRowNo(GlobalDistObj);1 W b/ K8 G" u9 S6 q8 [
if Row = -1 then -- since 70
5 T K/ o4 {& q4 k1 k4 `- a if lan=1 then
* P+ Y- e2 D- }& Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 S# r& u$ ^; `5 V# V: f3 P
to_str("in der Andockstation: \"",?.~.name,"\""));
2 s6 I0 u+ K8 `# O- O2 o+ R2 } else1 D/ @3 H5 n( g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 a, i. B/ c1 i3 Z+ q% i
to_str("in docking station: \"",?.~.name,"\""));
) p) s' |4 i7 _ end;
/ g) L8 [- O% a- O8 [ else
& V- u, ^1 `0 W: P0 Y2 L @.Destination := assignLObj[1,row];' b* @& j: E8 }% U3 s, _7 P
end;
/ d) d5 I: [/ k/ O! B newDirection(@);
6 a5 F. c& Z0 ] @.HasOrder := true;
9 s5 r' U {7 @; E" }# O3 O: N" k end;5 }/ n" q3 v* ] q
end;5 t) F% o# b% V' s5 l; R
end; -- of the method ` I2 w1 E$ A! s! N8 g9 e# F
|