C ---------------------------------------------------------------------- INTEGER FUNCTION IGETLINK(sim,net,act,i,veh) C ---------------------------------------------------------------------- C - Returns the next link in a given vehicle's (veh) path. If the C - vehicle is receiving route information, a (boundedly rational) C - decision rule is applied to updated the vehicle's path based on C - the current shortest paths in the network C - INCLUDED FILES: #include "dyna.inc" #include "sim.inc" #include "network.inc" #include "activity.inc" #include "vehicle.inc" C - UNMODIFIED ARGUMENTS: INTEGER i C - MODIFIED ARGUMENTS: RECORD /Sim_Data/ sim RECORD /Road_Network/ net RECORD /Activity/ act RECORD /Vehicle_Data/ veh ! Vehicle for which to find link C - MODIFIED GLOBAL DATA: ! NONE C - FUNCTIONS CALLED: INTEGER STD_IGETLINK ! function C - RETURN VALUE: ! The next link (by number) in the vehicle's path ! (still need error condition) C ---------------------------------------------------------------------- IGETLINK = STD_IGETLINK(sim,net,act,i,veh) RETURN END C ---------------------------------------------------------------------- INTEGER FUNCTION BEGINRT(sim,net,act,veh,i) C ---------------------------------------------------------------------- C - Find the initial route for a given vehicle and copy into vehicle's C - path array C - INCLUDED FILES: #include "dyna.inc" #include "sim.inc" #include "network.inc" #include "activity.inc" #include "vehicle.inc" C - UNMODIFIED ARGUMENTS: RECORD /Sim_Data/ sim ! Simulation parameter data RECORD /Road_Network/ net ! Network Representation RECORD /Activity/ act ! Activity Data INTEGER i ! Index of link vehicle on which ! the vehicle is being generated C - MODIFIED ARGUMENTS: RECORD /Vehicle_Data/ veh ! Vehicle: path data is updated based ! on the driver's initial routing ! decision C - LOCAL VARIABLES: C - FUNCTIONS CALLED INTEGER STD_BEGINRT !function C - RETURN VALUE: ! The simulation status C ---------------------------------------------------------------------- BEGINRT = STD_BEGINRT(sim,net,act,veh,i) RETURN END