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

Display calculation iterations

0 Kudos

Display calculation iterations

1. Describe your environment: What is your industry? What is your role in your organization? Describe your stakeholders.

I am a structural engineer of 20 years working in the bridge and heavy construction field.  I create designs for platforms, shoring towers, lifting devices, formwork, crane foundations, etc.  Pretty much anything the field needs to do complex structural work.  My design calculations need to be simple and easy to follow by other engineers but I do not need to take months to get them to a level of pristine publishable quality.  Although I create drawings that regular field crews must be able to understand for their own safety, calculations only get circulated amongst other engineers and on rare occasions to non-technical managers and staff.  

2. What version of Mathcad are you currently running?



3. Describe the problem you are trying to solve. Please include detailed documentation such as screenshots, images or video.


I do not always want to see the final results but sometimes want to see an intermediate step. 


For example (and this is a common case) I am adding up the effects of several equations to make sure they are still less than the maximum capacity of a component (like adding bending and axial stresses).  So for this case, I may have heavy formulas as terms but then the terms are simply added up.  So what I would like to display before the final result is the iteration step just previous to it, where I see all the terms worked out to values, before they are added together.  Then I can point to a term and say "See!  The wind load is the controlling load" (or something to that nature).


Another case is when I define pages and pages of variable, then I start using them in equations.  The person reviewing my work, and even myself, needs to go back and find the value of these equations.  It's in these situations where showing the first iteration, that is substituting values, will help to show that the input values are those that are expected.


I understand there are ways of getting around this, like putting term equations in a matrix, getting the results of the terms, then summing the terms for my final answer.  But anyone who has taken engineering classes or does their calculations by hand, understands that with one equation, writing out the intermediate steps will show they got the right input values and to show key stages of the solution.  Writing a solution in steps is not something new and has more value than the final value.


For what I mean as an iteration step, programmatically, the basic operations should be done in the following order:

  1. addition/subtraction
  2. logical
  3. exponents (generally what we think is the start)
  4. mult/div
  5. functions
  6. variable substitutions

The reason I put function last is because it is sometimes desirable to the result of a special function, before it gets multiplied through.  And addition is first so that the step ends just before the final terms are added together.  If add/sub was last then you would not see the terms before they disappear.  I have been programming and using a 'mathcad' like macro for Excel for 20 years and found that this is the most beneficial for the way I would like to see results, as though I was writing out the step by hand.  (except for the first iteration I would jump to step 6)


Of course I mean operations on components of a formula that can be done.  Like for '2+3/5' you can't add 2+whatever until 3/5 is done at a later stage.


3A.  What is your suggested feature?


Now how I would implement it of course would need to work with the rest of the Mathcad framework and commands.  In my Excel version I would simply write ".=" in a cell below my original formula and my macro would place the iteration in the adjacent cell.  I would add additional dots to show how many steps I was skipping but ended with a plain "=" when I wanted the final result.  Nice thing about that is that the equal sign was always justified.  Most of the time my equations are not so complex so that when I wanted to display the second last iteration, I would only need to specify "..=" to see the step before all the terms were added up to a final value.

So in Mathcad where we use ":=" to define a variable, the next lines could (just a suggestion) use the dots to show one ore more iterations from the previous line and a simple "=" to request the final result. 


By the way, a simple "=" should be allowed anywhere in Mathcad to display the result of a previous math (would help cut down on long formulas or help with long answers).


Also, units would be an issue, but the user could always, like we do with current results, edit the units in the result line as desired.  Mathcad could lock out all other portions of the result so that the user can only make changes to units.  But if Mathcad sees something like this '2.3m + 12in' it could assume that the first unit is the default unit, or in a quotient "2356lbf / (23in)^2' it would find a unit close to the desired answer, like 'psi'. 


One extra feature is that Mathcad could look at previous results on the page and try to pick the 'popular' result units that the user is choosing, to minimize reworking the units every time.

4. What is the use case for your organization?


To be honest, this is not my organization's initiative, nor do they care.  I am talking about a concept more generic and wide reaching.

5. What business value would your suggestion represent for your organization?

Minimal, this is not their initiative.  I am representing structural engineering, although not many engineers come up with these ideas or are aware that they can actually make a feature suggestion/request (or even care--they have bigger fish to fry).  They just try to use the software that is mandated by the company as best as they can.

Community Manager
Status changed to: Acknowledged

Hello @SPauliszyn,
Thank you for your idea and the all the detailed information provided.


By the way, this is how my excel macro handles the 'look' of the iterations.  I'm sure I can dig up more complex examples from previous designs.  (i was very close to having it actually work through the unit calculations but for now it just displays them and then strips them from the calculations.  I have to enter the final compatible units).  The equations are kept in a linear fashion because I don't have many options for graphical formatted math in excel, but the formulas I work with in engineering are not so complex.  This would look awesome in Mathcad.



Now imagine that the math is several pages away from the variable declarations, or one variable is from a previous section many pages away.  Without having to backtrack, just the substitution step helps to ensure that the numbers in the equation are at least in the ballpark and it helps to catch errors.