[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] how to make matrix multiply with mathprog
From: |
hhb83 |
Subject: |
Re: [Help-glpk] how to make matrix multiply with mathprog |
Date: |
Mon, 23 Feb 2009 23:31:54 -0800 (PST) |
I still could not work it out. Here, the Up,i is var, so should I take the Xp
as param or var? If param, it always said "expression following := has
invalid type". And if I define it as var, and take the formulation as
constraint like this:
s.t. position{i in I, j in J, m in K}: X[i,j,k] = sum{k in K}
A[m,k]*X[i-1,j,k] + B[m,k]*U[i-1,j,k];
But it didn't work, the X[i,j,k] are always 0. Even if
s.t. position{i in I, j in J, m in K}: X[i,j,k] = 2; the X[i,j,k] are 0, but
the position[i,j,m] are all 2.
Why? and how should I deal with it?
thank you!
hhb83 wrote:
>
> hello, does anybody can tell me how to do this with mathprog?
>
> Xp,i+1 = A*Xp,i + B*Up,i
> where, X is a 3-dimension matrix,10*10*3, so do U, A is 3*3 matrix, and B
> is 1*3; p and i is subscript, belong to 1-10.
> Thank you
>
--
View this message in context:
http://www.nabble.com/how-to-make-matrix-multiply-with-mathprog-tp22077225p22177179.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.