// @ Author : Zheng MA, zhengma@cs.yale.edu // @ Home: http://www.cs.yale.edu/~zhengma // @ Date : 11/12/2002 This is a simple working version of the solver for System Optimization Flow assignment problem and the User(selfish) Optimization Flow assignment problem(Nash Equilibrium). In this solver, I use an exsiting a matlab program called "Primal-Dual method for solving seperable convex optimization problem(PDSOC.m)" from SOL @Stanford University, (All rights reserved for their own, see: http://www.stanford.edu/group/SOL/software.html) which can solve a nonlinear convex optimization problem: min sum_i f(x_i), f is convex possibly nonlinear given Ax=b. (A is sparse, m*n matrix) I reformulate the System optimization flow assignment problem and the selfish user optimization flow assignment problem to the format above. In my formulation, basically x(vector) represent all the edges and possible paths for the O-D pairs in the graph. MatrixGen.java assign variables to each edge and path for the O-D pairs and generate the proper matrix A and vector b. You can just type "test" in matlab to see the result for an example in the book:"Handbooks in OR & MS vol.8, Chapter6 Network Equilibrium Models and Algorithms" page 488. I have input the graph in fig1 according my topology format in "test.top". The "test.m" is the main entry for the whole progrm, you need to change input file name for matrix A and vector b, and the latency file as well. The argument you need to change by hand for a new graph are following: Suppose f(x) is the latency function of an edge. x is the current aggregate traffic sysFun.m: xf(x) sysGrad.m: (xf(x))' sysHess.m: (xf(x))'' usrFun.m: F(x)=$f(t)dt (integral of f(t) at x) usrGrad.m: f(x)=(F(x))' usrHess.m: (f(x))' Note: those six functions can take two arguments, bandwidth of an edge u and current traffic x You may also need to tune the argument in "test.m" for the PDSCO algorithm like the initial value of x,z(solution for dual problem) to make the algorithm converge.