/* called by: entrance ctrl of the object 'track'
$ ?! r3 D# c4 t0 l# u% h*/
- y) j* u; z: N& _1 c' t8 j$ zis
' l6 e3 R/ C% `0 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 K7 _3 [/ m j2 F% w7 r: z2 K, z
do
5 w' l) W7 [3 L7 Q' X; A: T9 G+ u Lan := rootfolder.Internal.Tools.AOLlanguage;- K% R3 {% N ?- \0 V# x5 M$ S
if current = @.Destination -- else return" a$ @* s( H+ ~- p/ I X. |$ L' Z
then8 V/ C# f2 U1 O% d: y/ ~
@.Destination := void;- Y$ n# z6 p" e$ H+ f H
if @.occupied then+ t2 y5 \5 u6 R1 v* ~* I
part := @.cont;
# \* {/ Q N1 ?- t4 x6 L/ J @.transpOrder := void;
7 k1 m! m: P4 T D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# }& ~& z1 I8 u, B( ` O1 ]+ S2 H
@,root.eventcontroller.simTime);
4 s/ c" o C5 g, H9 D. D8 w8 n @.HasOrder := false;
& E: S. T! Z& |* [/ y3 ~" @: n @.DrivingHome := true;& X2 z$ u" _, j
rgManager.tryToStartTransOrder;
3 s$ {" B6 B. ~4 L2 |* |- V* P' K# C if @.Destination = void* I- j1 F) W/ t
then -- no transport order for vehicle @
* U# s( T/ P, U' ]1 s* D) p @.Destination :=, F: ?2 x) n, p6 s9 @ v
rgManager.nearestFreeStation(@,track.~);
0 |( c+ `8 \0 h7 n: y newDirection(@); 6 \8 u# C7 B4 O4 J' F
if @.Destination /= void then% F9 Z8 c# A' F+ b& a
@.Destination.NumReservation :=
0 {' [: {; x7 I) r, Y @.Destination.NumReservation + 1;
6 H! x- ?2 q+ N# m end;
9 I2 Y" F' _1 w( s2 S @.CurrIcon := "drivingHome"; u' @7 C( b+ k
@.DrivingHome := true;
4 O, f9 P1 r+ j' b7 }4 x end;! h5 J+ Q- C1 r6 X" ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# x* t: G, J$ h6 s part := @.transpOrder;8 K, t0 g$ h* k) J3 P f8 d9 M
part.move(@);-- load part
$ y0 S0 v/ Y4 p, p. \8 r @.CurrIcon := "load";
" u! S5 M7 Q! S4 c9 B% k GlobalDistObj := part.globDestination;
# \3 V2 S0 [* F+ O assignLObj := rgmanager.rgAssignL;) B4 |- u% N; V4 |# ?
row := assignLObj.getRowNo(GlobalDistObj);
2 v% a% s9 u4 Y& p if Row = -1 then -- since 70* w- Y! X( t$ o( G7 Y
if lan=1 then/ A% T, z+ K/ t1 T) Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ A2 _3 E4 `4 k& y. F+ M) a to_str("in der Andockstation: \"",?.~.name,"\""));/ w+ ^9 c' I; Y2 |9 b9 s# Y6 j
else/ U9 \( m; A7 k X' `& T9 u% p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 U& L( n+ z+ D+ @6 S4 e to_str("in docking station: \"",?.~.name,"\""));
- N0 ~/ J$ A9 I/ V" o8 q end; D, W& G* H% C; q5 V# l" q4 ?) L
else
1 z8 d5 _' }/ b, v5 r @.Destination := assignLObj[1,row];6 S$ J+ r* G4 J
end;
K4 [) A, A* @& } newDirection(@);) o6 @& Y" ]& u5 B
@.HasOrder := true;
! Q, ?/ N: \$ I. y/ H1 x9 k* { end;; s$ `1 t* w0 B! A7 j g' o7 w( Q( T
end;) h8 L$ _! Q& x& _6 x% s" j7 f
end; -- of the method) ~: e% l0 D3 D/ m
|