Skip to content

Commit

Permalink
Adding Rules in Rules.txt
Browse files Browse the repository at this point in the history
Generating Output File
  • Loading branch information
ameybarapatre committed Apr 30, 2017
1 parent ff09779 commit ff7d30e
Show file tree
Hide file tree
Showing 8 changed files with 2,065 additions and 1,038 deletions.
Binary file modified .data-00000-of-00001
Binary file not shown.
Binary file modified .index
Binary file not shown.
Binary file modified .meta
Binary file not shown.
9 changes: 5 additions & 4 deletions Rules.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
if active_time and total_fare then Z1
if active_time_high and total_fare_low then Z1

if fare and waiting_time then Z2
if fare_high and waiting_time_low then Z2

if fare and waiting_time and active_time and total_fare then Z3
if fare_high and waiting_time_low and active_time_high and total_fare_low then Z3

if fare_high and total_fare_low and active_time_high then Z4

if fare and total_fare then Z4

Title : DQN for Taxi Fleet Management

Expand Down
7 changes: 3 additions & 4 deletions anfis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def taxi_eligibility(taxi,taxis_y ,alpha ,Gamma):
n_membership = 4
y = tf.placeholder("float",[None , 2])
y = tf.placeholder("float",[None , 3])
x = tf.placeholder("float", [None, n_membership])
reward = tf.placeholder("float" ,[None , 1])

Expand Down Expand Up @@ -42,11 +42,10 @@ def taxi_eligibility(taxi,taxis_y ,alpha ,Gamma):
sess.run(init)
saver = tf.train.Saver()

data = pd.read_csv("fuzzyq.csv")
data = pd.read_csv("fuzzyq1.csv")
taxis = data[["ua","ub","uc","ud"]].as_matrix()
r = (data['Diff']*10).as_matrix()[:,np.newaxis]
y_in = data[["ub","ud"]].as_matrix()

y_in = data[["ub","ud","ua"]].as_matrix()
if os.path.exists("checkpoint")!=True:
for i in range(0,10000):
sess.run([optimizer ], feed_dict={x: taxis ,reward:r , y : y_in})
Expand Down
1,025 changes: 1,025 additions & 0 deletions fuzzyq1.csv

Large diffs are not rendered by default.

Loading

0 comments on commit ff7d30e

Please sign in to comment.