×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Minimize function

Minimize function

Minimize function

(OP)
Hello,

Can someone please help me in using the minimize function. In the attached file (Mathcad 15), iam getting variable undefined while using the minimize function.
Please see the bottom of the attached worksheet for the minimize function(Highlighted in Green). Also, I have a very long equation with the "OR" operators and I want to split the equation in to next line.(shown in attached worksheet).I know that "Ctrl+" works with the "+" operator.


Thanks for your help!!

RE: Minimize function

I can't open Matcad 15, save it in 11 and re-post it and I'll try.

RE: Minimize function

ad Minimize: You have to provide units in your fours constraints to make it work --> 12in<d<48in, etc.

ad Case determination: You sure have to check your syntax! You can't write if (x="one" OR "two" OR "five") but you must write if (x="one" OR x="two" OR x="five")
Furthermore you must check your logic. It seems you used some superfluous constraints (Web.Type can't be "Compact" anymore after the second otherwise in the "CaseF4.0" line. Do you expect any of the two variables to hold any other string but the three mentioned in the routine? If no, CaseF5 sure would never be possible, so omit it. If yes, is it just to cope with the case of typo made by the user? Then the chack for a valid input should be made right at the top of the page. It may also be a good idea to use a drop down menu for the user to chose Web.type and Flan.type, that way avoiding invalid assignments.
You cannot split the logical constraints like you can do with Ctrl-+ for a sum, but I am pretty sure you can make those expressions much shorter as soon as you get it straight what you really want. Maybe it helps if you paint a small 3x3 matrix with all combinations of your two type variables, writing in the case the respective combination should yield.

RE: Minimize function

(OP)
Thanks rmixzz!
If I change the constrains to "in" as suggested the minimum function works but when I change the constarin URatio to lower than the initially calculated value before optimization, the minimum function doesnt work..
Please see the attached worksheet.
Iam trying to write a minimum function to minimize the weight with Unity ratio as one of the constarins as defined by the user..

Thanks

RE: Minimize function

The effect is easily explained. Thats because your Uratio never changes. You made it a function of the four variables, but those arguments never are used in the calculation. Give it a try - call Uratio with different arguments and you will always get the same result. That way you can't demand Minimize to make it any smaller and so the solve block fails (with the usual wrong error message).
You have to turn ALL variables M???, etc., which are used in the calculation of Uratio and which should depend on one or more of those 4 arguments into functions to make it work.

Ad your routine to get "Case". I am not sure if your routine really does what you want it to do, but find attached a much smaller, equivalent routine.

RE: Minimize function

(OP)
Thanks!
The routine you used is very intersting.. Iam abeginer in MathCad. Infact I started MathCad 2 months back.
also, can you tell me how to round of my minimize function variable to 1/8inch. Is that doeable?

Thanks for your time!

RE: Minimize function

Quote:

can you tell me how to round of my minimize function variable to 1/8inch. Is that doeable?
I guess the Round() function (note the capital R) will do the job.

Round(length_in_any_unit, 1/8 in)=

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close