vas9pupkin

15 Reputation

5 Badges

10 years, 29 days

MaplePrimes Activity


These are replies submitted by vas9pupkin

Great. Thank you, Joe.

Great. Thank you, Joe.

>closing Maple and opening it again
it works, thank you.

@Carl Love I absolutely agree, it could have loaded before. But if it had, then IsDefinite was being done and the problem is only in symbolic matrix instead of numerical.

@Carl Love I absolutely agree, it could have loaded before. But if it had, then IsDefinite was being done and the problem is only in symbolic matrix instead of numerical.

as I said "all functions work when I call them with specific arguments"©

as I said "all functions work when I call them with specific arguments"©

Thank you too. Not sure if "uses" instead of "with" will change something.
Probably replacing "infinity" with "10*lam" or "100*lam" will make gradient finding easier(if NLPSolve can find gradient for such functions in principle). But anyway, I can't run it.

Thank you very much! But it was impossible without this package, so my assumption was right :-). Do you know, which methods uses this DirectSearch? I suppose Nelder-Mead method or similar as it doesn`t require to compute gradient.

And I noticed one funny thing: when w1=w2=w3=w4=w5=w6=something minimum lambda is -1/3 regardless of this something. Probably it is so because my graph is complete. I will experiment with this later.

Thank you very much! But it was impossible without this package, so my assumption was right :-). Do you know, which methods uses this DirectSearch? I suppose Nelder-Mead method or similar as it doesn`t require to compute gradient.

And I noticed one funny thing: when w1=w2=w3=w4=w5=w6=something minimum lambda is -1/3 regardless of this something. Probably it is so because my graph is complete. I will experiment with this later.

Here it is optimization.mw

I added these assumptions before NLPSolve, error chaged to:

Error, (in Cons1) cannot determine if this expression is true or false: IsDefinite(Matrix(4, 4, {(1, 1) = -w1-w2-w3-1, (1, 2) = w1-1, (1, 3) = w2-1, (1, 4) = w3-1, (2, 1) = w1-1, (2, 2) = -w1-w4-w5-1, (2, 3) = w4-1, (2, 4) = w5-1, (3, 1) = w2-1, (3, 2) = w4-1, (3, 3) = -w2-w4-w6-1, (3, 4) = w6-1, (4, 1) = w3-1, (4, 2) = w5-1, (4, 3) = w6-1, (4, 4) = -w3-w5-w6-1}), query = negative_definite)

+I even added this between assumptions and NLPSolve(I am not sure if these variables could change after that):

BUT I still get the error:

Error, (in Cons1) cannot determine if this expression is true or false: IsDefinite(Matrix(4, 4, {(1, 1) = -4, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -4, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -4, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = -4}), query = negative_definite)

What? He cannot determine if diagonal matrix -4 -4 -4 -4 is negative definite?

Here it is optimization.mw

I added these assumptions before NLPSolve, error chaged to:

Error, (in Cons1) cannot determine if this expression is true or false: IsDefinite(Matrix(4, 4, {(1, 1) = -w1-w2-w3-1, (1, 2) = w1-1, (1, 3) = w2-1, (1, 4) = w3-1, (2, 1) = w1-1, (2, 2) = -w1-w4-w5-1, (2, 3) = w4-1, (2, 4) = w5-1, (3, 1) = w2-1, (3, 2) = w4-1, (3, 3) = -w2-w4-w6-1, (3, 4) = w6-1, (4, 1) = w3-1, (4, 2) = w5-1, (4, 3) = w6-1, (4, 4) = -w3-w5-w6-1}), query = negative_definite)

+I even added this between assumptions and NLPSolve(I am not sure if these variables could change after that):

BUT I still get the error:

Error, (in Cons1) cannot determine if this expression is true or false: IsDefinite(Matrix(4, 4, {(1, 1) = -4, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -4, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -4, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = -4}), query = negative_definite)

What? He cannot determine if diagonal matrix -4 -4 -4 -4 is negative definite?

Thank you all, guys!

=POWER(-1,2) in a worksheet gives "1" as it should. version 2007.

=POWER(-1,2) in a worksheet gives "1" as it should. version 2007.

1 2 Page 1 of 2