Optimizing Reservoir Operations on Nepalese Hydropower Systems

Optimizing Reservoir Operations on Nepalese Hydropower Systems: A Comparative Study of Metaheuristic Algorithms and Environmental Flow Tradeoffs Abstract Optimization of reservoir operation is essential for efficient and sustainable water utilization and management. This plays a critical role in balancing energy generation with ecological sustainability, particularly in hydropower-dominant regions like Nepal. This study investigates the application of metaheuristic algorithms (MHAs) to optimize reservoir operations while addressing environmental flow requirements. The research focuses on two key hydropower projects in Nepal: the Budhigandaki Hydropower Project (BGHEP) and the Dudhkoshi Storage Hydropower Project (DKSHEP). The comparative analysis of seven MHAs is conducted in BGHEP, while the tradeoff analysis of different environmental flow methods is done in DKSHEP. ...

April 1, 2025 · 2 min · Yogesh Sharma Neupane

Optimizing Rastrigin Function Using GA-PSO Method

You can access pdf clicking in this link. 1. Imports: import numpy as np import random These lines import the necessary libraries. NumPy (imported as np) is a powerful library for numerical computations in Python, particularly useful for working with arrays and matrices. The random module is used for generating random numbers, which is crucial for the stochastic nature of both PSO and GA algorithms. 2. PSO Parameters: no_of_iterations = 100 no_of_particles = 100 c1 = 1.2 c2 = 1.9 w = 0.5 lower_bound = -5.12 upper_bound = 5.12 no_of_dimension = 7 These variables define the parameters for the Particle Swarm Optimization (PSO) algorithm: ...

July 8, 2024 · 14 min · Yogesh Sharma Neupane

Useful References

Programming in Python If you love programming, you can visit here. Mandarin Lessons When i had joined mandarin class, i have compiled notes. Access it Here Optimization Different methods of optimization are shown. Feel easy to access it. Optimization Big M Method Dynamic Program- Water allocation Simplex Method Using C Program Optimization Using Scipy MSHPE Semester 1 Study Materials Access this drive link using college account

July 4, 2024 · 1 min · Yogesh Sharma Neupane

Solving Mixed Integer Nonlinear Programs using Particle Swarm Optimization

Setting up the Environment Install the pyswarm library: You can install the pyswarm library using pip: pip install pyswarm Install NumPy: The pyswarm library relies on NumPy for numerical operations. You can install NumPy using pip: pip install Numpy Now that your environment is set up, let’s solve an MINLP problem using particle swarm optimization. Solving an MINLP Problem Consider the same MINLP problem from the previous example: Maximize: x1 + x2*x1 Subject to: -x1 + 2*x2*x1 <= 8 2*x1 + x2 <= 14 2*x1 - x2 <= 10 x1 >= 0, integer x2 >= 0 We can model and solve this problem using the pyswarm library: ...

July 4, 2024 · 3 min · Yogesh Sharma Neupane

Solving Mixed Integer Nonlinear Programs using Genetic Algorithms

Setting up the Environment Install the geneticalgorithm library: You can install the geneticalgorithm library using pip: pip install geneticalgorithm Install NumPy: The geneticalgorithm library relies on NumPy for numerical operations. You can install NumPy using pip: pip install numpy Now that your environment is set up, let’s solve an MINLP problem using genetic algorithms. Solving an MINLP Problem Consider the following MINLP problem: Maximize: x1 + x2*x1 Subject to: -x1 + 2*x2*x1 <= 8 2*x1 + x2 <= 14 2*x1 - x2 <= 10 x1 >= 0, integer x2 >= 0 We can model and solve this problem using the geneticalgorithm library: ...

July 4, 2024 · 2 min · Yogesh Sharma Neupane

Solving Mixed Integer Nonlinear Programs Pyomo-Couenne and SCIP

Setting up the Environment Download and Install Couenne: Couenne is an open-source solver for MINLP problems, developed as part of the COIN-OR project. You can download the latest version of Couenne from the COIN-OR download page. Make sure to download the binary package that matches your operating system. Add Couenne to your System Path: After downloading and extracting the Couenne package, you need to add the location of the couenne.exe executable to your system’s PATH environment variable. This will allow Pyomo to find and use the Couenne solver. ...

July 4, 2024 · 5 min · Yogesh Sharma Neupane

Solving Linear Programs with OR-Tools Chance Constrained

Introduction to Linear Programming Linear programming is a mathematical optimization technique used to find the best solution to a problem with a linear objective function and linear constraints. The goal is to maximize or minimize the objective function while satisfying the given constraints. A typical LP problem has the following components: Decision Variables: The unknown quantities that we want to determine, represented as x, y, z, etc. Objective Function: A linear expression involving the decision variables that we want to maximize or minimize. Constraints: Linear inequalities or equalities that the decision variables must satisfy. Solving an LP Problem with OR-Tools Let’s consider the following LP problem: ...

July 4, 2024 · 2 min · Yogesh Sharma Neupane

Solving Nonlinear Programs

Nonlinear Programming (NLP) Nonlinear programming refers to optimization problems where the objective function or constraints (or both) are nonlinear functions of the decision variables. This is in contrast to linear programming, where both the objective and constraints are linear. Some key characteristics of NLP problems: Objective function is a nonlinear function of the decision variables Constraints can be linear or nonlinear Variables can be continuous, integer, or a mix (mixed-integer nonlinear programming) Solutions may have multiple local optima, requiring specialized algorithms to find the global optimum NLP problems arise in many real-world applications where the underlying relationships are inherently nonlinear, such as chemical process optimization, portfolio management, structural design, and more. ...

July 4, 2024 · 3 min · Yogesh Sharma Neupane

Solving Mixed Integer Linear Programming (MILP) Problems

Example Problem In this example, we’ll solve a mixed integer linear programming problem using Pyomo: Objective: Minimize (3x1 + 4x2) Constraints: (x1 + 3x2 >= 15) (3x1 + 5x2 <= 72) (2x1 + x2 = 24) Variable Types: (x1) is a continuous variable ((x1 >= 0)) (x2) is an integer variable ((x2 >= 0)) Step-by-Step Solution with Pyomo Step 1: Import Pyomo Modules Import the necessary modules from Pyomo: import pyomo.environ as pyo from pyomo.opt import SolverFactory Step 2: Create a Concrete Model Create a concrete model instance using pyo.ConcreteModel(): ...

July 4, 2024 · 2 min · Yogesh Sharma Neupane

Solving Linear Problems Using Pulp

This guide explains how to use Pulp, a Python library for linear programming, to solve optimization problems. Pulp is particularly suitable for linear programming (LP) problems and provides an easy-to-use interface for defining variables, constraints, and objective functions. Installation Before using Pulp, make sure you have Cython installed, then install Pulp itself: Install Cython: If you haven’t installed Cython yet, run: pip install cython Install Pulp: Install Pulp using pip: ...

July 4, 2024 · 3 min · Yogesh Sharma Neupane

Solving Optimization Problems Using Pyomo

This guide explains how to use Pyomo, a Python-based open-source optimization modeling language, to solve optimization problems. Pyomo allows you to define optimization models, set constraints, and specify objective functions easily. Example Problem Using Pyomo In this example, we will use Pyomo to solve a linear programming problem with the following characteristics: Objective: Minimize 3x1 + 4x2 Constraints: x1 + 3x2 >= 15 3x1 + 5x2 <= 72 2x1 + x2 = 24 Step-by-Step Solution with Pyomo Step 1: Import Pyomo Modules First, import the necessary modules from Pyomo: ...

July 4, 2024 · 3 min · Yogesh Sharma Neupane

Solving Optimization Problems Using the SCIP Library

This guide provides a detailed explanation of how to solve optimization problems using the SCIP library in Python. SCIP is a powerful tool that can handle linear, non-linear, and integer programming problems. Installation Steps Download and Install SCIP: Visit the SCIP download page. Fill out the required form to download the application. Install the downloaded application on your computer. Install PySCIPOpt: Open your terminal or command prompt. Run the following command to install the PySCIPOpt package: pip install pyscipopt Example Problem: Maximizing an Objective Function In this example, we will maximize an objective function subject to certain constraints using the SCIP library. ...

July 4, 2024 · 3 min · Yogesh Sharma Neupane