cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Solve block error: "Not a valid constraint"

dsochor
5-Regular Member

Solve block error: "Not a valid constraint"

In the attached image of a mathcad prime 3.1 worksheet I'm attempting to call the function in a solve block and from another function. I receive the error: "This is not a valid constraint, Use, for example, the equal to operator."

 

Am I making a syntax error that I'm not aware of?

1 ACCEPTED SOLUTION

Accepted Solutions

I had not noticed that in the meantime you added the worksheet.

 

There are three problems:

 

1) The inline evaluation when you specify the guess for L.b. This is responsible for the irritating error message, Delete the equal sign after 3/4*D

 

2) You specify the guess for f.max to be sigma.maxlift, but sigma.maxlift ist not defined in your worksheet. You have to provide a value!

 

3) You have to define B and a, too, or you make them additional arguments of your function FUCNTION.

 

Here is a screen shot where I had chosen arbitrary values just to show that it works now:

clipboard_image_0.png

View solution in original post

16 REPLIES 16

1. Send please the Mathcad-sheet.

2. Try in first line so

A:=find...

and than

A(x):=find...

 

dsochor
5-Regular Member
(To:ValeryOchkov)

Thanks ValeryOchkov. The worksheet is currently 91 pages, I'll try to shorten it and then post it.

 

What do you mean by "Try in first line so..." 

 

Do you mean adding FUNCTION:=Find(,) and then under it FUNCTION(F,Mtoe):=Find(,)?

The solve block seems to only like one :=Find

 

Yes! 

dsochor
5-Regular Member
(To:ValeryOchkov)

It doesn't seem to like 2 "Find:=" in the same solve block

dsochor
5-Regular Member
(To:dsochor)

I've added a mathcad worksheet and the excel it imports to the original post

LucMeekes
23-Emerald III
(To:dsochor)

In your MapLb function, you call the function FUNCTION with and index: Can't see it well (you should always attach a worksheet!), I believe it's index 11.

But FUNCTION is the result of the solve block above. It isn't a vector, so you cannot index it.

 

Success!
Luc

dsochor
5-Regular Member
(To:LucMeekes)

Thanks LucMeekes. I've attached a worksheet (and referenced excel) and removed the indexes but still no luck

have you tried to call the solve block FUNCTION in a separate region with the very same arguments?

have you tried to use the trace option in the calculation menu to see if the error traces back to the solve block?

I had not noticed that in the meantime you added the worksheet.

 

There are three problems:

 

1) The inline evaluation when you specify the guess for L.b. This is responsible for the irritating error message, Delete the equal sign after 3/4*D

 

2) You specify the guess for f.max to be sigma.maxlift, but sigma.maxlift ist not defined in your worksheet. You have to provide a value!

 

3) You have to define B and a, too, or you make them additional arguments of your function FUCNTION.

 

Here is a screen shot where I had chosen arbitrary values just to show that it works now:

clipboard_image_0.png

dsochor
5-Regular Member
(To:Werner_E)

Thank you Werner_E. The undefined values have been added and the inline equal has been removed. The error now resides with the Lb/ft in the Find() portion of the solve block. Unfortunately the error tracing offers no movement options and pulling the FUNCTION() outside the solver block results in an error.

Forgot to mention that you can (and should) use units in the solve block. So simply delete the units in the find(..) command.

See the screenshot I added in my post above.

 

B - ?

a - ?

M.toe - ?

Find.png

dsochor
5-Regular Member
(To:ValeryOchkov)

Thanks Valery, I've defined B and a in the revised attached mathcad and Mtoe is one of the constraints of the solve block. Does it need to be defined outside the block as well?


Mtoe is one of the constraints of the solve block. Does it need to be defined outside the block as well?

No! You provide it as a function argument. That's perfectly OK.

May be the error here too

ErrSolve.png


@ValeryOchkov wrote:

May be the error here too

 


Yes Valery, thats error #1 in the list of three errors I had provided in my prior answer.

The solve block does not like inline evaluations when specifying the guess value.

See this post

https://community.ptc.com/t5/PTC-Mathcad/Solve-block-error-quot-Not-a-valid-constraint-quot/m-p/630689/highlight/true#M187479

for a full solution (so far).

Top Tags