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.
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.
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/
andcrimine_inverso/test3D/
, these files contain various test cases for both 2D and 3D optimization problems.
The project is supported by the following documentation files:
- Presentation:
Gruppo_4_aa2019-2020.pptx
(located inassets/
) - A PowerPoint presentation summarizing the project and its goals. - Report:
Relazione mott v4.docx
(located inassets/
) - A detailed report discussing the methods, results, and analysis of the project. - Notes: Various text files such as
regole_presentazione.txt
andfunction.txt
provide additional information and guidelines related to the project.
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/
andscript/equadrata/
: Include functions for cubic and squared models.
- Clone the repository to your local machine:
git clone https://github.com/yourusername/optimization-methods-project.git
- Navigate to the
script/
directory and run the necessary MATLAB scripts in your MATLAB environment. - You can use the test files to verify the implementation with 2D and 3D test cases, found in the respective subfolders.
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.
- 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.
Feel free to fork this project, open issues, or submit pull requests if you'd like to contribute or suggest improvements.
This project is open-source and available under the MIT License.