Skip to content

Commit

Permalink
postprocessed results
Browse files Browse the repository at this point in the history
  • Loading branch information
NaroaCS committed Dec 6, 2022
1 parent 545c496 commit cf361ee
Show file tree
Hide file tree
Showing 6 changed files with 799 additions and 31 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
4 changes: 2 additions & 2 deletions models/Agents.gaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import "./main.gaml"
global {

float distanceInGraph (point origin, point destination) {
return (origin distance_to destination);
//OPTION 2: return (origin distance_to destination using topology(roadNetwork));
//return (origin distance_to destination);
return (origin distance_to destination using topology(roadNetwork));
} //TODO: Review this, I think I put it to fix an error

//int chargingStationCapacity;
Expand Down
28 changes: 10 additions & 18 deletions postprocessing/postprocess-results.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@

#CHANGE folder

os.chdir("../results/2022-12-06-09.00.00")
os.chdir("../results/2022-12-06 01.00.00")


if True: #Load all csv files in directory and concat just once
extension = 'csv'

# #Bike trips
# bike_filenames =[i for i in glob.glob('autonomousBike_trip_event*.{}'.format(extension))]
#Bike trips
bike_filenames =[i for i in glob.glob('autonomousBike_trip_event*.{}'.format(extension))]

# bike_df_temp= pd.DataFrame()
# bike_df_temp= pd.concat([pd.read_csv(f) for f in bike_filenames], ignore_index=True)
# print(bike_df_temp.head())
# bike_df_temp.to_csv('bike_concat.csv')
bike_df_temp= pd.DataFrame()
bike_df_temp= pd.concat([pd.read_csv(f) for f in bike_filenames], ignore_index=True)
print(bike_df_temp.head())
bike_df_temp.to_csv('bike_concat.csv')

#To check bug
# for f in bike_filenames:
Expand All @@ -41,8 +41,8 @@

#Read already concat .csv
#bike_df=pd.read_csv('bike_concat.csv')
user_df=pd.read_csv('user_concat.csv')
package_df=pd.read_csv('package_concat.csv')
#user_df=pd.read_csv('user_concat.csv')
#package_df=pd.read_csv('package_concat.csv')

if False:

Expand All @@ -60,12 +60,4 @@



#Get the parameter ranges

n_bikes_possible=user_df['Num Bikes'].unique()
n_bikes_possible.sort()
print('Num Bikes: ',n_bikes_possible)

wander_speed_possible=user_df['Wandering Speed'].unique()
wander_speed_possible.sort()
print('Wandering Speed: ',wander_speed_possible)
# #
Loading

0 comments on commit cf361ee

Please sign in to comment.