/* called by: entrance ctrl of the object 'track'+ t0 z( |- E. t) q( C/ I
*/: M9 z6 f- I1 X. q
is: \3 E# P% I ]- c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ W% J+ \+ L9 N
do
6 O5 V- G, H0 Q# @% U5 @. J Lan := rootfolder.Internal.Tools.AOLlanguage;/ @5 B$ n' |' W
if current = @.Destination -- else return& m: x: ^+ f: \. }7 D) A
then% f, c; b+ B$ }: X9 M
@.Destination := void;% J, `+ y" I. B e/ o/ l% E
if @.occupied then
# ~$ a0 s8 v5 ]6 p4 t* I3 [' x! z part := @.cont;2 K7 B# x8 H& l' d
@.transpOrder := void;$ s9 j$ x. l; P# j9 R2 E& a$ @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& e" v1 ^5 u/ \% o* o" o @,root.eventcontroller.simTime);
0 k! k. `; b" a) @ p @.HasOrder := false;$ L! L) E" @: [
@.DrivingHome := true;* i+ Z) o) n) L7 \: f' [
rgManager.tryToStartTransOrder;4 ?' J( |) ^8 ?8 R* p( \ {
if @.Destination = void
/ H# u! r5 B! B then -- no transport order for vehicle @$ R0 l8 ` N# @/ w, W/ m
@.Destination :=
: V y4 V3 E# \6 R rgManager.nearestFreeStation(@,track.~);
2 |- |% V) B7 B4 F" y newDirection(@); 0 A& j" w6 ?- l
if @.Destination /= void then
& o4 o C' e4 O2 M2 S @.Destination.NumReservation :=
+ o) k( c+ h1 E) {) V. m* h @.Destination.NumReservation + 1;
: m( G H9 r0 X# M1 f6 ^/ q2 \ end;
' b& A: Q/ }8 r+ N. o e2 t: W @.CurrIcon := "drivingHome";& S D) ^# f$ M& L# N8 T8 z2 S
@.DrivingHome := true;& A5 U Z! \) X: y
end;
/ r; e( \; P( Z; P F9 p- ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ?( Y' {, l5 e* n* ], j" t part := @.transpOrder; u3 T' A ]8 g! G- G4 S
part.move(@);-- load part
# h2 J# I9 l( x: e. j, Z @.CurrIcon := "load";: N# Q) S9 y$ N& R- l) f' R* e8 P
GlobalDistObj := part.globDestination;: t5 L" D% `2 p
assignLObj := rgmanager.rgAssignL;
( n, s1 F" O( z* _! p. ^ row := assignLObj.getRowNo(GlobalDistObj);7 g3 C" C% t+ H" A; M3 e
if Row = -1 then -- since 703 ]1 U2 u; p% G3 T( g# q
if lan=1 then
4 p+ q% O1 N7 ~7 o1 x+ x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* N$ v: I4 j t+ I8 D+ t3 ] to_str("in der Andockstation: \"",?.~.name,"\""));2 I$ \* ^( I$ A5 ~% T9 I
else- s0 i. I2 e# B% ]3 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. B8 T1 X6 ]& I: L" p7 e to_str("in docking station: \"",?.~.name,"\"")); ) _' `: [& @' m9 U3 H6 e1 _6 o( g
end;" P& G9 V% R5 e6 _8 M' E
else( h& k8 C/ f" N: Q7 s( l
@.Destination := assignLObj[1,row];6 T) Z$ e0 L9 ~( ~4 n
end; 9 B: d1 R' m# W3 N. B$ Y7 l
newDirection(@);- m' A8 C( U! l" q0 O
@.HasOrder := true;& S/ o7 Z! A- K8 ~# w$ |
end;
$ U( w5 l8 Z* @8 c end;9 K( _, n' O+ E8 p6 c8 J" P
end; -- of the method: ]2 U, u2 @0 g
|