Eigenvalue

Top  Previous  Next

EIGENVALUE is a utility that calculates the eigenvalues of a symmetric positive-definite matrix.

It is used by using $Call or Execute on the command

 eigenvalue inputgdxfile indexofmatrix matrixtofindeigen outputgdxfile resultanteigenvalues

Where the parameters in this line are

 

inputgdxfile

Name of gdxfile sent to invert that has the matrix for which to find eigenvalues

indexofmatrix

Name of set that defines row and column names of the matrix

matrixtofindeigen

Name of the matrix to find eigenvalues for that must be in inputgdxfile

outputgdxfile

Name of gdxfile  that has the resultant eigenvalues

resultanteigenvalues

Name to call the eigenvalue vector in the gdx file outputgdxfile

 

Example eigenexample.gms

Set index /i1*i2/;

Table a(index,index) matrix to find eigenvalues for

             i1   i2

    i1       2     1

    i2       1     3;

parameter eigenvalues(index) vector of eigenvalues of A;

execute_unload 'gdxforutility.gdx' index,A;

execute 'eigenvalue gdxforutility.gdx index A gdxfromutility.gdx eigenvalues';

execute_load 'gdxfromutility.gdx' , eigenvalues;

display a, eifenvalues;