Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ENERGY
ENIGMA
ABSTRACT
With fossil fuels getting exhausted shortly and consequently less number of energy sources to
rely on, a huge energy crisis is expected. However, with a sustainable approach, energy can be
saved, which will reduce the intensity of the significant energy shortage in future. The main
objective of our project is to maximize the energy generation from a particular biogas plant by
locating a feasible region of its construction. The various proposed relationships between
population, economic development and efficiency are taken into account for generation of a
constrained non-linear optimization problem which is then solved through MATLAB. The
results are then compared with the population of various cities as per the Census of India, 2011.
The location of the Gas Pipeline Network of India plays a crucial role in the choosing a
solution among various cities in the feasible list. The approach in this project is however
gradual. We start with small linear optimization problem which can be solved graphically, then
add more variables to demonstrate the significance of other existing algorithms such as
Simplex Algorithm, then go for a MATLAB solver to solve the main objective of this project
which cannot be solved by the Simplex approach. Therefore, certain other aspects of social
importance where this project can be used have also been covered.
ACKNOWLEDGMENT
I am grateful to Prof. Sarat Kumar Das, without whose guidance and support this compilation
would not have been possible. I could not have a profound approach and solution to real life
problems through effective techniques without him. I am also very thankful to Prof. Anil
Kumar Bangia for inculcating and consolidating Linear Programming concepts possessed by
me.
Contents
ABSTRACT................................................................................................................................................... 1
ACKNOWLEDGMENT .................................................................................................................................. 2
INTRODUCTION .......................................................................................................................................... 4
LINEAR PROGRAMMING ............................................................................................................................ 5
GRAPHICAL SOLUTION .................................................................................................................... 5
UNDERSTANDING GRAPHICAL METHODOLOGY...................................................................... 5
FORMULATION OF EQUATIONS..................................................................................................... 6
SOLUTION TO THE PROBLEM ......................................................................................................... 6
PROS & CONS TO GRAPHICAL METHOD...................................................................................... 7
PROBLEM STATEMENT .................................................................................................................... 7
ALGORITHM TO SOLVE THE STANDARD PROBLEM ................................................................ 7
SIMPLEX METHOD OF SOLVING A LINEAR PROBLEM ............................................................ 8
DEALING WITH THE PROBLEM ................................................................................................................... 9
PROS & CONS TO SIMPLEX METHOD ......................................................................................... 11
GENETIC ALGORITHM .............................................................................................................................. 11
FORMULATION OF NON-LINEAR MATHEMATICAL MODEL ................................................ 12
GENERALIZED REDUCED GRADIENT ALGORITHM USING MICROSOFT EXCEL ......................................... 14
SOLVING THE MAIN PROBLEM .................................................................................................... 15
CONCLUSION............................................................................................................................................ 16
BIBLIOGRAPHY ......................................................................................................................................... 17
INTRODUCTION
Energy statistics of the contemporary period suggest that we rely heavily on fossil energy for
our energy demands. Fossil energy is a non-renewable source of energy. It takes centuries for
the bio forms deep inside the earths crust to be converted into petroleum energy. Recent
statistics suggest that the Fossil Energy Fuel Industry is now entering terminal deadline.
Therefore the need of the hour is an efficient energy plan layout to preserve the fossil energy in
the environment and switch over to renewable sources of energy. In the present scenario,
population masses are growing rapidly. Every day the increasing population adds waste
elements in the form of pollutants to the surroundings, which in turn makes the situation worse
with the incident of a lot of communicable and non-communicable diseases. Also, unchecked
sewage treatment leads to pollution of the water bodies there by affecting the aquatic life. We
can use this bio-waste source as a source of energy, which will not only allow sustainable
development but also preserve the environment.
Biogas typically refers to a mixture of different gases produced by the breakdown of organic
matter in the absence of oxygen. Biogas can be produced from raw materials such as
agricultural waste, manure, municipal waste, plant material, sewage, green waste or food
waste. It is a renewable energy source and in many cases exerts a very small carbon footprint.
Biogas can be produced by anaerobic digestion with anaerobic bacteria, which digest material
inside a closed system, or fermentation of biodegradable materials.
Biogas is primarily methane (CH4) and carbon dioxide (CO2) and may have small amounts of
hydrogen sulfide (H2S), moisture and siloxanes. The gases methane, hydrogen, and carbon
monoxide (CO) can be combusted or oxidized with oxygen. This energy release allows biogas
to be used as a fuel; it can be used for any heating purpose, such as cooking. It can also be used
in a gas engine to convert the energy in the gas into electricity and heat.
In this project, we aim to find the optimal location for setting up of a biogas plant in India, that
is, to find a feasible city with the requisite population size for an acceptable profit with
maximum efficiency of the plant as 95%.
LINEAR PROGRAMMING
This is a mathematical technique for determining a way to achieve the best outcome
(such as maximum profit or minimum loss) in a given condition for some requirements
represented as linear relationships.
Linear programming can be solved either through graphical method or by using simplex
method.
GRAPHICAL SOLUTION
Solution is achieved from the following steps:
I.
II.
III.
Figure 1
Figure 2
FORMULATION OF EQUATIONS
Let the man needs to buy x number of chairs and y number of tables. Our main objective function
is
Maximize p=15x+20y, where p is the profit obtained from the business.
Subject to constraints:
x>=0; y>=0
x+y<=30 (1)
5x+y<=100 (2)
-x+2y<=0 (3)
Feasible Region
Figure 3
SOLUTION OBTAINED:
X = 18
Y=9
P = 450
PROBLEM STATEMENT
To find out: The Grade point (p) of Population (x), Profit (y) and Efficiency (z) of Bio-Gas
Plant to be set up in a city by solving the following linear problem.
P- Grade point scale assigned to respective cities
Problem:
To maximize p = x + y + z
Subject to constraints:
x + y + z 200. (i) (Maximum grade point is 200)
2x + y z 180 (ii) (Twice the population with profit half of that and reduced
efficiency must yield a maximum grade point of 180)
x + 2y +2z 220 (iii) (Reduced population with twice the profit and increased efficiency
by a factor of 2 must yield a maximum gradepoint of 220)
x
1
y
1
Tableau - 1
z
s
t
1
1
0
t
u
p
2
-1
-1
1
2
-1
-1
2
-1
1
0
0
0
1
0
0
0
1
180
220
0
Tableau - 2
z
s
t
Ans.
s
x
0
2
1
1
3
-1
2
0
-1
1
0
0
0
0
220
180
2R1-R2
Pivot Row
220
180
620
2R3+R2
124
-1
-3
180
2R4+R2
Tableau - 3
z
s
t
Ans.
12
10
-6
-2
480
5R1-R3
x
y
10
0
0
5
-8
3
0
0
4
1
-2
2
0
0
280
620
5R2-R3
Pivot Row
-12
10
1520
5R4+R3
x
0
y
0
Tableau - 4
z
s
t
12
10
-6
u
-2
p
0
Ans.
480
Pivot Row
30
20
-10
1800
2R1+3R2
20
-10
10
10
2000
4R3-R1
10
10
2000
R4+R1
Conclusion:
x=
y=
z=
p=
60
100
40
200
0
0
0
u
0
p
0
Ans.
200
Ratio
200
90
40
206.67
The above smaller values are taken for a small hypothetical village just to establish the
linear relationships.
Using the same logic a program is compiled in C++ to compute the larger values which
are the integral multiples of the already established relationships.
MAIN PROBLEM:
Maximize
Objective function: x+y+z
Subject
c1:x+y-z<=10000000 (Consuming population is directly proportional to the generated
profit. But that would mean less duration for the biogas to formulate. Hence, reduced
efficiency directly proportional to the population. Grade Point for this case should have a
maximum value of 10000000)
-2x+y+z<=2500000 (Population growth reduced by a factor of two would mean increased
efficiency and lesser profit. Grade Point p for this case should yield a maximum value of
2500000)
-x+2y+z<=20000 (Same as the previous case, but with twice the more population should
increase the profit by a factor of 2. Grade point p for this case should yield a maximum
value of 20000)
x<=13000000 (Population cannot be more than 13000000 according to Census data 2011)
z<=95 (Efficiency should be less than or equal to 95)
x>=0
y>=0
z>=0
End
10
SOLUTION:
Objective:
10000190.00000
Primal Solution Values:
x = 6660095.00000
y = 3340000.00000
z = 95.00000
Both Ahmedabad and Chennai have population close to the above obtained value.
However, since, Ahmedabad is much closer to the Gas Pipeline Network of India, it should
be chosen as the optimal location to facilitate maximum efficiency and profit. The Gas
Pipeline Network would enhance the energy transportation at least cost.
Figure 4
Figure 5
11
GENETIC ALGORITHM
The genetic algorithm is a method for solving both constrained and unconstrained optimization
problems that is based on natural selection, the process that drives biological evolution. The
genetic algorithm repeatedly modifies a population of individual solutions. At each step, the
genetic algorithm selects individuals at random from the current population to be parents and
uses them to produce the children for the next generation. Over successive generations, the
population "evolves" toward an optimal solution. You can apply the genetic algorithm to solve
a variety of optimization problems that are not well suited for standard optimization
algorithms, including problems in which the objective function is discontinuous, nondifferentiable, stochastic, or highly nonlinear. The genetic algorithm can address problems
of mixed integer programming, where some components are restricted to be integer-valued.
The genetic algorithm uses three main types of rules at each step to create the next generation
from the current population:
Selection rules select the individuals, called parents, that contribute to the population at the
next generation.
Crossover rules combine two parents to form children for the next generation.
Mutation rules apply random changes to individual parents to form children.
The genetic algorithm differs from a classical, derivative-based, optimization algorithm in two
main ways, as summarized in the following table.
Tableau - 5
Classical Algorithm
Genetic Algorithm
In order to arrive at a better optimal solution the results of the APMonitor Interface Solver
(using Genetic Algorithm) were compared with the Generalised Reduced Gradient Algorithm
of Microsoft Excel.
12
maximize p = x1+x22+x3
where, p is the Grade Point of the plant.
Figure 6
Source: U.S. Census Bureau, International Data Base, June 2011 Update
The figure above suggests that GDP growth of the country decreases in exponentially as the
population growth increases every year (this can happen in most of the developing countries
where the population may be a liability). So we use Data Science here to predict one of the
constraints as
-2*x1+x22+x3<=2500000
where we have used a symmetric relationship. Reduction in the population by a factor of 2
gives a squared increase in the profit with a good efficiency since the plant now gets ample
time for formulation of the biogas due to reduced demands. The grade point p in this case,
should yield a maximum value of 2500000 (as per Census 2011 statistics).
Another constraint can be formulated by taking an asymmetric relationship of the above form
as
-x1+x22+x3<=20000
where, the population reduces by a factor of 1 and the square of the profit increases. This again
means an acceptable efficiency with grade point p having a maximum value of 20000.
However, revised World Bank Indicators database (October 17, 2008) suggests that the high
13
rate of population growth do not necessarily imply low rates of per capita income if the
population is an asset. This leads us to the third constraint as
x1+x2-x3<=10000000
where, population growth is directly proportional to the profit generated. However, this means
a reduced efficiency of the plant since the demand increases and the plant now has lesser time
for biogas formulation. The grade point p for this case should yield a maximum value of
10000000.
Five more constraint equations were generated using the Census data, 2011, and the fact that
none of the variables can be negative.
x1>=0, x1<=13000000
x2>=0
x3>=0, x3<=95 (Efficiency should be at maximum 95 owing to the natural constraints)
The constraints along with the objective function were formulated as a model in .apm file as
shown on the next page.
Figure 7
The model name was given as nlpeq1.apm and was called from a MATLAB script after linking
the apm libraries necessary for MATLAB to solve the NLP.
Figure 8
14
The MATLAB solver computed the results in a variable y which had the following values:
Figure 9
Figure 10
The values suggest that, we can construct a biogas plant with 95% efficiency and a profit per
year of Rs. 3.1649e+03where the population is currently 99,96,930.
Figure 11
Although Bangalore has the population necessary for this purpose, however, Delhi must be
chosen as the feasible city, since it is closer to the Gas Pipeline Network of India.
15
means that Solver has found a peak (if maximizing) or valley (if minimizing) but if the
model is non-convex, there may be other taller peaks or deeper valleys far away from the
current solution.
Mathematically, this message means that the Karush - Kuhn - Tucker (KKT) conditions for
local optimality have been satisfied (to within a certain tolerance, related to the Precision
setting in the Solver Options dialog).
Figure 12
The solver solved the nonlinear constraint optimization problem using the GRG nonlinear
method (which was selected under the Solver Parameters dialog) and the respective cells in the
16
Figure 13
Although the solver generates almost identical results to that of APMonitor Interface of
MATLAB, however, it can be easily noted that the GRG Nonlinear Algorithm doesnt
converge to the true values faster than the Genetic Algorithm. It stops with a population
requirement of 9996930.062 because of maximum iterations limit and fails to give the realistic
figure of 9996930 (which is obtained in case of Genetic Algorithm Method).
CONCLUSION
Three methods yielded two different results. The Simplex Algorithm suggested Ahmedabad as
the most feasible city for the setting up of the Biogas plant whereas the MATLAB solver and
the Excel solver brought Delhi as the feasible city. Since, the input to the solver in the second
case was a Non-Linear Optimization Problem which is more realistic than a LPP, therefore,
Delhi is the most feasible city for the given purpose. In other words, setting up a biogas plant at
Delhi would mean sustainable energy resource for years to come with boost to the GDP of the
country and a means for efficient waste usage. The Gas Pipeline Network in close proximity to
Delhi would mean easy access to the resource for nearby cities. Also we concluded that
Genetic Algorithm converges faster than GRG Nonlinear Algorithm with a maximum limit on
the number of iterations (under the Solver Parameters properties).
17
BIBLIOGRAPHY
http://cleantechnica.com/2015/07/20/the-fossil-fuel-energy-industry-is-now-enteringterminal-decline/
in.mathworks.com
www.apmonitor.com
www.wikipedia.org
www.youtube.com/watch?v=Q2zgz0ag0L0 (Mathematical Optimization with
MATLAB)
http://www.excel-easy.com/data-analysis.html