Professional Documents
Culture Documents
ST2103 - Computer Aided Design: Unit-4 Optimization: Unit 4 Basic Concepts of Linear Programming Objectives
ST2103 - Computer Aided Design: Unit-4 Optimization: Unit 4 Basic Concepts of Linear Programming Objectives
UNIT 4
Objectives
Structure
o Introduction
o Uses of Linear Programming
o Standard form
o Augmented form
o Duality
o Special cases
o Complementary slackness
o Summary
o Further readings
INTRODUCTION
defined on this polytope, a linear programming method will find a point in the polytope
where this function has the smallest (or largest) value. Such points may not exist, but if
they do, searching through the polytope vertices is guaranteed to find at least one of
them.Linear programs are problems that can be expressed in canonical form:
Maximize
Subject to
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
X represents the vector of variables (to be determined), while c and b are vectors of
(known) coefficients and A is a (known) matrix of coefficients. The expression to be
maximized or minimized is called the objective function ( in this case). The equations
are the constraints which specify a convex polyhedron over which the objective
function is to be optimized.
Theory
There are two situations in which no optimal solution can be found. First, if the
constraints contradict each other (for instance, x ≥ 2 and x ≤ 1) then the feasible region is
empty and there can be no optimal solution, since there are no solutions at all. In this
case, the LP is said to be infeasible.
Barring these two pathological conditions (which are often ruled out by resource
constraints integral to the problem being represented, as above), the optimum is always
attained at a vertex of the polyhedron. However, the optimum is not necessarily unique: it
is possible to have a set of optimal solutions covering an edge or face of the polyhedron,
or even the entire polyhedron (This last situation would occur if the objective function
were constant).
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
STANDARD FORM
Standard form is the usual and most intuitive form of describing a linear programming
problem. It consists of the following three parts:
e.g. maximize
e.g.
• Non-negative variables
e.g.
maximize
subject to
Example 1
Suppose that a farmer has a piece of farm land, say A square kilometres large, to
be planted with either wheat or barley or some combination of the two. The farmer has a
limited permissible amount F of fertilizer and P of insecticide which can be used, each of
which is required in different amounts per unit area for wheat (F1, P1) and barley (F2, P2).
Let S1 be the selling price of wheat, and S2 the price of barley. If we denote the area
planted with wheat and barley by x1 and x2 respectively, then the optimal number of
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
square kilometres to plant with wheat vs barley can be expressed as a linear programming
problem:
maximize
subject to
Maximize Z in:
where are the newly introduced slack variables, and Z is the variable to be maximized.
Example 2
The example above becomes as follows when converted into augmented form:
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
Maximize Z in:
DUALITY
maximize
subject to
minimize
subject to
There are two ideas fundamental to duality theory. One is the fact that the dual of
a dual linear program is the original primal linear program. Additionally, every feasible
solution for a linear program gives a bound on the optimal value of the objective function
of its dual. The weak duality theorem states that the objective function value of the dual
at any feasible solution is always greater than or equal to the objective function value of
the primal at any feasible solution. The strong duality theorem states that if the primal has
an optimal solution, x*, then the dual also has an optimal solution, y*, such that
cTx*=bTy*.
A linear program can also be unbounded or infeasible. Duality theory tells us that
if the primal is unbounded then the dual is infeasible by the weak duality theorem.
Likewise, if the dual is unbounded, then the primal must be infeasible. However, it is
possible for both the dual and the primal to be infeasible (See also Farkas' lemma).
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
Example 3
Revisit the above example of the farmer who may grow wheat and barley with the
set provision of some A land, F fertilizer and P insecticide. Assume now that unit prices
for each of these means of production (inputs) are set by a planning board. The planning
board's job is to minimize the total cost of procuring the set amounts of inputs while
providing the farmer with a floor on the unit price of each of his crops (outputs), S1 for
wheat and S2 for barley. This corresponds to the following linear programming problem:
minimize
subject to
The primal problem deals with physical quantities. With all inputs available in
limited quantities, and assuming the unit prices of all outputs is known, what quantities of
outputs to produce so as to maximize total revenue? The dual problem deals with
economic values. With floor guarantees on all output unit prices, and assuming the
available quantity of all inputs is known, what input unit pricing scheme to set so as to
minimize total expenditure?
The coefficients which bound the inequalities in the primal space are used to
compute the objective in the dual space, input quantities in this example. The coefficients
used to compute the objective in the primal space bound the inequalities in the dual
space, output unit prices in this example.
Both the primal and the dual problems make use of the same matrix. In the primal
space, this matrix expresses the consumption of physical quantities of inputs necessary to
produce set quantities of outputs. In the dual space, it expresses the creation of the
economic values associated with the outputs from set input unit prices.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
Since each inequality can be replaced by an equality and a slack variable, this
means each primal variable corresponds to a dual slack variable, and each dual variable
corresponds to a primal slack variable. This relation allows us to complementary
slackness.
SPECIAL CASES
maximize
subject to
such that the matrix A and the vectors b and c are non-negative.
minimize
subject to
such that the matrix A and the vectors b and c are non-negative.
Example 4
COMPLEMENTARY SLACKNESS
Suppose that x = (x1, x2, . . ., xn) is primal feasible and that y = (y1, y2, . . . , ym) is
dual feasible. Let (w1, w2, . . ., wm) denote the corresponding primal slack variables, and
let (z1, z2, . . . , zn) denote the corresponding dual slack variables. Then x and y are
optimal for their respective problems if and only if xjzj = 0, for j = 1, 2, . . . , n, wiyi = 0,
for i = 1, 2, . . . , m.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
So if the ith slack variable of the primal is not zero, then the ith variable of the dual
is equal zero. Likewise, if the jth slack variable of the dual is not zero, then the jth variable
of the primal is equal to zero.
SUMMARY
The variables associated with unit columns are called basic variables; all other
variables are called nonbasic variables.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
The pivot element is the element common to both the pivot column and the pivot row.
Example 1: Maximize P = 3x + 2y
Subject to 2x + 3y ≤ 12
2x + y ≤ 8
x ≥ 0, y ≥ 0
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
3) Perform the pivot operation. Locate the pivot element and convert it to a 1 by
dividing all the elements in the pivot row by the pivot element. Using row
operations, convert the pivot column into a unit column by adding suitable
multiplies of the pivot row to each of the other rows as required. Return to step 2.
4) Determine the optimal solution(s). The value of the variable heading each unit
column is given by the entry lying in the column of constants in the row
containing the 1. The variables heading columns not in unit form are assigned the
value zero.
Definition of a Project
Project Management
What is the goal (or goals) of the project? Examples of project goals include
building a bridge, relocating the MIS department to a new site or installing a new phone
system. More importantly, some examples of things that are NOT projects include
scheduling the usage for a training facility or scheduling engineers in a technical service
department. These are not projects because they do not meet all the criteria of a project.
They do not have a definitive start, finish, and duration.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
Reporting Progress
During and after a project, it is important to review and analyze the performance
on the project. This information can provide valuable insight into possible changes to
make for future projects. For example, your project was to build a house, and one of the
steps involved was landscaping. After the project is finished, you notice that it took less
time to do the landscaping than you originally planned. This information could be
valuable if you build another house, because you could reduce the time allocated for
landscaping. By constantly reviewing the efficiency and effectiveness of your project,
you can more accurately plan future projects.
Project Managers
Project managers are responsible for managing projects. They coordinate projects
and related tasks, but do not usually have direct management responsibilities for
resources assigned to their project. The resources involved in one project may not be the
same resources involved in another project. Project managers focus only on work that is
specific to their project, and are primarily task and time-constrained: “How do I ensure
my project gets finished in the shortest amount of time?” is a question on every project
manager’s mind each day.
The definitions and calculations in this section assume a simple classical project
consisting of a set of tasks, task dependencies, and task constraints.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
A task dependency (relationship) occurs if the start or finish of one task (the
successor task) depends on the start or finish of another task (the predecessor task). For
example, if Task B can start when Task A finishes or later, then Task A is a predecessor
of Task B with a Finish-to-Start (FS) relationship. Other relationships are SS (Start-to-
Start), FF (Finish-to-Finish), and SF (Start-to-Finish). Lag or Lead (negative Lag) can be
specified in a relationship to allow the successor to start later or earlier than the original
plain relationship. For example, an SF relationship with negative 2 days of lag means that
the successor can start 2 days before the predecessor finishes, or later.
A task constraint limits when the task can occur, independent of other tasks. For
example, if a task cannot start any earlier than 1/1/98, then it would have a "Start No
Earlier Than" (SNET) type of constraint with a constraint date of 1/1/98.
The Critical Path Method (CPM) is a method of calculating the total duration of
a project based on a specified project start date and on the individual duration of tasks
and on their dependencies. CPM also provides useful information about how far a task
can slip into the future before it moves other tasks or makes the project finish later.
For a specified project start date and a set of tasks along with their dependencies and
constraints, the CPM method calculates the following:
• The earliest date each task can start and finish, and the earliest date the project can
finish.
• The latest date each task can start and finish, without causing the project to finish
later.
• How far into the future each task can slip without causing any other task to finish
later. [those statements are identical!].
• Which tasks are critical, for example, which tasks will cause the project to finish later
if they slip.
Task A task dependency describes how a task is related to the start or finish of
Dependency another task. Microsoft Project provides four task dependencies you can use to
connect a series of tasks in a schedule. By using these dependencies effectively,
you can modify the critical path and shorten your project schedule slack.
Lag Time A delay between tasks that have a dependency. For example, if you need a two-
day delay between the finish of one task and the start of another, you can
establish a finish-to-start relationship and specify a two-day lag time. You enter
lag time as a positive value relationship.
Predecessor A task whose start or finish determines the start or finish of another task.
Successor A task that cannot start or finish until another task starts or finishes.
Early Start The Early Start field contains the earliest date that a task could possibly begin,
based on the early start dates of predecessor and successor tasks, and other
constraints. Early Start is calculated as follows: When you first create a task, its
early start date is the same as the scheduled start date. As you link the task to
predecessors and successors and apply any other constraints, Microsoft Project
calculates the early start date as the earliest possible date this task could be
started, if all predecessor and successor tasks also start on their early start dates.
If there is a leveling delay on the task, this is also figured into the early start
date.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
Early Finish The Early Finish field contains the earliest date that a task could possibly finish,
based on early finish dates of predecessor and successor tasks, other constraints,
and any leveling delay.
Late Start The Late Start field contains the latest date that a task can start without delaying
the finish of the project. This date is based on the task’s start date, as well as the
late start and late finish dates of predecessor and successor tasks, and other
constraints.
Late Finish The Late Finish field contains the latest date that a task can finish without
delaying the finish of the project. This date is based on the task’s late start date,
as well as the late start and late finish dates of predecessor and successor tasks,
and other constraints.
Critical task A task that must be completed on schedule for the project to finish on time. If a
critical task is delayed, the project completion date is also delayed. A series of
critical tasks makes up a project's critical path.
Critical path The series of tasks that must be completed on schedule for a project to finish on
schedule. Each task on the critical path is a critical task. Most tasks in a typical
project have some slack and can therefore be delayed a little without affecting
the project finish date. Those tasks that cannot be delayed without affecting the
project finish date are the critical tasks. As you modify tasks to resolve over
allocations or other problems in your schedule, be aware of the critical tasks and
that changes to them will affect your project finish date.
Critical Path A project management method of calculating the total duration of a project
Method based on individual task durations and their interdependencies.
(CPM)
Slack (or The amount of time a task can slip before it affects another task's dates or the
Float) project finish date. Slack is sometimes referred to as float time.
Free Slack The amount of time a task can slip before it delays another task.
Total Slack The amount of time a task can slip before it delays the project finish date. When
the total slack is negative, the duration for a task is too long for its successor to
begin on the date required by its constraint.
CPM produces results by doing a Forward Pass calculation followed by a Backward Pass
calculation:
• Forward Pass: All tasks are calculated to start as early as possible for the specified
task dependencies and constraints, and the specified project start date. The latest
finishing task(s) determines the project finish date. The Early Start and Early Finish
dates for each task are calculated during this pass.
• Backward Pass: All tasks are calculated to finish as late as possible for the specified
task dependencies and constraints, and the project finish date calculated from the
Forward pass. The Late Start and Late Finish dates are calculated for each task during
this pass.
Example
A project starts on Jan 1, 1998 and every day is a working day. The four columns
below are the specified task ID, Duration (in days), Predecessors, and Successors. All the
relationships are FS, and there are no other constraints (like Start No Earlier Than).
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
Forward Pass:
In the table below, the cells filled with the letter "e" show how the task Early Start
and Early Finish dates are calculated during the forward pass. Notice that tasks with no
predecessors start at the specified project start date (Jan 1), and other tasks are scheduled
as early as possible for the specified relationships. The calculated project finish date is
Jan 7.
ID Dur Pre Succ Jan Jan Jan Jan Jan Jan Jan Jan Jan Earl Early Free
. d. . 1 2 3 4 5 6 7 8 9 y Finish Slack
Start
1 2d 3 E E Jan 1 Jan 2 2d
2 4d 3 E E E E Jan 1 Jan 4 0d
3 3d 1,2 E E E Jan 5 Jan 7 0d
4 2d 5 E E Jan 1 Jan 2 0d
5 3d 4 E E E Jan 3 Jan 5 2d
Backward Pass:
In the table below, the cells filled with the letter "X" show how the task Late Start
and Late Finish dates are calculated during the backward pass. Notice that tasks with no
successors start at the project finish date that was calculated during the forward pass (Jan
7), and that other tasks are scheduled as late as possible for the specified relationships.
ID Dur Pre Succ Jan Jan Jan Jan Jan Jan Jan Late Late
. d. . 1 2 3 4 5 6 7 Start Finish
1 2d 3 X X Jan 3 Jan 4
2 4d 3 X X X X Jan 1 Jan 4
3 3d 1,2 X X X Jan 5 Jan 7
4 2d 5 X X Jan 3 Jan 4
5 3d 4 X X X Jan 5 Jan 7
A comparison of the Early and Late dates for a task is used to compute its Total
Slack and to determine if the task is critical (Zero Total Slack). From the table below,
you can see that the only critical tasks are task 2 and 3, and that they form a single critical
path from the start to the end of the project.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
ID Dur Pre Succ Jan Jan Jan Jan Jan Jan Jan Total Critica
. d. . 1 2 3 4 5 6 7 Slack l
1 2d 3 E E 2d No
X X
2 4d 3 E E E E 0d Yes
X X X X
3 3d 1,2 E E E 0d Yes
X X X
4 2d 5 E E 2d No
X X
5 3d 4 E E E 2d No
X X X
More complicated projects can have more than one critical path. In non-classical
projects with more advanced features, a project might have no critical path. See the
Scheduling module for examples.
PERT charts depict task, duration, and dependency information. Each chart starts
with an initiation node from which the first task, or tasks, originates. If multiple tasks
can begin at the same time, they are all started from the node and branch, or fork out from
the start point.
Each task is connected to its successor tasks in this manner forming a network of
nodes and connecting lines. The chart is complete when all final tasks come together at
the completion node. Where slack time exists between the end of one task and the start of
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
another, the usual method is to draw a broken, or dotted line between the end of the first
task and the start of the next dependent task.
It should be noted at this point that project review, approvals, user reviews, etc.,
all take time. This time should never be underestimated when drawing up the project
plan. It is not unusual for a review to take a week or even two. Obtaining management
and user approvals may take even longer.
When drawing up the plan, be sure to include tasks for documentation writing,
documentation editing, project report writing and editing, and report reproduction. These
tasks are usually time consuming so don't underestimate how long it will take to complete
them.
PERT charts are usually drawn on ruled paper with the horizontal axis indicating
time period divisions in days, weeks, months, etc. Although it is possible to draw a PERT
chart for an entire project, the usual practice is to break the plans into smaller, more
meaningful parts. This is very helpful if the chart has to be redrawn for any reason, such
as skipped or incorrectly estimated tasks.
Many PERT charts terminate at the major review points, such as at the end of the
analysis stage or even at the end of the feasibility analysis. Many organizations include
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>
ST2103 – Computer Aided Design : Unit-4 Optimization
funding reviews in the project life cycle. Where this is the case, each chart terminates in a
funding review node.
Funding reviews can affect a project in that they may either increase funding, in
which case more people may be made available, or they may decrease funding, in which
case fewer people may be available. Obviously more or less people will affect the length
of time it takes to complete a project.
Prepared based on syllabus 2015-2016 curriculum | <A. VIJAY, ASST. PROF./CIVIL SRMIST
@VJENGR>