|
Cholesky |
Top Previous Next |
|
CHOLESKY is a utility that calculates the Cholesky decomposition of a symmetric positive-definite matrix. where given the matrix A one finds the matrix L such that A=LL'. It is used by using $Call or Execute on the command cholesky inputgdxfile indexofmatrix matrixtodecompose outputgdxfile resultantLmatrix Where the parameters in this line are
Example choleskyexample.gms Set index /i1*i2/; Table a(index,index) matrix to decompose i1 i2 i1 2 1 i2 1 3; parameter LforA(index,index) L matrix that is a decomposition of A; execute_unload 'gdxforutility.gdx' index,A; execute 'cholesky gdxforutility.gdx index A gdxfromutility.gdx LforA'; execute_load 'gdxfromutility.gdx' , LforA; display a, LforA;
|