|
|
iteration of Lagarange optimization makes my code very slow
Posted:
Apr 20, 2011 5:01 AM
|
|
Hello,
I want to solve an optimization problem stated as follows: A(t)=a'*B(t)*a; the constraint is A(0)=1; where A(t) is a scalar at each time point t, a is a vector, B(t) is a square matrix, each element of B(t) is a function of t.
I consider to use the Lagrange method to find the optimal A(t) over a period of time, e.g. from 0 to 300. I built the model as A(t)max=max{A(t)-lambda*(A(0)-1)}=max{a'*B(t)*a-lambda*(A(0)-1))}, which can be changed to a generalized eigenvalue problem as B(t)*a=lambda*A(0)*a, which can be further changed to a form A(0)^(-1/2)* B(t)*A(0)^(-1/2)*b=lambda*b; b=A(0)^(1/2)*a; However, in oder to get A(t) over a duration, i.e. 0 to 300, I calculated the largest eigenvalue and corresponding eigenvector at each time step, which is very time consuming.
I am a new comer in this area, I could not find a more efficient way to solve the problem. Can someone suggest me a more efficient way to get A(t)?
Many Thanks lee
|
|