Monday, December 30, 2013

eVSM Managed Equations - Part 2 (and the Calculation Explorer)

OK so in part 1 of this post, I talked about what eVSM managed equations are and how the basic ones work.  In this post, I'd like to briefly go over the arrow-based selectors for managed equations, but in all honesty they are probably beyond the scope of what most of our users will want to do with them.

So I'll start with a very busy image showing a few things of real interest:

The first thing I want to point out is the "Calculation Explorer" dialog.  This dialog actually has shipped with, I think, every release of v6, at least those with the Beta Toolbar.  The calculation explorer actually resides within the Developer ribbon, so definitely be careful in there.  But getting the developer ribbon is done the same as getting the Beta Toolbar, so go read that if you need to get that working.

The Calculation Explorer is a neat utility.  What it does is, first adds a simple unstyled text box onto the page for each hidden variable on the map, and then it runs through a partial Solve cycle, just enough to pick up the dependency tree of the map.  Excel provides similar buttons, for exploring the dependency tree of a worksheet.

Anyway, this dialog exists for the sole purpose of visualizing the relationships between variables on the map.  It is very useful in debugging calculations, especially since it prints out messages from the Solve engine, explaining some of the decisions it has made about linking different variables on the map.


Now, the reason the Calculation Explorer is in a post about managed equations is that we display a simplified view of the managed equation for the selected variable.  This, combined with the Solve trace output, can tell us much about how a managed equation got applied (or skipped).

In the image above, you can see I've selected the Resource Usage NVU on the Pipe Arrow between tags A0030 and A0040.  Actually you can't see the selection in the image, but just look at where the second text block in the top center of the Visio window.  When I selected that text block, the dialog displayed the equation, which is 'SP[Resource PT] * DPC[Computed Demand]', and when I clicked the "Show Precedents" button, it drew arrows to the corresponding NVU's.  So you'll see that the Resource PT NVU that is being pointed to is on the Same Pipe, which is what SP stands for.  You'll also see that the Computed Demand variable is on the activity Downstream from the Pipe, at the end of the Connection, hence DPC - Downstream Pipe Connect.  So this selects an NVU from the center on the head end of Pipe Arrow.  UPC selects from the center at the tail of the arrow.  UC and DC work the exact same way, except that they apply to Tag Sequence arrows rather than Pipes.

The SP, or Same Pipe, has an analog in the SA selector, which is Same Arrow, and applies to Tag Sequence arrows.


This image doesn't show real equations in Quick Mfg like the first image does, but it does illustrate the remaining selectors.  The UPTS/DPTS selectors let you get a variable from a center on the other end of a pipe arrow (or sequence arrow, using UTS/DTS).  UPS/DPS let you select a variable from the pipe arrow data set, and UAS/DAS let you do the same with Tag Sequence arrows.

There is no denying that these selectors can be a bit confusing.  The good thing is our stencil designers understand this very well and most of our users just get to use the centers and not worry about it.  If you want to build your own managed equations, I hope these two posts might help you better to understand how to go about doing that.  Or, if you're just curious how we build our calculations, this should show you. I do encourage you to explore a map you have at some point, using that Calculation Explorer utility.


No comments: