solve the asymmetric traveling salesman problem More...
Go to the source code of this file.
Functions | |
def | mtz (n, c) |
def | mtz_strong (n, c) |
def | scf (n, c) |
def | mcf (n, c) |
def | sequence (arcs) |
Variables | |
int | n = 5 |
dictionary | c |
model = mtz(n,c) | |
cost = model.getObjVal() | |
x | |
u | |
list | sol = [i for (p,i) in sorted([(int(model.getVal(u[i])+.5),i) for i in range(1,n+1)])] |
list | arcs = [(i,j) for (i,j) in x if model.getVal(x[i,j]) > .5] |
f | |
solve the asymmetric traveling salesman problem
Definition in file atsp.py.
def atsp.mcf | ( | n, | |
c | |||
) |
def atsp.mtz | ( | n, | |
c | |||
) |
def atsp.mtz_strong | ( | n, | |
c | |||
) |
def atsp.scf | ( | n, | |
c | |||
) |
def atsp.sequence | ( | arcs | ) |
dictionary c |