/* called by: entrance ctrl of the object 'track' u) _2 h0 B1 o) ?$ Q5 U
*/& t" H8 ~* I/ e! z8 {* v4 f+ |8 u
is- V. y* {9 @" b. S6 K d& _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 O3 L) ^9 l% A wdo/ h6 s6 g+ c9 W6 E( c
Lan := rootfolder.Internal.Tools.AOLlanguage;
a+ V. d5 C2 `6 X0 |3 b if current = @.Destination -- else return5 k/ _9 \& B+ s
then0 O6 \5 C! e$ |9 e" d1 u
@.Destination := void;
8 t1 S3 z- d5 P, y! q) y4 [8 E if @.occupied then7 g! @; n, o2 @" m
part := @.cont;4 m+ ?: U% X" @+ p0 Y
@.transpOrder := void;) m* N) v+ {3 M8 M; L) L8 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# ?3 M3 b+ H# n) j# z @,root.eventcontroller.simTime);$ M! v% I9 g7 Z# r
@.HasOrder := false;
2 k+ i S+ x O3 T @.DrivingHome := true;
- t) A( a* g3 X( J" u. `/ M6 f rgManager.tryToStartTransOrder;
8 n: b% G- G8 `6 B6 K& Z8 y4 n if @.Destination = void
; _; L* p( ~* e0 v1 |9 m then -- no transport order for vehicle @" d" i' o8 |% G7 R H0 F
@.Destination :=1 ~0 o4 e3 o q `8 d( u, Y
rgManager.nearestFreeStation(@,track.~);
8 U/ M- T4 D: j newDirection(@);
3 s# l# \( Z4 r" }* m! M if @.Destination /= void then& K1 N: K. o# U* H5 N
@.Destination.NumReservation :=$ x9 D! t( Z& F2 o
@.Destination.NumReservation + 1;, G) o9 ^/ [% y9 \" n! V6 q7 @& \
end;2 x- X3 N4 b2 M. ~# g# `
@.CurrIcon := "drivingHome";, }* W8 p$ }! q* |; k+ s
@.DrivingHome := true;
2 G: w; f9 }0 t4 Z4 J7 z5 V end;
( k" s) A5 v! s* G0 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station) G' ?- P/ }0 ^3 O
part := @.transpOrder;& E' a) R3 u$ R/ w+ ?
part.move(@);-- load part4 N1 ]% U2 j" V, X( e
@.CurrIcon := "load";
, ~) N1 S; k, v1 U: L GlobalDistObj := part.globDestination;( H H9 u* q/ O5 V
assignLObj := rgmanager.rgAssignL;
s" `1 p4 I$ [% p row := assignLObj.getRowNo(GlobalDistObj);
/ s3 H+ q( R h7 g, L' S if Row = -1 then -- since 70
1 Y* e$ Z' J* ^( F' |% ]3 E if lan=1 then5 }; ~4 y W( D) Z( T8 `, }: u) w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( _! d5 u3 O* h, U4 t: ~9 w' P to_str("in der Andockstation: \"",?.~.name,"\""));" i7 Z7 E; ?; Q( |3 L: x+ ]
else; d- }5 ~3 Z( ]8 Z" n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ~( v; v! h) v0 E! N: ^ to_str("in docking station: \"",?.~.name,"\""));
4 D' {2 @1 r" Q; S end;
4 f$ z. w8 J+ l7 Z( k) T, f else0 C8 M4 j$ W# q$ j3 S
@.Destination := assignLObj[1,row];
3 s/ b: T: F2 C$ p# N8 u end;
' n1 A2 t X K X& v9 G. b" j newDirection(@);- r8 N& H, m) a% D$ a' m
@.HasOrder := true;4 V: Z! L# b+ o" G
end;
: Z t; c' x9 g8 O4 N# c$ [) J end;: v+ ?3 B9 z6 `
end; -- of the method) r- G" I0 K1 s# @
|