0% found this document useful (0 votes)
42 views

(PR4)

1) The document is a practical report submitted by a student named Sonam Lhendup Dorji for their Power Engineering course at the Royal University of Bhutan. 2) It involves using dynamic programming in Python to solve an optimization problem by breaking it into subproblems and storing solutions to avoid redundant computations. 3) The student defines the optimization problem, runs the dynamic programming algorithm, and determines the optimal values that maximize the objective function are x=1.1 and y=0, with an optimal objective value of 3.3.
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)
42 views

(PR4)

1) The document is a practical report submitted by a student named Sonam Lhendup Dorji for their Power Engineering course at the Royal University of Bhutan. 2) It involves using dynamic programming in Python to solve an optimization problem by breaking it into subproblems and storing solutions to avoid redundant computations. 3) The student defines the optimization problem, runs the dynamic programming algorithm, and determines the optimal values that maximize the objective function are x=1.1 and y=0, with an optimal objective value of 3.3.
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/ 7

ROYAL UNIVERSITY OF

BHUTAN
JIGME NAMGYEL ENGINEERING
COLLEGE

Department of Electrical Engineering


Course: B.E. in Power Engineering

Module: Power System Optimization


Module Code: PEG408

Practical Report 4

Name: Sonam Lhendup Dorji


Roll No.: 05190014
Class: BE4PE
1) Aim: To perform dynamic programming via python programming.
2) Theory:
Dynamic programming is a problem-solving technique that involves breaking down a complex
problem into simpler subproblems and solving each subproblem only once, storing the solutions to
avoid redundant computations. The key idea is to solve each subproblem just once and store the
solution, so that when the same subproblem arises, instead of recomputing its solution, one simply
looks up the previously computed solution.

This approach is particularly useful in optimization problems, where the goal is to find the best
solution among a set of possible solutions. For example, it can be applied to problems like finding
the shortest path in a graph, minimizing costs, or maximizing profits.

One advantage of dynamic programming is that it can significantly improve the efficiency of
algorithms by avoiding redundant computations. This can lead to faster and more efficient solutions
for complex problems. It also provides a systematic and organized way to solve problems by
breaking them down into smaller, more manageable parts.

However, dynamic programming also has its disadvantages. One notable drawback is that it may
not be the most intuitive approach for certain types of problems, and identifying the optimal
substructure (breaking down the problem into subproblems) can be challenging. Additionally, the
storage of solutions to subproblems can consume a significant amount of memory, making it less
suitable for problems with large input sizes.

In summary, dynamic programming is a powerful problem-solving technique that involves breaking


down complex problems into simpler subproblems, solving each subproblem only once, and storing
the solutions to avoid redundant computations. While it offers advantages in terms of efficiency and
organization, it may pose challenges in terms of intuitiveness and memory usage for certain types
of problems.

3) Procedure:
1. Define the mathematical problem, including the objective function, constraints, and decision
variable bounds.
2
2. Assign coefficients for the objective function and define the coefficients and right-hand side
values for the constraints.
3. Specify the bounds for each decision variable to ensure they meet the problem requirements.
4. Formulate a function that computes the objective value based on the current values of decision
variables.
5. Set up the initial conditions for the dynamic programming approach, including the number of
decision variables and constraints.
6. Develop a recursive function that explores possible solutions, updating decision variable values
while considering constraints and maximizing the objective function.
7. Print or display the maximum value of the objective function and the corresponding values of
decision variables obtained from the dynamic programming solution.

4) Analytical method:

3
4
5
5) Simulation method:

6
6) Result and discussion:

The optimum value of x is 1.1 and y is 0. The optimum value of objective function is approximately
3.3. This is also validated from practical. The maximization problem above was to maximize 3x – y
so it was obvious that to get maximum value, we need maximum value of x (which was 1.1) and
minimum value of y (which was 0). These maximum and minimum values were obtained from the
limits calculated in theoretical validation.

6) Conclusion:
After completing this practical, I came to understand that complex problem can be subdivided into
smaller problems so that it is easy to understand and solve. Dynamic programming is used both for
solving linear and non-linear optimization problems. It is done in two stages and value of one
variable is found in terms of the other. In the next stage, that value is used to find the other
variable.

You might also like