If X is a parameter {A,A} where A is some set.
Is there an easy way to make a parameter that is inv(A) such that
A*inv(A) = 1 for a1=a2, and 0 otherwise?
Thanks
Stephen Finger
param m integer > 0;
param A {1..m,1..m};
var Ainv {1..m,1..m};
subj to inv_defn {i in 1..m, j in 1..m}:
sum {k in 1..m} A[i,k] * Ainv[k,j] = (if i = j then 1 else 0);
If you just type "solve" at this point then the solver will return values
for variable Ainv that represent the inverse of A. Alternatively, you can
include these statements within a larger model that involves A's inverse in
some way.
Bob Fourer
4...@ampl.com