solve_scalarization: scale objective function to find new point
    Parameters:
        - n: number of cities
        - c,t: alternative edge weights, to compute two objective functions
    Returns list of candidate solutions

def solve_scalarization(n,c,t):
    """solve_scalarization: scale objective function to find new point
    Parameters:
        - n: number of cities
        - c,t: alternative edge weights, to compute two objective functions
    Returns list of candidate solutions
    """

    model = base_model(n,c,t)   # base model for minimizing cost or time
    x,u,C,T = model.data

    def explore(C1,T1,C2,T2,front):
        """explore: recursively try to find new non-dominated solutions with a scaled objective
        Parameters:
            - C1,T1: cost and time of leftmost point
            - C1,T1: cost and time of rightmost point
            - front: current set of non-dominated solutions
        Returns the updated front
        """
        alpha = float(C1 - C2)/(T2 - T1)
        # print("%s,%s -- %s,%s  (%s)..." % (C1,T1,C2,T2,alpha)
        init = list(front)
        model.setObjective(quicksum((c[i,j] + alpha*t[i,j])*x[i,j] for (i,j) in x), "minimize")
        optimize(model,front)
        front = pareto_front(front)
        # print("... added %s points" % (len(front)-len(init))
        if front == init:
            # print("no points added, returning"
            return front

        CM = model.getVal(C)
        TM = model.getVal(T)
        # print("will explore %s,%s -- %s,%s and %s,%s -- %s,%s" % (C1,T1,CM,TM,CM,TM,C2,T2)
        if TM > T1:
            front = explore(C1,T1,CM,TM,front)
        if T2 > TM:
            front = explore(CM,TM,C2,T2,front)
        return front


    # store the set of solutions for plotting
    cand = []       # to store the set of solutions for plotting
    model.setObjective(T, "minimize")

    stat = optimize(model,cand)
    if stat != "optimal":
        return []
    C1 = model.getVal(C)
    T1 = model.getVal(T)

    # change the objective function to minimize the travel cost
    model.setObjective(C, "minimize")

    stat = optimize(model,cand)
    if stat != "optimal":
        return []
    C2 = model.getVal(C)
    T2 = model.getVal(T)

    front = pareto_front(cand)
    return explore(C1,T1,C2,T2,front)