/* called by: entrance ctrl of the object 'track'6 `+ @% @6 X. t; D
*/
" E, H* N' o T6 n5 a. n' Ris
9 c6 C$ F' d' J+ X part, GlobalDistObj, assignLObj:object;row,Lan:integer;# k4 W) ^4 e0 r: P+ B
do, K. J) ^8 ], I4 ]2 C/ {, O3 Y* U2 c! X! l
Lan := rootfolder.Internal.Tools.AOLlanguage;
% p4 T" O9 A. X if current = @.Destination -- else return! |5 y7 y7 W) N& n+ q
then9 G, r3 c2 W& ^' j8 w6 u" i- F8 C
@.Destination := void;1 q; y9 K. U' W. o4 }
if @.occupied then% S/ S0 h+ Q6 x9 h
part := @.cont;
5 x! F& g& S8 e @.transpOrder := void;
4 @) [) d# l: |5 S) h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ T2 Y" d3 [7 P& K, J# g1 f. r @,root.eventcontroller.simTime);1 ?" F( k+ _1 ^& j0 X, \1 J( ~
@.HasOrder := false;
3 q# r* \- g4 S/ z1 w- K @.DrivingHome := true;8 F5 g d4 Q+ K3 C) q0 |/ u0 B
rgManager.tryToStartTransOrder;
. \" ~& }' E0 Y6 f4 Y1 g0 a if @.Destination = void
* H _: [. W3 |4 V( U ] then -- no transport order for vehicle @
0 l$ J, s- h7 q0 Z5 B2 | @.Destination :=
% s- n" j3 L3 }6 G3 s3 | rgManager.nearestFreeStation(@,track.~);
! n# @* K! E$ D& |( ] newDirection(@);
. H1 x4 q6 N, ]4 i" v6 d, K3 F if @.Destination /= void then0 l% Z) J) r$ n1 ?' ~( K4 }
@.Destination.NumReservation :=
. ]* z5 X, A6 k ^) _' j @.Destination.NumReservation + 1;
1 f1 W: v( S: Q# z1 V+ G4 R end;5 Z1 y. P# P( g/ F5 f
@.CurrIcon := "drivingHome";
2 g7 c$ x9 {, D" |0 m: | @.DrivingHome := true;
. ^) ?: L6 B/ _ end;" h6 ~, v% ]* R, F9 f- N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 W6 d( g; z" G5 R$ S
part := @.transpOrder;
8 f6 ?' e1 F! k" C) c8 t part.move(@);-- load part4 ]! A* }8 P: a2 N, T
@.CurrIcon := "load";
& K% b1 W8 ^7 k% m# P GlobalDistObj := part.globDestination;- Y6 t$ B J5 h* N
assignLObj := rgmanager.rgAssignL;& o2 Z: k0 f4 s1 i
row := assignLObj.getRowNo(GlobalDistObj);0 d, U7 p& D1 r% H* e
if Row = -1 then -- since 70
4 _% B! I! T" P5 D; s5 y if lan=1 then! v$ @& i- I+ Q) J; n' ]3 X) P n7 ~9 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: b7 n+ N2 \4 [ r ^
to_str("in der Andockstation: \"",?.~.name,"\""));; x8 z- C3 C% h2 u& T% j$ R* O
else
- C& \. h7 ^! |, R1 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: E! ~% j% s- b2 R* q" Q9 x: e! ~
to_str("in docking station: \"",?.~.name,"\"")); ( O" T: B B5 F" a9 K- [5 w1 G P
end;
' k9 j3 F n }3 C, K else
& _7 O8 L4 y1 X# M- t { | @.Destination := assignLObj[1,row];( H- x. G$ S; ~0 j. P- a
end; O. c8 v3 m0 b$ f$ d
newDirection(@);
9 `, z5 m3 V: U3 ]( F( y6 y" Y. K! @ @.HasOrder := true;
8 T, L8 A1 d5 F) d end;- y9 f: b% Q* r- N2 F b- R
end;
% L1 N5 a; L) n" f- [6 e3 Yend; -- of the method
( a& r9 m0 d/ _$ `, h7 t |