netshort - m subject to Start: sum {(entr,j) in ROADS}...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
set INTER; # intersections s param entr symbolic in INTER; # entrance to road network param exit symbolic in INTER, <> entr; # exit from road network p set ROADS within (INTER diff {exit}) cross (INTER diff {entr}); s param time {ROADS} >= 0; # times to travel roads var Use {(i,j) in ROADS} >= 0; # 1 iff (i,j) in shortest path v minimize Total_Time: sum {(i,j) in ROADS} time[i,j] * Use[i,j];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: m subject to Start: sum {(entr,j) in ROADS} Use[entr,j] = 1; s subject to Balance {k in INTER diff {entr,exit}}: sum {(i,k) in ROADS} Use[i,k] = sum {(k,j) in ROADS} Use[k,j]; data; d set INTER := a b c d e f g ; s param entr := a ; param exit := g ; p param: ROADS: time := a b 50, a c 100 b d 40, b e 20 c d 60, c f 20 d e 50, d f 60 e g 70, f g 70 ; f...
View Full Document

This note was uploaded on 04/01/2011 for the course CO 370 taught by Professor Henry during the Winter '11 term at Waterloo.

Ask a homework question - tutors are online