Solve block error: "Not a valid constraint"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
-
Civil_Engineering
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
1. Send please the Mathcad-sheet.
2. Try in first line so
A:=find...
and than
A(x):=find...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It doesn't seem to like 2 "Find:=" in the same solve block
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I've added a mathcad worksheet and the excel it imports to the original post
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks LucMeekes. I've attached a worksheet (and referenced excel) and removed the indexes but still no luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
B - ?
a - ?
M.toe - ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
May be the error here too
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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
for a full solution (so far).