/* called by: entrance ctrl of the object 'track'
6 v1 V P9 ?" a9 R, L# b*/2 y2 j/ j) v! J. ~( f, P" ~2 J k3 y
is
, A0 `2 P: N. ~; Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 b/ p1 y: ?6 ~4 |9 F7 w4 {
do
! G: J( I6 } }( L# E, A Lan := rootfolder.Internal.Tools.AOLlanguage;
% G4 d' w5 Z. c' p0 h* s if current = @.Destination -- else return
: P7 e; |* v# q5 P% h( |3 w+ t then( `' {. n* J1 @# k
@.Destination := void;
: V/ j8 Q2 W8 k4 } if @.occupied then
N j0 V8 E/ @2 [; c part := @.cont;
& W8 C4 W: J5 _% c( {3 p9 I @.transpOrder := void;
+ a& Z) {* k, g( |- l# y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 l# C8 C5 {7 n6 E @,root.eventcontroller.simTime);
1 x8 l: m6 J; m, {* [- S! q- m @.HasOrder := false;
0 g: t% W% N( d% w8 T& \; b' J @.DrivingHome := true;2 t' _1 _) F) V, ^" I( H3 q% U- a
rgManager.tryToStartTransOrder;
/ e/ T5 b. \' h if @.Destination = void
7 C, |: [% ^3 ^; Z then -- no transport order for vehicle @
7 s+ W7 z9 M+ G; E- t @.Destination :=5 F8 Q2 b6 j7 v# L$ _
rgManager.nearestFreeStation(@,track.~);' \4 v% {. _1 ^$ h* ~7 L' c
newDirection(@);
5 M7 ^- k8 U- E% x. A; w if @.Destination /= void then. y, a" Q f9 z
@.Destination.NumReservation :=$ p- u9 G# o. L0 k: h z5 }
@.Destination.NumReservation + 1;1 s* m, h0 {/ X: I
end;9 h Z) g9 |6 W" A3 d
@.CurrIcon := "drivingHome";
4 L7 `$ Y2 u+ D6 @; c; Z; [ @.DrivingHome := true;
7 E" Q% M. X' [) C& M- E' I2 l end; e6 L5 X( A% Y z( r" ], ^) S! B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ `, [3 ^" @/ j4 W5 C( j8 A part := @.transpOrder;2 W# ?. o8 m8 S. }) |1 L- k% _
part.move(@);-- load part
. j f) I7 p; ^* z5 z @.CurrIcon := "load";
8 n/ k& o; Q* I" v0 h GlobalDistObj := part.globDestination;/ }0 I: \# {6 P
assignLObj := rgmanager.rgAssignL;" L: d4 f. B* m g" X6 R" C5 e
row := assignLObj.getRowNo(GlobalDistObj);
: [& k8 G" j6 R) ]4 B if Row = -1 then -- since 706 w4 k) U3 s' y/ Y1 `
if lan=1 then
$ J5 e0 w+ ^% T9 c; C2 d$ u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
i: d# H9 t, U4 Y! E to_str("in der Andockstation: \"",?.~.name,"\""));; x& g7 z; C5 z' b# ^
else# @4 ~, N% l0 S0 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ x7 M y, E: n3 I6 j# R b7 H to_str("in docking station: \"",?.~.name,"\"")); 2 U! @4 }1 L# L5 _6 i
end;1 w. {, v& W( R
else4 I4 ]4 c2 h8 j& U
@.Destination := assignLObj[1,row];% [" @' v# ~3 v
end;
- f4 a5 G a# P5 `- a$ L2 a n newDirection(@);) q8 R: X- g- c
@.HasOrder := true;5 c2 A' I9 s1 o ~6 ^- w5 H
end; a" W0 T* `" D3 ^9 y# A
end;
3 F6 A7 {' h: E Fend; -- of the method
+ t/ z. V4 M+ x( A# c |