Skip to main content
11-Garnet
January 24, 2016
Solved

2 conditions

  • January 24, 2016
  • 3 replies
  • 7988 views

Hi there I need some help to simplify the program that I made in Mathcad Prime  3.1 . I am using lookup  to get the required profile. But there are 2 conditions that I need to satisfy. If in condition 1 satisfied  the pre selected profiles. Condition two also should pass the utilization. If condition two did not pass how this will pre select up to a higher value to satisfy both conditions.  I attached the file for your reference.

Best answer by LucMeekes

I have experience that it does not work most of the time.

What you then should do is iterate inside the program for each of the input values.

So in essence:

r <- ORIGIN

if IsArray(x)

   for i el ORIGIN...last(x)

     Rr <- Select(xi,yi,data)

     r <- r+1

return R

will give you a nested array with the results.

Assumption is that y is as long as x. If not, your program becomes more complex.

Success!
Luc

3 replies

1-Visitor
January 25, 2016

Many of us cannot open Prime 3.1 files.  Can you post a PDF of the whole document and/or better explain what you're trying to do.

23-Emerald IV
January 25, 2016

Your Prime file doesn't run for me. The Excel file is missing and a number of variables are undefined (due thereto?).

I see no way to use the lookup functions of Prime to do what you need. It can be done using a program, see my example below in the program "Select", and two examples of its use:

This was done in Mathcad 11, (my Prime Express doesn't allow programming),

but you should be able to recreate the Select function in Prime.

Success!
Luc

ldante11-GarnetAuthor
11-Garnet
January 26, 2016

HI Luc,

I tried to adopt your program  and this is the result I am getting . How can I get the optimum value?

Thank you

23-Emerald IV
January 26, 2016

Lex,

What is the criterion for the optimum solution?

Luc

ldante11-GarnetAuthor
11-Garnet
January 26, 2016

 

Hi.

Here is the attached excel file and pdf file format.

 

Step 1: I used lookup "It" to get the pre-selected profile by deflection criteria,

 

Step 2: I used lookup "eq" to select the profile base on step 1

 

Step 3: I used look up "eq" to select section modulus from the excel data.

 

Step 4:  some condition the design moment will exceed from the allowable. 

 

Step 5: I need to compare step 1 and 4 if both will satisfy the design criteria otherwise step 1 will select another data to satisfy step 4.

 

 

I don't know if this will be clear to you now.

 

 

Regards