
Explanation of Solution
Determining the order in which the gasolines are produced each day:
It is given that, Sunco each day manufactures four types of gasoline, such as, Lead Free Premium (LFP), Lead-Free Regular (LFR), Leaded Premium (LP), and Leaded Regular (LR).
It is also mentioned that the time needed to produce a batch of gasoline depends on the type of gasoline last produced because of cleaning and resetting of the machinery. This is because the time taken to switch between the two types of gasoline is different for all the types.
The time (in minutes) required to manufacture each day's gasoline requirement are shown in table given below:
Last Produced Gasoline | Gas to be Next Produced | |||
LFR | LFP | LR | LP | |
LFR | - | 50 | 120 | 140 |
LFP | 60 | - | 140 | 110 |
LR | 90 | 130 | - | 60 |
LP | 130 | 120 | 80 | - |
Now the order in which the gasoline must be produced to minimize the switch time is determined using branch and bound method.
The given problem is to determine the order in which the gasoline must be produced with the aim of minimizing the total time required for the whole manufacturing process. This is simply the case of Travelling Salesperson Problem (TSP) which will ensure the manufacturing of all the four types of gasoline in consecutive order without repetition.
Now, consider that TSP observed here consists of the four types of gasoline LFR, LFP, LR, and LP referred as 1, 2, 3 and 4 respectively.
Let,
And,
Here, “M” is a very large number to ensure that the machinery cannot switch to manufacturing type “i” immediately after manufacturing of type “i” itself.
The decision variable for the given problem can be defined as follows:
provided,
The given problem can be considered as subproblem 1 as given problem:
Subproblem 1:
Last Produced Gasoline | LFR | LFP | LR | LP | |
1 | 2 | 3 | 4 | ||
LFR | 1 | M | 50 | 120 | 140 |
LFP | 2 | 60 | M | 140 | 110 |
LR | 3 | 90 | 130 | M | 60 |
LP | 4 | 130 | 120 | 80 | M |
The subproblems of TSP are considered as assignment problems and the assignment problem are solved using Hungarian method in the following manner.
First, subtract minimum
Last Produced Gasoline | LFR | LFP | LR | LP | |
1 | 2 | 3 | 4 | ||
LFR | 1 | M | 0 | 70 | 90 |
LFP | 2 | 0 | M | 80 | 50 |
LR | 3 | 30 | 70 | M | 0 |
LP | 4 | 50 | 40 | 0 | M |
The minimum value to each variable is assigned by selecting single zero in a row, eliminating the zero lying in the column of chosen zero row. Apply the same for column as well if any single zero columns are left in the matrix after row wise selection of single zero.
Since here each row and column consists of single zero, therefore, we can easily complete the assignment of each decision variable. It is concluded that each of the decision variable will be assigned a value 1 in the cell where

Want to see the full answer?
Check out a sample textbook solution
Chapter 9 Solutions
Operations Research : Applications and Algorithms
- 3) Find CFGs that for these regular languages over the alphabet Σ= {a, b}. Draw a Finite Automata e CFG. 1 COIS-3050H-R-W01-2025WI-COMB Formal anguages & Automata Is that contain the substring aba. (b) The language of all words that have an odd number letters and contains the string bb. (c) The language of all words that begin with the substring ba and contains an odd number of letters. 4) Convert the following FA into a PDA. a a S± b a a Ν Ꮓarrow_forwardCOIS-3050H-R-W01-2025WI-COMB Formal ministic PDA. Are the following words accepted by this Languages & Automata UI MIUSɩ that aTU I ed, indicate which state the PDA is in when the crash occurs. (a) aabbaa (b) aaabab (c) bababa Start (d) aaaabb A Accept Read₁ Push a (e) aaaaaa a b Read, Popi a a,b A Read₂ Accept A Pop₂arrow_forward5) Eliminate the A-productions from the following CFG: Abc COIS-3050H-R-W01-2025WI-COMB Formal Languages & Automata BAabC C CaA | Bc | A 6) Convert the following CFG into CNF. S→ XYZ XaXbS | a |A YSbS | X | bb Z→ barrow_forward
- Need help answering these questions!1. Design a While loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should iterate as long as the product contains a value less than 100. 2. Design a For loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 . . . 1000 3. Convert the While loop in the following code to a Do-While loop: Declare Integer x = 1 While x > 0 Display "Enter a number." Input x End Whilearrow_forwardNeed help with these:Design a While loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should iterate as long as the product contains a value less than 100. 2. Design a For loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 . . . 1000 3. Convert the While loop in the following code to a Do-While loop: Declare Integer x = 1 While x > 0 Display "Enter a number." Input x End Whilearrow_forwardConvert the While loop in the following code to a Do-While loop: Declare Integer x = 1 While x > 0 Display "Enter a number." Input x End Whilearrow_forward
- Python - need help creating a python program that will sum the digits of a number entered by the user. For example if the user inputs the value 243 the program will output 9 because 2 + 4 + 3 = 9. The program should ask for a single integer from the user, it should then calculate the sum of all the digits of that number and output the result.arrow_forwardI need help with this in Python (with flowchart): Im creating a reverse guessing game. Then to choose a random number from 1 to 100 and the computer program will attempt to guess it, displaying the directions calculated or not. The guess will be displayed and the user will answer if it was correct or not. If correct, the game ends, if not then the computer asks if the guess was too high or too low. Finally inputting an answer and the computer generates a new guess within the proper range. Oh and to make sure the program doesnt guess outside of the ranges produced by the inputs of “too high” and “too low”. The program ending when the user guesses correctly or after the program takes 6 guesses. HELP ASAP!arrow_forwardI need help with this in Python (with flowchart): Im creating a reverse guessing game. Then to choose a random number from 1 to 100 and the computer program will attempt to guess it, displaying the directions calculated or not. The guess will be displayed and the user will answer if it was correct or not. If correct, the game ends, if not then the computer asks if the guess was too high or too low. Finally inputting an answer and the computer generates a new guess within the proper range. Oh and to make sure the program doesnt guess outside of the ranges produced by the inputs of “too high” and “too low”. The program ending when the user guesses correctly or after the program takes 6 guesses. HELP ASAP!arrow_forward
- Need help finding errors in my pseudocode (Two)! Declare Boolean finished = False Declare Integer value, cube While NOT finished Display "Enter a value to be cubed." Input value; Set cube = value^3 Display value, " cubed is ", cube End While Next, I intended the following pseudocode to display the numbers 1 through 60, and then display the message "Time’s up!". Doesnt work and has error. Declare Integer counter = 1 Const Integer TIME_LIMIT = 60 While counter < TIME_LIMIT Display counter Set counter = counter + 1 End While Display "Time's up!"arrow_forwardHaving error in pseudcode; wanting to get five sets of two numbers each, calculate the sum of each set, and calculate the sum of all the numbers entered. Not functioning as intended and can't find the error.Code: // This program calculates the sum of five sets of two numbers. Declare Integer number, sum, total Declare Integer sets, numbers Constant Integer MAX_SETS = 5 Constant Integer MAX_NUMBERS = 2 Set sum = 0; Set total = 0; For sets = 1 To MAX_NUMBERS For numbers = 1 To MAX_SETS Display "Enter number ", numbers, " of set ", sets, "." Input number; Set sum = sum + number End For Display "The sum of set ", sets, " is ", sum "." Set total = total + sum Set sum = 0 End For Display "The total of all the sets is ", total, "."arrow_forwardNeed help converting loops!1. Convert the following While loop to a For loop: Declare Integer count = 0 While count < 50 Display "The count is ", count Set count = count + 1 End While _________________________________________________ 2. Convert the following For loop to a While loop: Declare Integer count For count = 1 To 50 Display count End Forarrow_forward
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEnhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage LearningNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning





