IntraTable
IntraTable is an internal, experimental, unsupported function that is subject to change in the future. It has been included behind the scenes in release 4.1.2 to allow interested users to try it out and give us feedback, and to locate and fix flaws and bugs before exposing it. In the future, we may incorporate these features directly into Table and not expose this function, or perhaps we will continue to keep them separate. That may depend on experience we gain in experimental uses of it in your models.
IntraTable(I,J,...)(x1,x2,....)
IntraTable is a generalization of Table. Like Table, it creates a multi-dimensional edit table that allows users to edit individual cells, placing numbers, text and expressions in each cell. However, unlike Table, it allows individual cells to contain formula that reference others cells in the same table, much like the cells of a spreadsheet reference other cells in the same spreadsheet.
IntraTable has precisely the same expression syntax as Table. You can change any valid top-level Table definition to an IntraTable (by changing the word "Table" in expression view to "IntraTable"), and things will operate exactly the same -- the edit table will operate the same way, the result will be the same, etc. The only difference occurs when you place a formula in a cell that references other cells in the same table. A normal Table will reject these expressions, treating them as disallowed circular dependencies, while IntraTable allows them.
When to use
In order to hand these, IntraTable uses a totally different evaluation method than Table, which in general is substantially slower. Thus, if you don't have intra-cell dependencies, you're better off sticking with Table.
Dependendies between cells within an edit table is very bad practice stylistically, and therefore, should be discouraged. If overused, it can bring with it many disadvantages that we are all familiar with from the spreadsheet world, including easy sources of errors, flexibility limitations when adapting to dimensionality changes (possibly introducing a need to copy/paste formula when dimensions change), undesireabe redundancy with multiple copies of the same formulas, and an increase in effort to validate the correctness of models. Therefore, it is recommended that you avoid the urge to use this ubiquitously just because you are used to doing it this way in spreadsheets.
If used sparingly, it can be very useful and convenient. Some heavily recurrent spreadsheet calculations can be directly translated into an IntraTable, thus simplifying that initial conversion (although you may want to consider cleaning these up later for reasons discussed already). The Dynamic function has a basic limitation that recurrent Dynamic formula can only recur over the Time index, so in some cases IntraTable can provide one way around that. And, unlike Dynamic, IntraTable allows the dependencies to be in an arbitrary order -- they don't have to be left-to-right, so when you have dependencies that are not simply left-to-right, they can be easier to encode with an IntraTable.
How to refer to other cells
You can refer to other cells by using the Slice and Subscript functions on the keyword Self, slicing or subscripting over the table indexes themselves. The following table shows several examples:
Enable comment auto-refresher