/* called by: entrance ctrl of the object 'track'/ [8 q: m. n9 Y, M f$ {) a
*/) v5 q J' I/ V2 N
is
0 r1 y) D) x9 F P* | part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 Z1 s1 k. s. u
do
3 F& ?2 M' V6 d4 F Lan := rootfolder.Internal.Tools.AOLlanguage;" w! N1 w( t3 }
if current = @.Destination -- else return9 C$ L6 \9 e% X% Y% E
then
) ^/ y9 |; [- E2 }) ` @.Destination := void;
4 P, L1 w! [7 C9 K w if @.occupied then! Z6 N6 O: ?4 @( w! \, }
part := @.cont;
! v6 i9 m7 U4 M/ @$ m0 j- ?6 E8 ] @.transpOrder := void;6 v! c/ k7 ^& e% q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- d Q) }4 ?; k7 A' K
@,root.eventcontroller.simTime);! n& j" R& L; d6 n; T, r
@.HasOrder := false;: g2 O" a2 ]8 H
@.DrivingHome := true;
0 r! ^: U$ @" u4 @$ h+ C rgManager.tryToStartTransOrder;, m/ U2 y( d- @9 N1 b5 {
if @.Destination = void. |( @7 c: M6 |* O/ w2 d$ m
then -- no transport order for vehicle @
# X/ [' I# G7 {) z# b: |7 R @.Destination :=
+ w& x% r: A4 G" S! ^. ~6 C' o7 ` rgManager.nearestFreeStation(@,track.~);
# Y5 c- T$ I& y5 I1 ~ newDirection(@);
; F+ g) [8 |/ r: y' O ]5 w/ N if @.Destination /= void then2 j5 o" T6 H" X2 L
@.Destination.NumReservation :=
+ [9 ?3 g0 `3 H' v. b @.Destination.NumReservation + 1;
9 h5 C" {5 b ]' s end;/ [) s3 T; D/ }: j4 P- f
@.CurrIcon := "drivingHome";, n# G# g6 A: s8 c- b. E: k
@.DrivingHome := true;" b7 i; e5 T t: K& F
end;9 U( S: P' |$ P0 V3 G; l, d$ p% Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( r! e, j/ L7 X( s5 v part := @.transpOrder;
1 V* w( O7 C, |2 T! n5 A part.move(@);-- load part
" Q; S; f5 j8 V& ~ @.CurrIcon := "load";1 R8 c% m( X" F% m1 o) z0 ~ m: F
GlobalDistObj := part.globDestination;
7 ~( D( u r" k- \% [# o assignLObj := rgmanager.rgAssignL;
8 O9 r/ C. f2 e* U+ S row := assignLObj.getRowNo(GlobalDistObj);
/ B' J+ D5 O2 S5 h' f! j4 _ if Row = -1 then -- since 70
: |+ m0 ]! y. \9 J# P8 f if lan=1 then
+ c# ^& K9 [6 V( j/ C8 j8 j% _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 L. `, Q! l7 m' S! {6 B
to_str("in der Andockstation: \"",?.~.name,"\""));
% A% |( J* v' R6 I2 Y# P else( G: |: w+ Y% B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# x$ U$ c& b9 g* w5 o
to_str("in docking station: \"",?.~.name,"\"")); e3 F& T1 o! N0 u
end; T. n' S9 V, t5 y+ M. N
else) c1 {! M1 n% ~# d6 g
@.Destination := assignLObj[1,row];, d( u4 I- f2 _3 R1 s: L: [
end; `8 ?7 U" I5 u! H. \
newDirection(@);
: E3 ^8 v5 ~ B @.HasOrder := true;
9 I# P U4 {7 |8 |1 D end;3 \. g @! R4 F, z
end;
6 v5 m4 b, I! }7 M* ~# r9 Tend; -- of the method* q- y5 o6 n7 ] _; z
|