I had some trouble on creating a matrix multiplication.
This is what I wrote
s.t. Costraint1{l in A,d in B} : sum{j in C} D[l,j] * E[j,d] <= 13;
I try to find some documentation on internet and I've found that is not that
the correct way to implement matrix multiplication.I've found this:
>>>
how can I mutiply a m*n matrix (A) by a n*1 matrix(B)?
Given, say,
param A {1..m, 1..n};
param B {1..n};
you can write:
sum {j in 1..n} A[i,j] * B[j]
to get the ith element of A times B. There is no "matrix multiplication"
operator in AMPL that would let you write simply "A * B", however.
>>>
I know that gmpl is a subset of AMPL ,then if I don't find an instruction to do
this operation in AMPL,surely I don't find that instruction in gmpl (i think
so,even some difference that I don't know)
_________________________________________________________________
Porta Messenger in Vacanza! Scaricalo sul cellulare!
http://new.windowslivemobile.msn.com/IT-IT/windows-live-messenger/default.aspx_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk