/* called by: entrance ctrl of the object 'track'2 W* [, r5 ~' P) u) @
*/
/ z: p5 L( G: L) b1 O2 e' Sis* c, p- Q" y/ |% g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) g- X3 Q5 K7 h" j, Y0 J- H% rdo) R, p' R$ I$ d# |" O( v
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 w4 s( p) n$ e+ e6 H if current = @.Destination -- else return
2 {/ C' O5 b2 a6 u; }, h then
, }' I$ f. z) e7 I$ @ @.Destination := void;
) o& [& Q. J( d( K if @.occupied then
& v0 S4 S9 s& N. @% H part := @.cont;/ g5 S: v* ^4 k# z
@.transpOrder := void;
V q- P# _+ k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( M4 y- `; M: @% ~ @,root.eventcontroller.simTime);8 v/ c8 T! x$ r8 G
@.HasOrder := false;. i" @* q2 M; O- ^5 `
@.DrivingHome := true;
8 Y% @( \3 I$ z2 c0 I0 a. l rgManager.tryToStartTransOrder;
+ \5 g/ Q0 f/ `! ]2 S if @.Destination = void
/ r" `- R5 Z0 \) v then -- no transport order for vehicle @" @. G; k) s* y4 P
@.Destination :=( {4 o( h4 k( D- {1 J2 ~/ N
rgManager.nearestFreeStation(@,track.~);
& V. h; g1 Q1 \, U9 y newDirection(@);
# l/ S2 V, Z/ [6 e if @.Destination /= void then
3 D3 I( F/ Z- G' F' z7 G6 y @.Destination.NumReservation :=
/ E1 N. M$ m% B- z& I1 f2 n# e& ` @.Destination.NumReservation + 1;
' M6 e7 h* O' J. q end;
0 T, L; X. h9 B' c @.CurrIcon := "drivingHome";0 K' @0 z/ g7 ~/ w3 _! @0 ~
@.DrivingHome := true;
* |7 ?" k( o- @/ S5 F0 d; e end;1 @/ Z/ {" A" s0 f4 E! N1 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 z6 v- [) w- J' f, q) k
part := @.transpOrder;3 w- ]9 T, c* m" i* R& l! T
part.move(@);-- load part# t9 W+ u2 J* B7 E
@.CurrIcon := "load";
7 j% g+ }- P# c- R, o8 b: C/ _ GlobalDistObj := part.globDestination;
5 X: m7 D2 @1 F, [$ W8 ~ assignLObj := rgmanager.rgAssignL;8 `; V5 e; w t8 h* `9 A
row := assignLObj.getRowNo(GlobalDistObj);
$ n6 P3 e; c4 Q5 Z' e# h$ { if Row = -1 then -- since 70' ]% T' h- a3 E( Y% j
if lan=1 then
7 O1 K! ^- C$ U7 t& m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
i! m- S' m& l: S to_str("in der Andockstation: \"",?.~.name,"\""));) _/ X* ]* ]- \
else
$ A5 ?( T u3 |$ z* l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- i: Q% d; }8 V. u8 ]
to_str("in docking station: \"",?.~.name,"\""));
) v. e! J# i: @/ \ end;1 h/ Z. A6 c% l! @; x7 E3 n3 V
else4 S( P( r8 O6 Q3 W; V9 a* e
@.Destination := assignLObj[1,row];
9 d, j1 F; V% C2 B% y) O1 G& e end; N& O1 R. A1 B
newDirection(@);" _4 _: A* ^6 u3 g# a3 o7 L/ t2 b2 z+ X
@.HasOrder := true;; i# L( j; _. G4 T+ L' J
end;
, q5 l2 R: X* M& u end;5 w6 k1 _9 g5 h
end; -- of the method+ a# R D' o: X# |
|