VRP model is infeasible

Comments

2 comments

  • Eli Towle

    Hi Marcela,

    I think the problem is with this set of constraints:

    AllNodesVisited={i: quicksum(x[i,j,camion] for j in Nodes if i!=j for camion in Camiones) for i in Nodes} #(2.2)
    vrp.addConstrs(AllNodesVisited[i]==1 for i in Nodes) #(2.2)

    which states that each node must be visited by exactly one truck. However, because each of the three trucks must pass through the depot, we should exclude the depot from these constraints:

    AllNodesVisited={i: quicksum(x[i,j,camion] for j in Nodes if i!=j for camion in Camiones) for i in Nodes if i != 'DC'} #(2.2)
    vrp.addConstrs(AllNodesVisited[i]==1 for i in Nodes if i != 'DC') #(2.2)

    I hope this helps!

    Eli

    0
    Comment actions Permalink
  • Marcela Villa Marulanda

    Thanks, Eli... I'm gonna try out your suggestion. 

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk