/* called by: entrance ctrl of the object 'track'0 m& O% o3 R k ~: ^6 C/ i9 l
*/5 p+ a9 ]1 ~' t1 C. \ c: C
is
# f1 D1 t! M( o, Q/ d# l, c* [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* ~8 E9 j" r, |+ V; X8 l: N1 {do
7 v) A) k: _' x. x Lan := rootfolder.Internal.Tools.AOLlanguage;% o& ~& `, `% a1 _! h
if current = @.Destination -- else return1 i8 `1 b1 Z7 g9 o# d+ j. [
then8 z+ c" T: O" H
@.Destination := void;
1 m9 p& {7 w# M8 h, ?( U; C if @.occupied then! Z$ Y( v+ b" i$ ^& ?' o' Q9 p7 G
part := @.cont;2 B- a; u8 A* M4 }% A
@.transpOrder := void;
% i3 h) @3 A7 K/ A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ w# s d! T9 Z1 j @,root.eventcontroller.simTime);$ ?) t3 o3 [; w% X4 u, R
@.HasOrder := false;
% l# L/ T+ @- C @.DrivingHome := true;) g' o3 m( e( ] |- b' y
rgManager.tryToStartTransOrder;+ v5 q y% d n
if @.Destination = void# n0 p" A! f: N8 W% C, t
then -- no transport order for vehicle @0 R3 n3 L( O; o0 W2 z- j* N
@.Destination :=
; B4 B' i0 o8 n0 x7 }. u0 B7 }/ ~ rgManager.nearestFreeStation(@,track.~);
7 Y. N/ `( ~1 F+ |. } newDirection(@); $ T0 E, }$ K5 k$ F$ Q
if @.Destination /= void then
$ A0 m I$ [: C @.Destination.NumReservation :=! P5 E$ l6 h& M7 u1 q2 f0 p
@.Destination.NumReservation + 1;
; V7 P) Y l5 h9 b end; M7 @: e% O) _5 e
@.CurrIcon := "drivingHome";* ~ R8 W- E# i5 V# S! Y
@.DrivingHome := true;
2 b. j v5 |, p- W% J end;2 s H6 j! T5 s+ l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# L x4 x3 Z9 O9 z- ~' Q$ j6 s' g. l part := @.transpOrder;
& T8 A) T' C( u2 G k- d! ?- r) C part.move(@);-- load part" }! x. Z3 L$ S
@.CurrIcon := "load";( U- T% S0 o0 N* }/ d7 n5 e2 \
GlobalDistObj := part.globDestination;* ?2 f- ]1 z3 D8 a% i. | Z; Y
assignLObj := rgmanager.rgAssignL;' A; H4 J$ z1 m" @8 R
row := assignLObj.getRowNo(GlobalDistObj);# g! l4 y0 H2 D/ n
if Row = -1 then -- since 70$ b: u: G8 ]/ J, S
if lan=1 then
) |: w8 b% C! r- d R% J* w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 x4 _' d& k- O8 E to_str("in der Andockstation: \"",?.~.name,"\""));
\% I! b+ L& Q else
: ~0 b% {& {8 B+ f+ d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( E( e& f9 K- H2 E* F! m0 O
to_str("in docking station: \"",?.~.name,"\"")); " ^+ R6 z/ j( m$ f. m
end;& P y1 P# j ^. F" @( o
else# f8 M+ C l: P
@.Destination := assignLObj[1,row];* V, {: \8 K& x3 ?
end;
# j; c3 H1 N1 D) I# F" i newDirection(@);
. `1 y* Q) |) ~ @.HasOrder := true;3 v* n" A; H, I
end;
9 K% S+ J# k* L: W0 w7 ^0 X# J end;
% P" u5 ]( Q! h' lend; -- of the method* \$ w0 i1 x2 p6 p' L
|