def writesol(self, filename, vs):
    'Writes a GUROBI solution file'
    values = [(v.name, v.value()) for v in vs if (v.value() is not None)]
    rows = []
    for (name, value) in values:
        rows.append('{} {}'.format(name, value))
    with open(filename, 'w') as f:
        f.write('\n'.join(rows))
    return True
Writes a GUROBI solution file
def writesol(self, filename, vs):
    
    values = [(v.name, v.value()) for v in vs if (v.value() is not None)]
    rows = []
    for (name, value) in values:
        rows.append('{} {}'.format(name, value))
    with open(filename, 'w') as f:
        f.write('\n'.join(rows))
    return True