Question: URGENT - MUST BE DONE IN NEXT 4 HOURS. Write a MATLAB Script calling intlinprog to solve the problem formulated below. I listed the problem
URGENT - MUST BE DONE IN NEXT 4 HOURS. Write a MATLAB Script calling intlinprog to solve the problem formulated below.
I listed the problem statement for reference and my solution, but I don't know how to write the MATLAB code for it.
Problem Statement: You are given the road network connecting the source A to the destination B, as in figure below. There are two numbers associated to each edge (road): the first one represents the traveling time while the second one is the toll fee ($). You have a budget of $44 and want to go from A to B as fast as possible (minimum overall traveling time). Formulate an integer LP that finds the most convenient path (i.e., the fastest path, subject to your budget constraint) - I have my solution below. Then, write a MATLAB script calling intlinprog to solve the problem formulated.

My Solution:
I defined x as a binary decision variable where 1 = if the edge i,j is matching, and 0 = otherwise. for i = 1,...,6 and for j = 1,...6. I made my own version of the figure shown below for conventionotation.
My objective function and constrains are below:

Write a MATLAB script calling intlinprog to solve the problem formulated above.
2.5,13 2 4, 14 3, 16 2, 11 2,8 AQ2,30 6,23 4, 20 1.5,25 4 Figure 1: Road network - Problem 3. Min St. 9 3 ge i,j tt.jj is inkerer 2.5,13 2 4, 14 3, 16 2, 11 2,8 AQ2,30 6,23 4, 20 1.5,25 4 Figure 1: Road network - Problem 3. Min St. 9 3 ge i,j tt.jj is inkerer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
