/* called by: entrance ctrl of the object 'track'
1 S) a& W& b7 F- Q7 O- r9 B+ i*// H: i$ l) h# n0 Q9 x2 r+ N
is! e+ \2 z3 k- `! y4 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ ]4 K& j' ]1 d5 X. o. Bdo
f2 p! S& a4 q2 v Lan := rootfolder.Internal.Tools.AOLlanguage;
+ I# @# E% ^7 y1 ^ if current = @.Destination -- else return
' W) w6 S( G# ~, L& o1 Q then
3 m1 c. u+ [! K D, v: f) X, \ @.Destination := void;1 R, {. x; N! t! t; v4 l9 B7 R1 ^% Z
if @.occupied then
' g9 z% p6 c: F; F8 I% T, D part := @.cont;0 @! E1 ?8 m5 ~5 p" P/ J2 c* W
@.transpOrder := void;1 Y; z) j; x: N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, f5 c6 v/ N4 `% Y2 j* I
@,root.eventcontroller.simTime);
" g x. M" j; ^/ O8 K- ~* D @.HasOrder := false;$ o; M- E s$ F6 P1 k: g
@.DrivingHome := true;; H+ z8 t! B/ k, S8 J
rgManager.tryToStartTransOrder;
# G, G8 \7 K2 ^' j' r if @.Destination = void
g6 B w3 ]) _7 B/ A/ n then -- no transport order for vehicle @& b7 x+ g/ ~: V: U3 ?8 w; D
@.Destination :=" P% \3 f. H& u; v1 N% Z/ H# H+ D
rgManager.nearestFreeStation(@,track.~);
& _/ Q: t7 z7 r, B) |- n1 c newDirection(@);
& D6 ]2 X; j! B$ D$ H if @.Destination /= void then- c" n( ~0 A8 T' r8 R- [9 [
@.Destination.NumReservation :=* j7 i: {# y! V* a. m
@.Destination.NumReservation + 1;; N5 D* m8 F, ]/ R* ]+ q
end;
9 L/ E/ [+ v- _9 A! {# Z @.CurrIcon := "drivingHome";9 b2 t) h: \+ M4 G; ]1 @# a# N! p
@.DrivingHome := true;
# a* S& ]+ r5 T% S end;$ F9 W1 i+ n! p9 [5 C) {+ ?* k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station x5 u" }* u9 A4 p8 `% V
part := @.transpOrder;
: V% f( F: ^+ I, O7 E2 x& ?2 T part.move(@);-- load part
2 M1 [1 E; H$ D3 }$ N @.CurrIcon := "load";0 l1 |! ~# ?: x3 K, e1 v* M
GlobalDistObj := part.globDestination;
. h$ X2 M P+ R4 f8 K0 c H% K assignLObj := rgmanager.rgAssignL;3 U9 c5 b3 f$ W/ }* G2 _
row := assignLObj.getRowNo(GlobalDistObj);) g6 ]# c, v/ \ J
if Row = -1 then -- since 70* {& ~( a H4 }2 O1 W1 G
if lan=1 then
0 P. E2 ]" f% L3 ]" R* @% \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) T( V! \) W5 H4 S1 K+ w1 o5 N to_str("in der Andockstation: \"",?.~.name,"\""));
6 k6 v! k+ @4 j5 F7 {2 N5 V$ P" D else8 k) B7 a: s/ c3 h5 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ S6 X; \- `# x; [6 p2 A
to_str("in docking station: \"",?.~.name,"\"")); * V! I. z V- ?$ K) N2 v
end;( X% Z( f. |" T8 ~
else
, a$ x2 I! \9 e' @ @.Destination := assignLObj[1,row];6 C' v( f$ b! D
end; 3 ~) _ }5 h$ D* w6 s5 z/ B
newDirection(@);' y3 G) g; A# T. v. e$ D7 J* |
@.HasOrder := true;
. |# c. d/ |9 N8 b. C% [ end;
c& W$ n/ c3 O- b" {( B end;
, ]1 H9 `1 C6 o. s' N Send; -- of the method/ |5 {# r+ y) r6 l
|