Skip to content

mikjkd/Optimization-Methods-for-Electric-Field-Modeling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimization Methods Project

This repository contains a MATLAB implementation of several optimization methods, including the Nelder-Mead method, along with a variety of tests for 2D and 3D problems. This project was developed as part of an academic group project for the 2019-2020 academic year.

Problem and Approach

Our procedure proposes a solution for achieving an electric field generated through:

  • Inverse Crime: The goal is to verify testing by evaluating the functionality and efficiency of the algorithm.
  • Constant Function: Obtained by averaging the values of the function generated by the inverse crime method.
  • Quadratic Function: Generated as ( KX^2 ).

For each case, several tests were performed until the objective was achieved. Finally, by evaluating the obtained results, we observed that in the case of the electric field generated using the inverse crime method, the error percentage was lower compared to those obtained using the constant function and the quadratic function.

Project Structure

Code

The core MATLAB files are located in the script directory and include functions and test cases for optimization tasks:

  • NelderMeadMethod.m: Implementation of the Nelder-Mead optimization algorithm.
  • Etot.m, Etotx.m, Etoty.m: Functions related to the total energy computation.
  • Exy.m: Function to compute energy between points in 2D space.
  • Test files: Located in subfolders such as crimine_inverso/test2D/ and crimine_inverso/test3D/, these files contain various test cases for both 2D and 3D optimization problems.

Documentation

The project is supported by the following documentation files:

  • Presentation: Gruppo_4_aa2019-2020.pptx (located in assets/) - A PowerPoint presentation summarizing the project and its goals.
  • Report: Relazione mott v4.docx (located in assets/) - A detailed report discussing the methods, results, and analysis of the project.
  • Notes: Various text files such as regole_presentazione.txt and function.txt provide additional information and guidelines related to the project.

Key Folders

  • script/crimine_inverso/: Contains MATLAB functions and test scripts for inverse crime modeling.
  • script/ecostante/: Holds functions and tests related to constant fields.
  • script/ecubo/ and script/equadrata/: Include functions for cubic and squared models.

How to Run

  1. Clone the repository to your local machine:
    git clone https://github.com/yourusername/optimization-methods-project.git
  2. Navigate to the script/ directory and run the necessary MATLAB scripts in your MATLAB environment.
  3. You can use the test files to verify the implementation with 2D and 3D test cases, found in the respective subfolders.

Project Goals

This project aimed to implement and explore different optimization techniques in MATLAB, focusing on:

  • Optimization in Multidimensional Spaces: Testing the Nelder-Mead method and other algorithms on various objective functions.
  • Application to Real Problems: Implementing tests for 2D and 3D problems in contexts such as inverse crime modeling and energy minimization.

Files Overview

  • Presentation: Provides an overview of the methods and results.
  • Report: Contains in-depth explanations and discussions of the optimization methods applied.
  • MATLAB Scripts: Core implementation and test cases for the project.
  • Text Files: Additional documentation and implementation notes.

Contribution

Feel free to fork this project, open issues, or submit pull requests if you'd like to contribute or suggest improvements.

License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages