0% found this document useful (0 votes)
16 views2 pages

Exercice 1: (7 Points) Representation

Uploaded by

onanafrederic31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Exercice 1: (7 Points) Representation

Uploaded by

onanafrederic31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

TP ISI 4

Operational Research

Exercice 1 : (7 points)
1- Write a procedure representation in Python to represent the following graph.

2- By using Dijkstra’s algorithm, write on Python a procedure with input the previous graph and that return
all shortest paths starting at node s.

Exercice 2 : (Ordonnancement d’atelier)


There are 5 jobs, each of which has to go through the machines A and B in the order A → B. The processing
times (in hours) are given as
Job J1 J2 J3 J4 J5
Machine A 2 4 5 7 1
Machine B 3 6 1 4 8

1- Implement Johnson’s algorithm in Python to determine a sequence of these jobs that will minimise
the total elapsed time.
2- Complete this algorithm in such a way that it returns the minimum elapsed time and the idle time for
each of the machines.

Exercice 3 : (M/M/1 queuing model)


Write a Python program that takes as input the average arrival rate and service rate, and return :
The average number of customers in the system
The average queue length
The average time an arrival spends in the system
The average waiting time of an arrival in the queue
The probability that the number of customers (units) waiting in the queue and the number of units being
serviced is greater than k (where k is a given number)
The probability of having a queue.

Exercice 3 : (Linear programming)


Consider the following LP problem :

1/2
Maximize P = 3x1 + 4x2 + x3
Subject to :
x1 + 2x2 + x3 ≤ 6
2x1 + 2x3 ≤ 4
3x1 + x2 + x3 ≤ 9
x1 , x2 , x3 ≥ 0

Give the various tables to be entered into Excel to solve this LP using Excel. Solve this LP using Excel.

2/2

You might also like