Skip to content

This repo contain implementation of Conjugate Gradient Method: Hestenes-Stiefel, Polak-Ribiere, Fletcher- Reeves. (Use Bisection Method for Inexact Line search) and Quasi-Newton Method on Functions like Tried Function, Three Hump Camel, Styblinski-Tang Function, Rosenbrock Function, etc

Notifications You must be signed in to change notification settings

Udrasht/OM-Assignment-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimization Algorithms

This repository contains Python implementations of various optimization algorithms, including Conjugate Gradient Method: Hestenes-Stiefel, Polak-Ribiere, Fletcher- Reeves and Quasi-Newton Method: Rank-One, BFGS, DFP. applied to different objective functions. The code provides functionalities to visualize the convergence behavior and contour plots of the objective functions.

Function Implementations

The following objective functions are implemented in the functions.py file:

  • Trid function

  • Three-hump camel function

  • Rosenbrock function

  • Styblinski-Tang function

  • Func_1

  • Matyas Function

  • Rotated Hyper-Ellipsoid Function

    Alt text

Requirements

To run this code, you need:

  • Python 3.x installed on your system.
  • Required Python packages: numpy, matplotlib, prettytable.

You can install the required packages using pip:

pip install -r requirements.txt

Execute the main script to run the optimization algorithms:

 python main.py

TestCase

Alt text

Results

Alt text

After running the script, you can find the generated plots in the plots folder.

For a detailed explanation of the implemented functions and algorithms, refer to the report.pdf file.

Plot Folder

The plots folder contains all the generated graphs during the execution of the optimization algorithms. These graphs depict the convergence behavior and contour plots of the objective functions.

Report

For a detailed explanation of the implemented functions and algorithms, including mathematical formulations, algorithmic details, and performance analysis, refer to the report.pdf file.

Feel free to adjust the parameters and test cases in the main.py file to explore different optimization scenarios.

About

This repo contain implementation of Conjugate Gradient Method: Hestenes-Stiefel, Polak-Ribiere, Fletcher- Reeves. (Use Bisection Method for Inexact Line search) and Quasi-Newton Method on Functions like Tried Function, Three Hump Camel, Styblinski-Tang Function, Rosenbrock Function, etc

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages