Skip to content

Commit

Permalink
Added runtime linker calls to makefile, for future editing
Browse files Browse the repository at this point in the history
  • Loading branch information
temetski committed Feb 5, 2014
1 parent 775d1e8 commit f50ec25
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 9 deletions.
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ traffic_simulation.o: hdf_save_compress.h vehicles.h traffic_simulation.cpp
$(CC) -std=c++11 $(CFLAGS) traffic_simulation.cpp $(LIBS)



# gcc -Wl,-rpath,\$$ORIGIN/lib/ obj1.o obj2.o -o my_application
#vehicles.o: parameters.h vehicles.h vehicles.cpp
# $(CC) -std=c++11 $(CFLAGS) vehicles.cpp $(LIBS)

Expand Down
64 changes: 56 additions & 8 deletions two_lane_homo_car.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,66 @@

#Script to be used with traffic_simulation.

export PATH = `pwd`:$PATH

TRIALS=50
TIMESTEPS=3000
ROADLENGTH=50
REAL_LANES=4
VIRTUAL_LANES=0
LANE_CHANGE=0

DIR=Homogenous/Two_Homo_Car
mkdir -p $DIR
cd $DIR
function Two_Homo_Car {
REAL_LANES=4
VIRTUAL_LANES=0
LANE_CHANGE=0
DIR=Homogenous/Two_Homo_Car
mkdir -p $DIR
cd $DIR

car_ratio=1
traffic_simulation -c $car_ratio -T $TRIALS -t $TIMESTEPS -R $ROADLENGTH -r $REAL_LANES -v $VIRTUAL_LANES -L $LANE_CHANGE
}

function Two_Homo_Motorcycle {
REAL_LANES=4
VIRTUAL_LANES=0
LANE_CHANGE=0
DIR=Homogenous/Two_Homo_Motorcycle
mkdir -p $DIR
cd $DIR

car_ratio=0
traffic_simulation -c $car_ratio -T $TRIALS -t $TIMESTEPS -R $ROADLENGTH -r $REAL_LANES -v $VIRTUAL_LANES -L $LANE_CHANGE
}

function Single_Lane {
REAL_LANES=1
VIRTUAL_LANES=0
LANE_CHANGE=0

mkdir Single_Lane
cd Single_Lane

for car_ratio in `seq 0 0`;
do
traffic_simulation -c $car_ratio -T $TRIALS -t $TIMESTEPS -R $ROADLENGTH -r $REAL_LANES -v $VIRTUAL_LANES -L $LANE_CHANGE
done
}

function Two_Virtual {
REAL_LANES=4
VIRTUAL_LANES=1
LANE_CHANGE=1

mkdir Two_Car_Lanes_Virtual
cd Two_Car_Lanes_Virtual

for car_ratio in `seq 0 0.05 1`;
do
traffic_simulation -c $car_ratio -T $TRIALS -t $TIMESTEPS -R $ROADLENGTH -r $REAL_LANES -v $VIRTUAL_LANES -L $LANE_CHANGE
done
}

car_ratio=1
../../traffic_simulation -c $car_ratio -T $TRIALS -t $TIMESTEPS -R $ROADLENGTH -r $REAL_LANES -v $VIRTUAL_LANES -L $LANE_CHANGE
Two_Virtual
Two_Homo_Motorcycle
Two_Homo_Car
Single_Lane

0 comments on commit f50ec25

Please sign in to comment.