/* called by: entrance ctrl of the object 'track'
( a2 J1 c. j! w. P }* y3 G1 @*// I. a K6 g2 _
is
2 i* o# J, r- b' i6 |5 N" {& B part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ]+ T; Q3 _ T, v* E' U* B
do* Z; C1 }5 \6 c! S
Lan := rootfolder.Internal.Tools.AOLlanguage;. L9 P% e! u! Q5 J# `
if current = @.Destination -- else return) Z: `2 o- ]$ Y1 R; \- e
then
, \2 i# H2 `3 T7 k @.Destination := void;
5 a y: L. ]1 R- s1 K if @.occupied then& C9 p. z1 o" W7 h4 J
part := @.cont;8 [) t0 M6 z- R9 g- h/ J& ~
@.transpOrder := void;
7 K: N0 u$ E! @ z' g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& C) f7 P( F) x" A
@,root.eventcontroller.simTime);
* a; Z6 M$ o4 Q# H | @.HasOrder := false;5 z# x+ T: Z7 m2 f: H
@.DrivingHome := true;
|2 i9 `+ O. u5 q$ P8 k rgManager.tryToStartTransOrder;
' X. ]& o G) x9 M if @.Destination = void: Q( q+ n% l- _2 }, O
then -- no transport order for vehicle @
: t1 Q& i- p1 A- @$ Z1 O @.Destination :=
* {4 D( V9 Q. A8 } ?2 o rgManager.nearestFreeStation(@,track.~);
1 @: I$ Q$ Y/ R0 f newDirection(@); 7 b/ x, r9 }8 y0 b' \; _
if @.Destination /= void then
" Q- W0 _* ~6 ^* N0 O5 {" j @.Destination.NumReservation :=( h! L3 m" M' M9 u4 G. v. g% w% E; q$ M
@.Destination.NumReservation + 1;1 O2 R0 n8 ^( R8 W% O ~( G' G
end;* p5 G; {2 @0 {7 F
@.CurrIcon := "drivingHome";
$ W# y* j& I h9 o( V @.DrivingHome := true;
1 B$ o/ g, F4 u; } end;" g2 Y# c# N; {0 e* J9 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ \/ v2 Z7 a5 I$ S4 `# C part := @.transpOrder;
; _7 U" x1 o& V9 E3 A9 m0 O* N part.move(@);-- load part) Q/ U! c& T" V7 S6 \0 Z
@.CurrIcon := "load";6 _" T9 U' E" `1 [( ?% K
GlobalDistObj := part.globDestination;/ u y9 M' a2 V
assignLObj := rgmanager.rgAssignL;0 \6 _* d% F. k2 r8 k+ @
row := assignLObj.getRowNo(GlobalDistObj);
+ h5 F8 Q2 v' Q2 g7 J& F: M" e if Row = -1 then -- since 70# O: G2 G: t- l! o6 f7 A
if lan=1 then
j& i) e6 I+ l& q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 ]& F" T' o9 h$ i1 S$ w; | to_str("in der Andockstation: \"",?.~.name,"\""));1 l* E( G$ ?9 h0 P
else6 h; l' ?$ ` i# M! X! h, S9 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 I8 e$ A( V% w! ~ to_str("in docking station: \"",?.~.name,"\"")); ; @+ K# s& E- b4 f0 t/ d
end;
: j$ ]1 O T/ `' @2 I8 P else
, O7 O6 i6 X1 d8 ]# B @.Destination := assignLObj[1,row];% H! _6 `4 f3 P* h5 O8 `
end; 6 v- w4 C2 M# P7 n- E1 v' z$ [0 l
newDirection(@);; `# w' `' ~( M" d. \$ A+ }
@.HasOrder := true;
, h; g/ X( w- A! k$ C end;
+ ]# m; F0 a g; z0 y end;% v( B+ T4 ` I& K0 ^3 K7 u
end; -- of the method
2 _1 F" V0 ^' T- v5 b5 U/ ` |