Question: Practical work 2 0 2 3 - 2 0 2 4 The practical work of the OR course consists of writing a Julia program using

Practical work
2023-2024
The practical work of the OR course consists of writing a Julia program using the JuMP library to solve an optimization problem. The problem and its variant is an application of the shortest path problem.
Problems definition and examples
Given G=(V,E) a directed graph with V={v1,cdots,vn} the set of the vertices of G,E the set of the arcs of G and a positive distance dij associated with each arc (i,j) of E, the problem consists in finding a shortest path from v1 to vn(if it exists). The distance of the path is the sum of all the distances of the arcs of the path. This problem will be denoted P1 in the following.
A variant of problem P1, denoted P2 will consist in finding two arc-disjoint paths such that the sum of their respective length is minimal. Both paths start from v1 and end in vn. Two paths are said to be arc-disjoint if they have no arc in common.
We consider the following weighted directed graph G1 :
An optimal solution of problem P1 in G1 is given in green in the figure below. The optimal distance is 12.
An optimal solution of problem P2 in G1 is given in red and blue in the graph below. The optimal value is 29.
Questions
A graph will be represented by its adjacency matrix. You will have to compute the optimal value for problem P1 and problem P2 for different graph instances using Julia/JuMP and the free solver Cbc by following the steps below.
Define the 0-1 variables associated with problem P1 and write the 0-1 Linear Program modeling P1.
Define the 0-1 variables associated with problem P2 and write the 0-1 Linear Program modeling P2.
Write a Julia function named D1 that computes the optimal value of problem P1 for a given adjacency matrix representing a graph G, and for two given vertices, a source and a destination.
 Practical work 2023-2024 The practical work of the OR course consists

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!