-
Notifications
You must be signed in to change notification settings - Fork 1
/
definitions.py
75 lines (67 loc) · 2.93 KB
/
definitions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Libraries
import collections
from tabnanny import check
from turtle import distance
from unittest import case, findTestCases
from numpy import number
import pandas as pd
import matplotlib.pyplot as plt
import operator
import math
import itertools
import csv
# Simulation flag
simulation_status = 1
#Constants
UPHILL = 1
DOWNHILL = 2
PLAIN = 3
# Constant parameters
num_of_bikes = 100 # Total number of Bikes
total_distance_in_one_trip = 177 # in km
SoC_logging_distance = 1 # in km
full_charge_value = 100
number_of_charging_stations = 2
distance_where_charging_starts = 50
SoC_degradation_factor = 0
uphill_degradation_factor = -2
downhill_degradation_factor = -0.5
plain_terrain_degradation_factor = -1
topography_dataset_distance = [0, 12.5, 100, 112.5, 177] # in km
threshold_SoC_where_charging_starts = 50 # in percentage
stranded_threshold_SoC = 5 # in percentage
total_number_of_trips = range(2) # Number of times Bike travels from A to B and viceversa
leastSoC_before_getting_stranded = 5 # in percentage
# Variable initialization
x_axis_distance_in_a_trip = []
y_axis_number_of_unstranded_riders = []
filtered_list = []
discarded_list_count = 0
discarded_number_of_sets = 0
present_SoC = 0
distance_travelled = 0
counter = 0
result = {}
strandedRiderCount = 0
checkpoint_charging_frequency = 0
checkpointOccupancy = {}
chargingSoC = {}
checkpointwise_Stranded_Count = {}
total_rider_count = 0
stranded_rider_count = 0
all_charging_SoC = []
AnxietyLevelCollection_setOfTwo = []
AnxietyLevelCollection_setOfThree = []
anxietyLevels = [1, 2, 3, 4, 5, 6, 7, 8, 9]
anxietyLevelFrequency = [0, 0, 0, 0, 0, 0, 0, 0, 0]
frequency_of_levels = [0, 0, 0, 0, 0, 0, 0, 0, 0]
Distance_x_axis = 0
charge_count = 0
initial_values = [[] for _ in range(len(topography_dataset_distance))]
unhandled_cases = 0
stranded_rider_breakout_flag = 0
ending_soc_cumulation = 0
average_ending_soc = 0
Anxiety_Avg_dict = {}
list_with_verified_distances = []
overall_stranded_rider = 0