/* called by: entrance ctrl of the object 'track'! p& m5 X, `. B( W
*/
1 g. i+ q3 X' h9 I# Vis
; a" O# L: C1 L+ c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& M/ v7 l. P# L9 R: Bdo
- R d* @1 u1 D5 [. | Lan := rootfolder.Internal.Tools.AOLlanguage;
; y+ S0 I3 s9 }' R if current = @.Destination -- else return3 M$ Y- M) `' d/ |) D- K: Z6 Y
then7 R# W4 Z4 _- X" e4 l. U8 W
@.Destination := void;$ b- m: d2 _! z% X- S& @; g- B6 w
if @.occupied then
1 y' [2 A- I! ~7 C; o& l part := @.cont;
) ~* T0 q- N% C @.transpOrder := void;
0 N& ^$ T F* W) l: V6 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 w/ {1 j: y- y! }5 e
@,root.eventcontroller.simTime);) C4 Z7 a# |( I" ^9 j. w+ l. ~
@.HasOrder := false;' C7 C- g8 s9 s
@.DrivingHome := true;/ m) k; d# C5 m/ s8 y
rgManager.tryToStartTransOrder;* _! ^$ ?2 {8 j" t9 E" t5 i
if @.Destination = void
- k B8 Y9 Z6 f/ N then -- no transport order for vehicle @4 H6 c- }' s, c5 j/ c# B& X
@.Destination :=
3 `& r' h) v) d# p7 h b4 \4 R! i rgManager.nearestFreeStation(@,track.~);$ L4 @7 Q' W3 f7 o% Q" j6 P% b
newDirection(@);
. B: F: F1 `% a9 ^# d if @.Destination /= void then
5 |; g3 @0 C- S$ x9 n5 S6 V @.Destination.NumReservation :=. Y# q- _3 n% w) w- N; [
@.Destination.NumReservation + 1;5 E9 u, U2 U! r) r a/ w" {( ^
end;+ y+ Z+ E! S% Y2 V+ O
@.CurrIcon := "drivingHome";
/ ? {$ ~: G% J, T2 I @.DrivingHome := true;% \: I, B8 c, m5 r
end;3 A1 J9 O/ A4 j) [; ]1 \- {- e3 t, x9 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) G+ k$ O# v5 v9 g part := @.transpOrder;9 v; Z! D( }4 P7 L0 _
part.move(@);-- load part
7 ?0 S: f1 X4 S) n4 Q* R: | @.CurrIcon := "load";
6 A: {3 {1 f' W: F* S6 f D GlobalDistObj := part.globDestination;8 \( g. l' U! s" a. n
assignLObj := rgmanager.rgAssignL;
/ V# \/ i) g1 W1 S! C) m5 ~6 G9 f row := assignLObj.getRowNo(GlobalDistObj);& E2 H* p* W5 P' s- s
if Row = -1 then -- since 70# z7 o$ S, `5 T8 `+ I9 g& q& P2 b
if lan=1 then# V6 |7 s# E w7 ]* [5 e& ~) n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ r1 C3 j6 W. F8 f* @ to_str("in der Andockstation: \"",?.~.name,"\""));
5 I" r6 X3 ]# a9 S, c else& \2 w; V: d" v( V. Z" G' X! U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, O! M' r+ ^3 F
to_str("in docking station: \"",?.~.name,"\""));
! c% R) R' D% r# l7 K end; J ~& W- o, F+ F+ @& D0 d
else' o3 F, V4 C" v4 H, L
@.Destination := assignLObj[1,row];
" [* |* `5 Q' {9 h% d8 U# M" A end; , T* m4 Y; B! G7 ~) U* }
newDirection(@);" F3 ]% j2 `& S& A1 O8 w
@.HasOrder := true;
6 f7 ?" o& H% [3 C end;
: n$ c) F5 |; B end;
& x* q. k8 v! F# B3 x5 o9 Jend; -- of the method+ b: [: l' ^$ g M
|