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.


Monday, December 23, 2013

Source / Target for sub-modelling

Since eVSM v6.15 or so, we've had a fairly powerful (and I hope, simple to understand) capability called Source/Target.  What it does, simply, is allow you to use the value of a variable in one map, as the value of a variable on another page in the same Visio document.

There is some initial setup required, which tells eVSM to search other pages for source/target links when you click the eVSM Calculator button.  We call this the page scope of the map.  To set up page scope, click the Name Unit Manager button in the eVSM toolbar/ribbon, and find the "Source/Target Pages" button on the bottom of the NUM dialog box.

The dialog just lists all the pages in the current document, and selecting a page will make the eVSM Calculator search the page for data sources and targets to match up.



So with that out of the way, Source/Target works by first defining named data sources.  The pink shape in the image above is a data source, which you just glue onto an NVU to link to the value.  You then change the text from XX to whatever name you want to give it (can be a number, or any kind of text).

Then, to use the value from a data source, you attach the light blue data target to another NVU, and set its text to the same as your data source.

You can actually have many data sources with the same name, though that means your data target(s) will need to know how to "aggregate" the multiple values.  By default, we just return the Sum of all the values.  But you can actually take the average, minimum, or maximum value too.

There's also an undocumented feature here, that lets you use simple wild cards to match sources to a target.  So if you named all your different sources such that any starting with the letter A is a certain group, and B is another, etc..., you'd be able to set the target text to A* and that would pick up anything starting with the letter A.

There's also a not-so undocumented feature, which is that every NVU on the map has an implied Data Source, with the text set to the NVU name.  That means if you wanted to get the sum of all the NVU's with a certain name, you could just add a data target and set its text to the NVU name.  This helps you out of having to write very simple managed equations.

We also provide the option of filtering by the path(s) of the parent center, and we provide a dialog for exploring all the sources that feed a target.  That dialog actually does link to the dialog for setting the page link scope.

If you have any questions on this leave a comment or contact me, I'm happy to discuss...

Friday, December 6, 2013

eVSM v6.33 Released

We've just put out a v6.33 release, which fixes a very embarrassing bug I let slip through into the v6.32 release, which basically didn't allow you to use tag sequence or pipe arrows with data.

I have been trying to increase the coverage on our automated tests lately but I guess I never got this particular issue tested, until now.

Do upgrade if you installed 6.32, with my apologies.