Question: Help with an Optimization Problem using NLPSolve

Hello all,

I'm relatively new to Maple, and I have already found this forum to be helpful. I hope I might be able to get some additional help with the latest problem that I've been working on.

Big picture:

I'm trying to extract two parameter values of a heat transfer problem from a dataset using a reduced order model.

How I've been trying to do it:

The dataset is a vector called "Nodes"

My reduced order model approximates this dataset as a vector "ROM" by multiplying a matrix "Phi" by a matrix "C" by an interpolation vector "F"

ROM:=Phi.C.F;

The elements of F are a function of the parameters I'm interested in with the following form:

F[i]:=1/sqrt(((parameter[1]-K[i,1])/p1max)^2+((parameter[2]-K[i,2])/p2max)^2+1)

where K, p1max, and p2max have been defined earlier.

Now here's where I am having trouble--the matrix C is rank-deficient, so I wanted to use some optimization method to evaluate for the parameters such that the relative error between "Nodes" and "ROM" is minimized (preferably very close to zero, of course). The problem is that as far as I understand Maple's Optimization package, I can't figure out how to go about this. I hoped that maybe Maple could figure how to handle the two element vector "parameter" embedded within the vector F with the following code...

ObjectiveFunction := Vector(nn);

for i to nn do ObjectiveFunction[i] := evalf((Nodes[i]-ROM[i])/Nodes[i]) end do;

p := proc (parameter)

add(ObjectiveFunction[i], i = 1 .. nn)/nn

end proc;

Optimization[NLPSolve](2, p, assume = nonnegative);
Error, (in Optimization:-NLPSolve) non-numeric result encountered

...but I was mistaken. I'm guessing Maple doesn't like those parameter[1] and parameter[2]'s floating in the floating numbers.

So, any help with cooking this problem so that NLPSolve will accept it, or perhaps another solution method entirely would be appreciated.

Thanks in advance!

Please Wait...