diff --git a/.gitignore b/.gitignore index e69de29..7e99e36 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc \ No newline at end of file diff --git a/Homework1/README.md b/Homework1/README.md new file mode 100644 index 0000000..a151624 --- /dev/null +++ b/Homework1/README.md @@ -0,0 +1,37 @@ + +## General info +This project is intended to allow the user to solve minimization problem on quadratic functions defined as S(X)= X'AX - X'B, with X = [x, y], X' the transform of X, A a 2x2 matrix and B a 2X1 vector. + +## Setup +The project is created with Python 3.7. It moreover requires the following libraries to be installed: +* numpy +* scipy +* matplotlib +* sys + +## Use + +### optimizer.py + +This script solves minimization problems using the scipy.optimize.minimize routine. The minimization solver can be specified as an input argumeent by entering the following command line: + +``` +$ python3 optimizer.py method +``` +Where the variable method is one of the following: + +* Nelder-Mead +* Powell +* CG (default) +* BFGS +* L-BFGS-B +* TNC +* SLSQP + +The initial guess of the minimization process has to be specified directly in the optimizer.py file by changing the value of the variable X0. The matrix A and vector B can also be modified directly in the file. + +### conjugate_gradient.py + +### post_processing.py + +Post-processing file that takes as inputs the value of A, B as well as the intermediate solutions of the iterative minimization process and the method used. The file generates a 3D plot displaying the function to be minimized as well as the intermediate solutions. diff --git a/.gitignore b/Homework1/README.md~ similarity index 100% copy from .gitignore copy to Homework1/README.md~ diff --git a/Homework1/__pycache__/post_processing.cpython-37.pyc b/Homework1/__pycache__/post_processing.cpython-37.pyc deleted file mode 100644 index bcf0011..0000000 Binary files a/Homework1/__pycache__/post_processing.cpython-37.pyc and /dev/null differ