/* called by: entrance ctrl of the object 'track' ?% E6 }9 B& O9 O# f
*/8 q8 ^7 X5 M0 |3 l8 `3 {) b4 `
is
2 E+ c+ _8 |/ D part, GlobalDistObj, assignLObj:object;row,Lan:integer;" I- t p( }4 i+ M j: }
do; R9 c. ~% y7 f- b' S+ q
Lan := rootfolder.Internal.Tools.AOLlanguage;
. i: \5 S K: }: \ if current = @.Destination -- else return, c% p# _4 ]( B% o
then
A6 M4 `; ^4 b0 T4 t3 g6 M T @.Destination := void;
: k. K0 Q. f8 W0 _# P if @.occupied then
' V3 P) w! H% L! g part := @.cont;: |" X2 K+ ?4 s! ^. M" Q* N
@.transpOrder := void;
- n$ f7 }- b3 | N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 c7 u: X8 L: u" r$ S0 q6 h; h
@,root.eventcontroller.simTime);6 G3 f* z- C' |+ S0 N& g
@.HasOrder := false;1 ^, A; j5 j1 ~3 O
@.DrivingHome := true;
% i1 ]; i/ x7 u( ^6 V h Y rgManager.tryToStartTransOrder;3 X9 h- j( v5 `& v
if @.Destination = void( H: F2 t N1 G
then -- no transport order for vehicle @
0 N0 P8 S3 ^/ ]8 y @.Destination :=
Z- @; e5 ]1 p9 }/ |6 o9 S( L. e* A rgManager.nearestFreeStation(@,track.~);5 t6 i: V! I1 P" S, c
newDirection(@); 0 | r* J K K+ w- Y7 O3 H
if @.Destination /= void then0 G/ a6 [" {9 l0 U
@.Destination.NumReservation :=
# r; Y/ P/ y2 O: f @.Destination.NumReservation + 1;8 T- |: z, M( ?, r
end;
5 O3 [3 W- K# b- K7 q& @ @.CurrIcon := "drivingHome";
, B$ w$ Z0 a3 O: r# U2 s8 I3 l @.DrivingHome := true;
6 w d0 X8 b l a. ~- i end;
1 a; L* X& Z+ ~1 Y- J' n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ q& ]7 y+ s& o c- y" j" K0 V4 u part := @.transpOrder;
1 ]% S) f9 `7 _6 P0 P; { part.move(@);-- load part3 t- j8 s0 W; A" F
@.CurrIcon := "load";% H9 i9 y& s% D5 s. z6 _
GlobalDistObj := part.globDestination;
$ ]( l& f8 B3 e0 N4 Q. V assignLObj := rgmanager.rgAssignL;
$ n/ k7 p0 M2 f/ Q5 X7 _: L$ \+ E row := assignLObj.getRowNo(GlobalDistObj);
( X# l5 [1 S$ A5 B4 N if Row = -1 then -- since 70
7 a4 v' z* z5 j4 K( w if lan=1 then
: X- A; D" _3 w7 i4 m* P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 Y9 ]/ \$ ]: ^; G: ^1 m to_str("in der Andockstation: \"",?.~.name,"\""));2 A# Z$ q& f3 G
else0 P1 K5 X$ y# m L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ]9 g- E/ k! z8 p' H5 O# r8 V
to_str("in docking station: \"",?.~.name,"\""));
6 P. c3 L# A0 e0 }0 i9 w& Z end;
/ f! l2 w5 W2 f+ Q else) N1 F6 `6 h" E4 R% P0 ?) P
@.Destination := assignLObj[1,row];, O) m" @* e: j$ q
end; 2 ~' A3 I4 k$ q+ [
newDirection(@);! u" @8 ^- ]. i( `1 q o
@.HasOrder := true;/ ~4 c3 P2 U" K
end;* |2 g# L( V, A; G0 ^
end;- q2 J5 Y1 @ W7 ~: ~
end; -- of the method
1 P+ |) ~" G/ Q; _& q( } |