├── FW.py ├── Q.csv ├── README.md ├── Zconvergence.png ├── coeff2.csv ├── linknode.csv ├── linknode2.csv └── writeup.docx /FW.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | from scipy import optimize 4 | from scipy.optimize import minimize_scalar 5 | import scipy.linalg as la 6 | import numpy.linalg as la2 7 | import scipy.integrate as integrate 8 | 9 | 10 | def estimatetime(t0,xa,ca): 11 | ta = t0*(1+0.15*(xa/ca)**4) 12 | return ta 13 | 14 | def estimateZ(alpha,xa,ca,t0,ya): 15 | Z = 0 16 | for i in range(len(xa)): 17 | Z += integrate.quad(lambda x: estimatetime(t0[i],x,ca[i]),0,xa[i]+alpha*(ya[i]-xa[i]))[0] 18 | return Z 19 | 20 | def linearsearch(xa,ca,t0,ya): 21 | alpha = minimize_scalar(estimateZ, args=(xa, ca, t0,ya), bounds = (0,1), method = 'Bounded') 22 | return alpha.x 23 | 24 | 25 | 26 | # main functions 27 | #### Step 1: Network Representation and Data Structure 28 | ## Define the link-node matrix 29 | LinkNode = pd.read_csv("linknode2.csv", header = None) 30 | LinkNode = LinkNode.as_matrix() 31 | #print LinkNode 32 | #print LinkNode.shape() 33 | #print LinkNode 34 | 35 | ## Import Demand matrix (Q) 36 | Q = pd.read_csv("Q.csv", header = None) 37 | Q = Q.as_matrix() 38 | #print Q 39 | 40 | ## create travel time vector (ta) 41 | n = 76 # number of total links 42 | k = 24 # number of total nodes 43 | 44 | 45 | ## create initial link flow vector (X) 46 | #X = np.zeros(n) 47 | 48 | 49 | ## creat link flow matrix for iterations (Y) 50 | s = (n,k) # 76 links, 24 nodes/origins 51 | #Y = np.zeros(s) # each entry represents the flow on link a from origin i 52 | 53 | ## import the travel time coeff. estimation matrix (Coeff) 54 | coeff = pd.read_csv("coeff2.csv", header = None) 55 | coeff = coeff.as_matrix() 56 | #print coeff 57 | #print coeff.shape 58 | 59 | 60 | 61 | 62 | ### Step 2: Shortest Path Searching (Solve LP) 63 | 64 | ##Initialization 65 | 66 | t0 = coeff [:,0] # free flow travel time from 1st column of *Coeff* 67 | ca = coeff[:,1] # capacity for each link 68 | 69 | 70 | #ya = np.sum(Y,axis = 1) # column sums of Y: total flow on link a from all origins 71 | #Z = np.dot(np.transpose(t0),ya) # k*k matrix 72 | #LEF = np.dot(np.transpose(LinkNode),Y) # a k*k matrix, each column is for each origin i; within each column, there's one row for origin constraint, one row for destination constraint, and k-2 rows for zero constraint 73 | 74 | origq = np.sum(Q, axis = 1) # row sums of Q: total flow from origin i 75 | destq = -Q 76 | s2 = (k,k) 77 | RHT = np.zeros(s2)# each row represents an origin, each column represents the flow on node k (with origin i ) 78 | RHT = -Q 79 | np.fill_diagonal(RHT, origq) 80 | #print RHT 81 | 82 | 83 | c0_0 = np.transpose(t0) 84 | c_0 = np.tile(c0_0,k) 85 | 86 | A0 = np.transpose(LinkNode) # Construct block matrix for A_eq 87 | A1 = [A0]*k 88 | A = la.block_diag(*A1) 89 | #print A 90 | 91 | b0 = np.transpose(RHT) 92 | b = np.ravel(b0, order = 'F')[:,np.newaxis] # construct long b_eq 93 | 94 | ybounds = (0, None) 95 | result = optimize.linprog( 96 | c_0, A_eq = A, b_eq = b, bounds = (ybounds), options = {"disp":True, "maxiter":2000,"bland":True} 97 | ) 98 | #print result 99 | #print len(result['x']) 100 | result = np.reshape(result['x'],(k,n)) 101 | #print result 102 | xa = np.sum(result, axis = 0) # intialization xa 103 | #print xa 104 | ta = estimatetime(t0,xa,ca) 105 | 106 | 107 | ############### 108 | step = 0 109 | tanorm = 1000000 110 | 111 | iteration = [] 112 | Z = [] 113 | 114 | while (tanorm>7.6): # allow each link has 0.1 diff. in ta on average 115 | ### Update 116 | print "step ", step 117 | iteration.append(step) 118 | ta_old = ta 119 | 120 | 121 | ### direction 122 | c0 = np.transpose(ta) 123 | c = np.tile(c0,k) 124 | result = optimize.linprog( 125 | c, A_eq = A, b_eq = b, bounds = (ybounds), options = {"disp":True, "maxiter":2000,"bland":True} 126 | ) 127 | #resultz = result['fun'] #print objective value 128 | #print "z is",resultz 129 | resultx = np.reshape(result['x'],(k,n)) 130 | ya = np.sum(resultx, axis = 0) # yn 131 | 132 | ### move 133 | alpha = linearsearch(xa,ca,t0,ya) 134 | print "alpha is", alpha 135 | xa = (1-alpha)*xa + alpha * ya 136 | print "xa is ",xa 137 | 138 | ### Update 139 | ta = estimatetime(t0,xa,ca) 140 | tanorm = la2.norm(ta-ta_old) 141 | z = np.dot(np.transpose(xa),ta) 142 | Z.append(z) 143 | print "ta is ", ta 144 | print "norm of ta is ", tanorm 145 | step +=1 146 | 147 | 148 | 149 | import matplotlib.pyplot as plt 150 | plt.plot(iteration,Z,'ro') 151 | plt.xlabel('iteration number') 152 | plt.ylabel('Z(x)') 153 | plt.show() 154 | 155 | 156 | np.savetxt("ta", ta, delimiter = ",") 157 | np.savetxt("xa", xa, delimiter = ",") 158 | 159 | -------------------------------------------------------------------------------- /Q.csv: -------------------------------------------------------------------------------- 1 | 0,100,100,500,200,300,500,800,500,1300,500,200,500,300,500,500,400,100,300,300,100,400,300,100 2 | 100,0,100,200,100,400,200,400,200,600,200,100,300,100,100,400,200,0,100,100,0,100,0,0 3 | 100,100,0,200,100,300,100,200,100,300,300,200,100,100,100,200,100,0,0,0,0,100,100,0 4 | 500,200,200,0,500,400,400,700,700,1200,1400,600,600,500,500,800,500,100,200,300,200,400,500,200 5 | 200,100,100,500,0,200,200,500,800,1000,500,200,200,100,200,500,200,0,100,100,100,200,100,0 6 | 300,400,300,400,200,0,400,800,400,800,400,200,200,100,200,900,500,100,200,300,100,200,100,100 7 | 500,200,100,400,200,400,0,1000,600,1900,500,700,400,200,500,1400,1000,200,400,500,200,500,200,100 8 | 800,400,200,700,500,800,1000,0,800,1600,800,600,600,400,600,2200,1400,300,700,900,400,500,300,200 9 | 500,200,100,700,800,400,600,800,0,2800,1400,600,600,600,900,1400,900,200,400,600,300,700,500,200 10 | 1300,600,300,1200,1000,800,1900,1600,2800,0,4000,2000,1900,2100,4000,4400,3900,700,1800,2500,1200,2600,1800,800 11 | 500,200,300,1500,500,400,500,800,1400,3900,0,1400,1000,1600,1400,1400,1000,100,400,600,400,1100,1300,600 12 | 200,100,200,600,200,200,700,600,600,2000,1400,0,1300,700,700,700,600,200,300,400,300,700,700,500 13 | 500,300,100,600,200,200,400,600,600,1900,1000,1300,0,600,700,600,500,100,300,600,600,1300,800,800 14 | 300,100,100,500,100,100,200,400,600,2100,1600,700,600,0,1300,700,700,100,300,500,400,1200,1100,400 15 | 500,100,100,500,200,200,500,600,1000,4000,1400,700,700,1300,0,1200,1500,200,800,1100,800,2600,1000,400 16 | 500,400,200,800,500,900,1400,2200,1400,4400,1400,700,600,700,1200,0,2800,500,1300,1600,600,1200,500,300 17 | 400,200,100,500,200,500,1000,1400,900,3900,1000,600,500,700,1500,2800,0,600,1700,1700,600,1700,600,300 18 | 100,0,0,100,0,100,200,300,200,700,200,200,100,100,200,500,600,0,300,400,100,300,100,0 19 | 300,100,0,200,100,200,400,700,400,1800,400,300,300,300,800,1300,1700,300,0,1200,400,1200,300,100 20 | 300,100,0,300,100,300,500,900,600,2500,600,500,600,500,1100,1600,1700,400,1200,0,1200,2400,700,400 21 | 100,0,0,200,100,100,200,400,300,1200,400,300,600,400,800,600,600,100,400,1200,0,1800,700,500 22 | 400,100,100,400,200,200,500,500,700,2600,1100,700,1300,1200,2600,1200,1700,300,1200,2400,1800,0,2100,1100 23 | 300,0,100,500,100,100,200,300,500,1800,1300,700,800,1100,1000,500,600,100,300,700,700,2100,0,700 24 | 100,0,0,200,0,100,100,200,200,800,600,500,700,400,400,300,300,0,100,400,500,1100,700,0 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Implementation-of-the-Frank-Wolfe-Algorithm 2 | The purpose this project is to implement the Frank-Wolfe Algorithm for transportation network analysis. The next section summarizes the key steps involved in the Python coding process, followed by two traffic assignment applications. The report is concluded with a discussion of findings and future plans. 3 | -------------------------------------------------------------------------------- /Zconvergence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serena049/Implementation-of-the-Frank-Wolfe-Algorithm/15feb20288470404c31ab6a0539d7cdb8ca9997a/Zconvergence.png -------------------------------------------------------------------------------- /coeff2.csv: -------------------------------------------------------------------------------- 1 | 6,25900.20064 2 | 4,23403.47319 3 | 6,25900.20064 4 | 5,4958.180928 5 | 4,23403.47319 6 | 4,17110.52372 7 | 4,23403.47319 8 | 4,17110.52372 9 | 2,17782.7941 10 | 6,4908.82673 11 | 2,17782.7941 12 | 4,4947.995469 13 | 5,10000 14 | 5,4958.180928 15 | 4,4947.995469 16 | 2,4898.587646 17 | 3,7841.81131 18 | 2,23403.47319 19 | 2,4898.587646 20 | 3,7841.81131 21 | 10,5050.193156 22 | 5,5045.822583 23 | 5,10000 24 | 10,5050.193156 25 | 3,13915.78842 26 | 3,13915.78842 27 | 5,10000 28 | 6,13512.00155 29 | 4,4854.917717 30 | 8,4993.510694 31 | 6,4908.82673 32 | 5,10000 33 | 6,4908.82673 34 | 4,4876.508287 35 | 4,23403.47319 36 | 6,4908.82673 37 | 3,25900.20064 38 | 3,25900.20064 39 | 4,5091.256152 40 | 4,4876.508287 41 | 5,5127.526119 42 | 4,4924.790605 43 | 6,13512.00155 44 | 5,5127.526119 45 | 3,14564.75315 46 | 3,9599.180565 47 | 5,5045.822583 48 | 4,4854.917717 49 | 2,5229.910063 50 | 3,19679.89671 51 | 8,4993.510694 52 | 2,5229.910063 53 | 2,4823.950831 54 | 2,23403.47319 55 | 3,19679.89671 56 | 4,23403.47319 57 | 3,14564.75315 58 | 2,4823.950831 59 | 4,5002.607563 60 | 4,23403.47319 61 | 4,5002.607563 62 | 6,5059.91234 63 | 5,5075.697193 64 | 6,5059.91234 65 | 2,5229.910063 66 | 3,4885.357564 67 | 3,9599.180565 68 | 5,5075.697193 69 | 2,5229.910063 70 | 4,5000 71 | 4,4924.790605 72 | 4,5000 73 | 2,5078.508436 74 | 4,5091.256152 75 | 3,4885.357564 76 | 2,5078.508436 77 | -------------------------------------------------------------------------------- /linknode.csv: -------------------------------------------------------------------------------- 1 | 1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,1,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0 0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,1,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,1,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,-1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,1,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0 0,0,0,0,0,-1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0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,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,-1,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,-1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,1,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,1,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0 0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,1,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1 0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1 -------------------------------------------------------------------------------- /linknode2.csv: -------------------------------------------------------------------------------- 1 | 1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,1,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,-1,1,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0 0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,1,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1 0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1 -------------------------------------------------------------------------------- /writeup.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serena049/Implementation-of-the-Frank-Wolfe-Algorithm/15feb20288470404c31ab6a0539d7cdb8ca9997a/writeup.docx --------------------------------------------------------------------------------