/* called by: entrance ctrl of the object 'track'9 ]2 ^' Z* N) |* h" K* K7 r
*/
9 T: x6 C/ f2 k4 C1 a9 Fis
' l5 S9 J) u7 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;% D; p' T4 \- e a' }) z
do) ~: s7 Y# X* b) y' S
Lan := rootfolder.Internal.Tools.AOLlanguage;2 C9 K9 `; \; |( s) g
if current = @.Destination -- else return
2 X/ `$ G- Q. I& H, m. s, O then4 Q2 A1 _$ p, K, T
@.Destination := void;( ~8 k4 `4 x8 V; @9 X- x3 H
if @.occupied then- O4 e) L- o' _2 [5 R3 j8 M
part := @.cont;
) `$ Y+ j% g6 e+ ]1 A5 h @.transpOrder := void;( s* X9 ?8 U. d4 Z% T0 n* y3 i/ w6 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ ^+ k8 @1 a3 ^4 n/ n5 H8 _6 L( P) C
@,root.eventcontroller.simTime);" l9 g' J; v& k( E L
@.HasOrder := false;4 @5 l) ^4 F) T7 g" ^0 y9 c
@.DrivingHome := true;# i% L! Y& a8 h/ W, n
rgManager.tryToStartTransOrder;
?) }: A. a( O5 \5 F if @.Destination = void
) D5 H6 q& W. l* t then -- no transport order for vehicle @% q9 m! o' [, Y5 \$ O
@.Destination :=
' |( F {" Z, q) `0 X5 F) J; m rgManager.nearestFreeStation(@,track.~);# W1 U( r3 ]& V! f' f" K5 i
newDirection(@);
- n! I; S6 v7 G( G) d- W% c2 r9 r if @.Destination /= void then7 C6 g1 D# ?" J& [5 ?
@.Destination.NumReservation :=1 v$ Y, h5 K" m4 Y$ h; X! ^# [
@.Destination.NumReservation + 1;
- ^" s" O+ |7 T2 i+ H2 n7 c end;
8 j* K" T1 w# n( J0 ~* K6 F: G0 ^ @.CurrIcon := "drivingHome";1 D; u0 {; f4 ] R
@.DrivingHome := true;
]% _2 K2 g8 |$ x4 H) U2 s. O end;2 J9 p! \; k2 B, u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 L& Y' M& A9 G+ c3 @
part := @.transpOrder;. M5 T' I/ G9 M6 F# M9 _
part.move(@);-- load part2 q3 r! `; X& d" F" b/ I
@.CurrIcon := "load";+ ^! P0 e- E% b0 i: }& L
GlobalDistObj := part.globDestination;
- h. m) f% M+ G \ assignLObj := rgmanager.rgAssignL;( {& C$ Y0 d. }+ j5 i8 g
row := assignLObj.getRowNo(GlobalDistObj);; `( q9 X! Q w; ^
if Row = -1 then -- since 70+ s) p! `4 B. M4 b
if lan=1 then
: V" Q: a& L2 J9 R7 K2 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* z" v" b7 W: f1 y3 e
to_str("in der Andockstation: \"",?.~.name,"\""));
/ f) e3 |0 q' \! K6 F else" G4 |* c4 E( `# ^$ _* Q3 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 J1 d6 C1 ^6 ?+ W9 ~, E3 M! N( i to_str("in docking station: \"",?.~.name,"\"")); . ^" |8 t; f6 k- M* _
end;
, H" O7 F+ G% g7 x. S7 q else, `4 X$ j4 n. T! U! N
@.Destination := assignLObj[1,row];5 B! c9 [) x9 a$ _/ z9 j" b0 Z! E
end;
+ z- _1 i, B) ?0 }' X newDirection(@);
) ~4 \4 N# o8 N% N* e @.HasOrder := true;8 g. A) q' ]! F0 \7 d9 p
end;8 C0 a9 `6 q3 W8 s# U. s
end;- C1 `/ T" Z3 {, e' Z8 |
end; -- of the method
$ A$ u5 l- A2 r i' p |