/* called by: entrance ctrl of the object 'track'% ^9 c+ {, k% X3 c+ t: n! t9 h
*/
8 H9 R0 A# W5 W1 W5 A1 R3 Ris; L, ?/ f7 B* ~5 i3 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& s+ a$ V" [6 h% E
do
& P7 y6 n5 c5 H1 o: J Lan := rootfolder.Internal.Tools.AOLlanguage;6 x! p1 |3 s: P; M1 ~3 q# ?, O
if current = @.Destination -- else return
* l/ X ^2 P* g9 K k& i! i2 s3 B q then* z( o4 M( M h& [ x
@.Destination := void;, J8 } [/ ?; {& |( M9 o: J0 L
if @.occupied then" {7 h. |0 Q: A( E- Z
part := @.cont;
0 I7 ?# }1 D% c/ @ @.transpOrder := void;) Y, M- U; R7 w3 @& \) \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: Y' M8 M$ j' n2 c6 r3 W8 M
@,root.eventcontroller.simTime);2 C5 H5 r- N2 n Q5 u$ |
@.HasOrder := false;( B7 C: i% w l2 n
@.DrivingHome := true;0 ^" z% J! G' p, I5 [+ |
rgManager.tryToStartTransOrder;- T% g$ K" Z( }5 c$ P1 m
if @.Destination = void
% M8 @) V' m8 o3 ?9 ^7 _ then -- no transport order for vehicle @
1 T) U! w! K; ?' n+ X' F9 ^ ^% ] @.Destination :=
0 O2 i1 M6 o! W5 k# ]- X rgManager.nearestFreeStation(@,track.~);
; ~, R. W& H/ F8 n0 Y9 R3 E newDirection(@); & M) D% a: O4 ]7 K" P5 f9 ?3 w
if @.Destination /= void then3 f6 c# o' n" O9 J. W$ J
@.Destination.NumReservation :=; q6 z/ I$ S( r+ p2 k
@.Destination.NumReservation + 1;
( E0 ?; |+ v/ q) o5 l# q y end;4 z6 j9 K$ M V5 E& l
@.CurrIcon := "drivingHome";: x% X. _5 n7 z/ u
@.DrivingHome := true;1 h @& a/ I/ C6 ?
end;
& B9 O3 e8 t& v3 W) L t else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ O. i# M: U) H
part := @.transpOrder;% V+ `0 H$ c4 v3 N* _4 S
part.move(@);-- load part
3 p: S* M1 d, {$ u @.CurrIcon := "load";
% R* ^. t) S) Q GlobalDistObj := part.globDestination;
" W, h# s3 y0 K5 j5 p: W assignLObj := rgmanager.rgAssignL;) o8 N" W$ c8 c# e
row := assignLObj.getRowNo(GlobalDistObj);
) _7 e" ~2 H" H @ if Row = -1 then -- since 70: C2 t! X) ~9 s8 y" R
if lan=1 then
# k. z6 M7 x( }* } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Z" ^& t" d% _4 D, i% q9 U
to_str("in der Andockstation: \"",?.~.name,"\""));+ l4 n' W+ L" M2 e. c! t4 @$ F
else
7 ?6 D+ ~- _+ N+ ^6 Q) U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! O. @4 I _2 B$ p$ b to_str("in docking station: \"",?.~.name,"\""));
' ]. z3 H$ @' N# A4 V end;; c" |: ?, ~+ P, o# i
else% @6 V+ I0 `) c# E: L" V3 e$ m
@.Destination := assignLObj[1,row];
* }; h) Z7 X* e* { end;
5 j# V* A8 Z: S# \ newDirection(@);- O) S% p7 G0 P+ Z6 }
@.HasOrder := true;
; p* D; K2 ? B end;
+ l8 w7 q, g. `( A; J! G end;0 A; G" t- }, {: ^' V) n3 i; f4 p+ C
end; -- of the method
4 b8 h& |$ I8 p7 W9 E% p |