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

SOLVED
Regular Member

## Solve block stuck equal to "guess value"?

In the attached mathcad prime 3.1 worksheet I'm attempting to utilize a solve block to determine the actual value of the variable xNA. A guess value was used earlier in the worksheet. Although the worksheet produces no errors it's setting the solved value to whatever the guess value is. How can I stop this behavior? Is it due to incorrect constraints?

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: Solve block stuck equal to "guess value"?

You changed nothing to the Solve block itself.

DJF is fuly right in stating that the solve block is working and doing exactly what you are asking.

But, your solve block is a bit silly, and it probably does not deliver what you had in mind.

Here's why:

You define a guess value for Xna far up.

Just above the solve block you define a target value with:

This makes sure that Equilibrium gets the value of Xna applied to that equation within absolute bars.

Now, in the solve block, you essentially request to find the value of Xna such that, when it is applied to that same equation between absolute bars, it delivers Equilibrium.

I don't need a solve block to know that the result of that is exactly: 32.018 in. In fact I don't even need to know the equation, because this holds no matter what equation you have (so long as it does not result in an error).

If you change

e.g. to

At both sides, in the definition of Equilibrium as well as in the contstraint of the solve block, you'll get the very same answer.

I think you need a different value for Equilibrium (one that not depends on the guess value of Xna)...

Success!
Luc

6 REPLIES 6

## Re: Solve block stuck equal to "guess value"?

Looks like it's doing exactly what you told it to do.  Ttot and Fc don't seem to actually change with Xna so your guess value doesn't matter.  Any value will work so it stops with the guess.  So go back a few steps and figure out where those functions went wrong.

## Re: Solve block stuck equal to "guess value"?

Your solve block works - just try to use a guess value like 10 in or lower.

A plot may give you a hint as to whats going on:

Every value of x.NA greater than approx. 13.7 in is a valid solution for your solve block equation.

## Re: Solve block stuck equal to "guess value"?

Here's one part where your functions become unrelated to Xna:

|

followed by:

You HAVE to make part1...4 each dependent on Xna, if you want Ttot to be dependent on Xna.

So: part1(Xna)...

Success!
Luc

## Re: Solve block stuck equal to "guess value"?

Thanks LucMeekes, adding the xNA dependency to each part of the attached modified spreadsheet changed the solve block. The solve block no longer copies the guess value but instead uses the initial guess earlier. The solve block still doesn't work but it's getting closer. Perhaps I need to adjust the constraints needed to be adjusted.

## Re: Solve block stuck equal to "guess value"?

You changed nothing to the Solve block itself.

DJF is fuly right in stating that the solve block is working and doing exactly what you are asking.

But, your solve block is a bit silly, and it probably does not deliver what you had in mind.

Here's why:

You define a guess value for Xna far up.

Just above the solve block you define a target value with:

This makes sure that Equilibrium gets the value of Xna applied to that equation within absolute bars.

Now, in the solve block, you essentially request to find the value of Xna such that, when it is applied to that same equation between absolute bars, it delivers Equilibrium.

I don't need a solve block to know that the result of that is exactly: 32.018 in. In fact I don't even need to know the equation, because this holds no matter what equation you have (so long as it does not result in an error).

If you change

e.g. to

At both sides, in the definition of Equilibrium as well as in the contstraint of the solve block, you'll get the very same answer.

I think you need a different value for Equilibrium (one that not depends on the guess value of Xna)...

Success!
Luc

## Re: Solve block stuck equal to "guess value"?

Thanks LucMeekes, changing the constraint equation and adding xNA dependency to prior equations fixed the issue. The fixed mathcad is attached to the original post

Announcements
Check out the latest