Inverse of a matrix in AMPL

57 views
Skip to first unread message

AbdeRahman Mostafa

unread,
Aug 16, 2022, 12:05:00 PM8/16/22
to AMPL Modeling Language
how to find the inverse of a matrix using Gaussian elimination in AMPL or any other method using equations other than LP probelm, as i have my main problem and i do not want to two have two prblems to solve

AMPL Google Group

unread,
Aug 17, 2022, 11:39:05 AM8/17/22
to AMPL Modeling Language
In optimization applications, it is very rare that anyone wants to see an entire matrix inverse. Thus AMPL does not contain any routines for inverting a matrix; rather, matrix algorithms are left to the solvers.

I recommend using a library routine for the matrix inverse in some popular general-purpose language (for example, a SciPy routine in Python, or a matrix function in MATLAB). Then use the corresponding AMPL API to call AMPL to do your optimization.


--
Robert Fourer
am...@googlegroups.com
{#HS:1981251176-111463#}
Reply all
Reply to author
Forward
0 new messages