/* called by: entrance ctrl of the object 'track'' h J$ w: m4 k& N2 ?
*/. N0 w8 A" f1 {
is
. s8 [) g C! ]9 ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 y' f; L. z$ I
do0 e& Y5 b1 y8 b) x
Lan := rootfolder.Internal.Tools.AOLlanguage;& @- z* P8 W' u# T; M
if current = @.Destination -- else return
. Z2 x' x/ G* _9 ]. [% g5 v then
! e' v. a& B9 @6 ^0 v9 s7 U1 x# b @.Destination := void;5 p# m* `2 y% x' S, D. Z
if @.occupied then" |$ H3 u% C0 Y% U
part := @.cont;3 m( a2 V6 ]3 r4 b! r1 ]: f
@.transpOrder := void;2 t3 E3 l$ P5 E7 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 { x( x) B+ r$ ]% k5 x @,root.eventcontroller.simTime);1 I; F1 O. R& g/ P' o8 m+ E
@.HasOrder := false;* M& U* a5 C- N% `& i' Y
@.DrivingHome := true;7 n" c; C$ _/ K
rgManager.tryToStartTransOrder;* A' v6 W+ A7 c2 y% q& i6 v
if @.Destination = void6 s+ t6 \2 K& U2 N% G
then -- no transport order for vehicle @ Y) L; Z% B% e. [$ K& o
@.Destination :=
: ~/ N2 Q, `# k+ a' Z# U0 a rgManager.nearestFreeStation(@,track.~);7 U# j/ X6 r" Z
newDirection(@); . ]5 A1 |; [6 s) h
if @.Destination /= void then* k4 ^5 b. f. \8 Y7 U" u: @, T$ c6 T5 z
@.Destination.NumReservation :=! y' n- F u+ n( F! F
@.Destination.NumReservation + 1;& I; z9 f, J# O7 F. v- R4 {
end;+ E; S9 H7 E2 M+ D* L3 L
@.CurrIcon := "drivingHome";
2 [' U! F9 y) d9 W/ {- ? @.DrivingHome := true;
1 \7 o5 d% d& m. J end;
+ Q- n }0 Q3 Z+ Z- b3 D" f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; ?* \5 b1 d7 f: I. y part := @.transpOrder;
, y% A6 o6 R) V5 H1 n* Q8 Z. h3 w part.move(@);-- load part
1 m: s# P; i% X: F! X8 n5 B0 P s2 } @.CurrIcon := "load";
/ C0 f, f g4 b0 V& a GlobalDistObj := part.globDestination;
+ ?/ k: q( x: @6 T, a9 m assignLObj := rgmanager.rgAssignL;
' L. X2 R5 W: x5 m row := assignLObj.getRowNo(GlobalDistObj);
4 a! x$ U8 S/ O) D if Row = -1 then -- since 705 a. j% J, i* J+ T8 P
if lan=1 then* I& J, b1 h q q; [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) t- f" Y) m# Z0 y7 q1 W9 Y! w( S
to_str("in der Andockstation: \"",?.~.name,"\""));& ^7 `. e' O) y# x/ p' |2 A
else; D7 S( G* }! \: q8 ~& _9 u# G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 W% A5 t: J3 h$ W4 Y* Z9 [4 V, v- U
to_str("in docking station: \"",?.~.name,"\"")); 1 O" j3 F5 p3 s; ^) A- h
end;
( h4 Y$ M& l5 B/ T ? else
9 l6 T% D! H' C2 ` @.Destination := assignLObj[1,row];
* ]2 W( P9 ]2 M3 V/ D! Y& H. F end; 4 Y" M) h9 M, Q
newDirection(@);7 S- ~5 `4 t ^# q7 M2 ?) i3 q3 r
@.HasOrder := true;% G e, {& l: \: s4 P0 F
end;' Y; E. d/ D' e9 x1 X: V5 v3 t
end;
% `9 m# i) S7 _! Q* {! q, }& m6 Send; -- of the method
, `9 ]3 F) t- G, E |