How to create input variable to my Vehicle platooning problem?



1 comment

  • Jaromił Najman

    Hi John,

    You can add a time by extending the multidict as

    location,cost,time = gp.multidict({
    ("A","B"): [12, 320],
    ("C","A"): [10, 600],
    ("A","D"): [12, 120],
    ("D","B"): [15, 450],
    ("F","B"): [20, 1200],
    ("C","D"): [17, 720],
    ("F","C"): [19, 240],
    ("C","E"): [15, 300],
    ("F","E"): [11, 360]})

    The keys of the multidict will be stored in location, the first entries of the lists will be stored in cost, and the second entries of the lists will be stored in time. Please, have a look at the documentation of multidict for more details and the examples and for applications.

    Best regards,

    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk