/* called by: entrance ctrl of the object 'track'
& M8 g# R' M' l7 D$ I* ?6 @*/5 l: V7 n) q" }- o1 W& \. E
is+ A0 O; S0 L* C; c ^5 P3 o' ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ ?1 b+ V2 \: k" f/ i L' f
do; H( V A Q1 ?3 `, ^# ?4 O6 n( P8 l
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 y$ A9 B1 ?# h0 x if current = @.Destination -- else return
1 f m) k- M4 n! I. i6 v0 A then
2 i8 o. }7 C. t1 M @.Destination := void;0 h; d9 _) \( ]# f
if @.occupied then
) z: u7 M0 H- {# i" @ part := @.cont;
& I* g' T7 O3 D$ T. V7 o* k @.transpOrder := void;
; D6 o- z8 t8 k4 V u3 C. f5 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! [& ?( _& L6 \; W
@,root.eventcontroller.simTime);
+ P5 z1 Q& Y6 Y/ \/ S: m @.HasOrder := false;- f d/ ] [' `! i
@.DrivingHome := true;
4 J- U) t6 t7 {% {1 F rgManager.tryToStartTransOrder;
& ?0 D2 [% X. o d% O* Y) s ? if @.Destination = void
g. i* r7 ~, M. } then -- no transport order for vehicle @1 y& I& p( F' g6 n6 V ?
@.Destination :=
" r0 z, W/ t/ c rgManager.nearestFreeStation(@,track.~);
- ^& [" t. M% R' a# v `& c newDirection(@); ( \* V0 l w- ^ g7 a
if @.Destination /= void then
$ X) N8 L) l2 a6 Q7 W @.Destination.NumReservation :=
% o) D2 ?# B; L @.Destination.NumReservation + 1;
+ M/ i/ [% B; ^, `1 w/ e: {: E* Q. n) F end;
- ], B6 M/ t# @$ A1 v. c @.CurrIcon := "drivingHome";' C+ g7 Z' s3 w9 f& n! L& d7 S% T$ l
@.DrivingHome := true;7 y/ ~5 w' S4 ~" m' S$ ~
end;9 I4 o' v% W/ P) F# m* [) N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 H4 S3 C( \- e) f' J& Y4 y0 b8 }
part := @.transpOrder;
7 ]; E, E3 y' f1 l" ] part.move(@);-- load part
0 w0 R- H! N0 Z, n' A T @.CurrIcon := "load";1 u4 s4 J3 h2 o& @/ P- d
GlobalDistObj := part.globDestination;
+ s/ e/ @) }; \( c assignLObj := rgmanager.rgAssignL;1 t7 s# A) t. c6 h
row := assignLObj.getRowNo(GlobalDistObj);5 g! j8 b# Z1 Q9 m
if Row = -1 then -- since 70( J, D/ C/ ?: O1 |0 Z
if lan=1 then0 p9 e0 R1 Z2 h2 ?3 S! u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& S( Y0 w% P1 ^0 u7 c0 Q2 o V8 b to_str("in der Andockstation: \"",?.~.name,"\""));- k2 P' W. B, [1 h
else
9 T; L* a j) V# g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ M) e: _( u! }3 c) }5 u- p to_str("in docking station: \"",?.~.name,"\""));
. X* W" Z- \6 ~. k9 `2 r end;- E4 l3 e& ?2 s9 I4 G
else; ?- D8 L. }4 C$ A3 B
@.Destination := assignLObj[1,row];6 K2 l, B6 e6 w3 I9 ~* k! ]
end; * P: C1 M* ~- Y9 Y. F. C
newDirection(@);7 g* s. ]+ o5 P# c7 \7 K
@.HasOrder := true;/ t6 w& |) D, v& }9 I' }
end;2 W$ B6 F) Q4 \; F2 G8 @3 Q* ]
end;2 I- @% D9 D/ R$ k5 U: k3 Y. r
end; -- of the method
8 c' D z0 [% v' Z* T) k/ e( Q |