Wednesday, May 21, 2008

Cholesky Decomposition in GAMS

Three ways to do a Cholesky decomposition in GAMS:

  1. Write A=LLT as nonlinear constraints. This has the advantage it can be part of an NLP model and maintains the factorization during the solve. Of course, this makes the NLP (much) more difficult. Example gams model.
  2. Program a Cholesky algorithm directly in GAMS. Example gams model. This only works on parameters
  3. Call an external Cholesky solver. This is probably better for large matrices. Example gams model.

1 comment:

  1. Thanks a lot! I am looking for the solution to this and I found your example.

    Also thanks for the "invert.exe"

    ReplyDelete