Linear Programming Method
Linear Programming Method
MANUFACTURING
ASSIGNMENT 1
APPLICATION OF LINEAR PROGRAMMING SIMPLEX METHOD
I. Open up Labview and create new VI. Save the VI as Linear Programming Program.
II. Right-click on the block diagram and navigate to Mathematics / Optimization and drag
Linear Programming Simplex Method.vi onto the block diagram.
III. Right-Click on the Linear Programming Simplex Method.vi C input to create Control
IV. Then Right-Click on M input and create Control.
V. After that, Right-Click on the Linear Programming Simplex Method.vi B input and create
Control.
VI. Right-Click on the Linear Programming Simplex Method.vi Maximum Output and create
Indicator.
VII. Then Right-Click on the Linear Programming Simplex Method.vi X Output and create
Indicator.
VIII. After that, Right-Click on the block diagram and navigate to Dialog & User Interface and
drag Simplex error handler.vi onto the block diagram.
IX. Right-click on the Simple Error Handler.vi Input of type of dialog and create constant.
XII. Wire the Linear Programming Simplex Method.vi error output to Simplex Error
handler.vi error code input.
XIII. Right-click on the block diagram and navigate to structures and drag Case Structure onto
the block diagram.
XIV. Right-click on the block diagram and navigate to Numerics and drag Ring constant onto
the Block Diagram.
XV. Right-Click on the Ring Constant and change it to control. Then select the properties and
on the edit items, put in the value of maximize and minimize.
XVI. The value of minimize set to 0 and maximize to 1.
XVII. Change the Ring Constant name to Optimization Problem and wire it into Case Structure
Input.
XVIII. Rewire C Vector into Case Structure with default selector and back onto Linear
Programming Simplex Method.vi C Input.
XIX. Change case structure selector to 1. Right-click on the block diagram and navigate to
numeric and drag negate inside the case structure.
XX. Connect the wiring from C vector to negate input and output to Linear Programming
Simplex Method.vi C input.
XXI. Change the output of Linear Programming Simplex Method.vi Maximum 2 to Optimum
and X2 to Solution.
XXII. Right-click on the block diagram and navigate to structure and click While Loop. All the
component must be inside the While Loop. Right-click on the loop condition input and
create control.
XXIII. Right-click on the block diagram and navigate to Timing and drag waut (ms) onto the
block diagram.
XXIV. Right-click on the wait (ms) input and create constant of 100.
4. Simulation with Application to relevant Machine Learning Problem:
Linear Programming Problem in the Aviation Industry
Problem Context: An airline seeks to optimize its flight scheduling to maximize profit while adhering
to various operational constraints. This Airline has more than four constraints focusing on the
allocation of aircraft across multiple routes.
Problem Statement
Objective: Maximize the total profit from scheduled flights.
Decision Variables
• Let x1 = number of flights on Route A
• Let x2 = number of flights on Route B
• Let x3 = number of flights on Route C
• Let x4 = number of flights on Route D
Profit per Flight
• Route A: $500
• Route B: $700
• Route C: $600
• Route D: $800
Objective Function
Maximize profit:
Z=500x1+700x2+600x3+800x4
Constraints
1. Total Aircraft Availability: The airline has a maximum of 25 aircraft available.
x1+x2+x3+x4≤25x
2. Crew Availability: Each flight requires a crew, with a total of 30 crews available.
x1+x2+x3+x4≤30x
3. Flight Time Limitations: The airline can only operate a maximum of 60 flight hours per week.
2x1+3x2+1.5x3+2.5x4≤60
(Route A takes 2 hours per flight, Route B takes 3 hours, Route C takes 1.5 hours, and Route D takes
2.5 hours)
4. Minimum Flights Requirement: There must be at least 4 flights on Route A and at least 3 on
Route B.
x1≥4x, x2≥3x
5. Maximum Flights on Route C: The airline has decided not to operate more than 10 flights on
Route C.
x3≤10
6. Budget Constraints: The total operational cost for flights cannot exceed $20,000, where costs
per flight are as follows:
• Route A: $300
• Route B: $400
• Route C: $350
• Route D: $450
300x1+400x2+350x3+450x4≤20000
7. Non-negativity Constraints:
x1, x2, x3, x4≥0
LP Model Setup
Objective Function: Maximize
Z=500x1+700x2+600x3+800x4
Subject to:
1. Total aircraft availability:
x1+x2+x3+x4≤25
2. Crew availability:
x1+x2+x3+x4≤30
3. Flight time limitations:
2x1+3x2+1.5x3+2.5x4≤60
4. Minimum flights on Route A:
x1≥4x
5. Minimum flights on Route B:
x2≥3x
6. Maximum flights on Route C:
x3≤10
7. Budget constraints:
300x1+400x2+350x3+450x4≤20000
8. Non-negativity:
x1, x2, x3, x4≥0
Solution:
Key in data of Objective function and Data constrains onto front panel as below: