Instances

Introduction to the concept of Instances in Milliman Mind and how to use them?

Written By Nikolas Ethoré (Super Administrator)

Updated at September 13th, 2023

Instances consist in duplicating Excel workbooks in order to add another dimension to your workbook whereas loops give you the possibility to add dimensions to your cells. We call instances of a workbook several versions of a workbook. Moreover, you can handle calculations between instances of different workbooks. For complex models that need multiple dimensions, instances are relevant because the instances for one workbook are initially independent. If you already have basic knowledge on instances, you can learn more on:

Define instances with /InstanceKeys 

To define instances in your model, you should create a table we call InstanceKey table in the main workbook. This main workbook is the only one not duplicated in your project. To create an InstanceKey table, you should follow these specificities:

  • In the name of your grid, you should add the flag /InstanceKeys to tag your grid as the InstanceKey table (ex: #GridName /InstanceKeys).

  • The headers of your InstanceKey table are the name of your workbooks that you want to duplicate (Excel file name without extension such as .xls or.xlsm). It depends on the structure you wish to create.

  • The main workbook should not be written in the headers of your InstanceKey table. Indeed, that workbook should not be duplicated.

This is a simple example of a table named InstanceKey, which defines three different instances for the workbook named Treaty:

The workbook Treaty is duplicated three times into Workbooks named TREATY01, TREATY02, and TREATY03. It will be displayed Inside Milliman Mind.

How to define links between the instances of your workbooks?

The Instancekey table can also define links between instances of your workbooks.

To that end, you should add columns in your grid with names of your workbooks as headers of your table. Thus, each column of your grid represent instances of a chosen workbook.

You can distinguish links between instances in a row in which workbooks are duplicated. Rows create connections between instances.

In fact, when a formula from a first file refers to another file, the system automatically takes all the instances of the other file (the other column) that corresponds to the current calculated key.

In this following Instancekey table, you can notice three workbooks named Treaty, TreatySection, and ProfitSharing: 

Here Treaty would be duplicated 3 times (Treaty01, Treaty02, and Treaty03), TreatySection 5 times, and ProfitSharing 4 times with instances PS1, PS2, PS3, and PS4.

In this example, if a cell from Treaty calls a cell from TreatySection, the instance TREATY02 (the current calculated key here) will access only the cell from the instance TREATY02-SEC1.

Same here if ProjectSharing access to TreatySection, in the instance PS1, elements from TREATY01-SEC1 and TREATY01-SEC2 are summed (sum if numeric values, concatenation if a string).

Manage instances after upload

First, open your project in Mind, click on the button "Project Management" (red circle in the capture). A pop-up will appear, go to "Manage models" as illustrated in this picture:

You can see all files displayed in InstanceKeys grid, you will find the different duplications of your workbooks (instances) by clicking in the icon circled in red in the picture below:

You will see that the main model with the /InstanceKeys grid (named Companylevel here) is highlighted with a new icon and a new Display/Edit button.

Display the InstanceKeys grid

To display the InstanceKeys grid, click on the Display/Edit button. It will display a popup with the grid as follows:

Update the grid/instances

Delete

Please note that you need to have the following right to access this feature:
Project Instance Keys import

With the InstanceKeys grid, you can directly update instances by following these steps:

  • Download the current grid into CSV by clicking on the button "Download current"

  • Update the file then Import the new CSV with blue button

Your InstanceKeys grid will then be updated directly in Mind.

Display instances inside Milliman Mind

Classic visualization mode

In classic mode, just use the dropdown list on the top-left of your grid to select the wanted instance. It will automatically display other cells by accessing to the chosen instance.

Workflow mode

In workflow mode, an instance selection applies for the whole step. Indeed, each file added to your step has a dropdown list with matching instances. Thus, you can select only one instance per workbook in the step. This instance will be taken into account in the grids displayed in the whole step.

You will see on top of your screen a dropdown list with workbooks added to your new step and the matching instances.

Just select the instance you want to display than all the grids from workbooks in the step will be refreshed.

In the above picture, you can distinguish three workbooks added to your step named "New step" (blue button in the picture). In this example, PS3, TREATY01-SEC2, and TREATY01 will be instances applied in the display of every grid in the step.