Matrix Size

4.50K viewsModel Design

Is there a way to find the size of matrices within a model?

QuantrixAuthority Answered question July 9, 2018

Hi Shrishank,
There is no inbuilt functionality to get this information on a per-matrix basis. As Rich indicated you can easily get this information for the model as a whole.
Whilst I am not a scripting expert, I wrote this simple script which should allow you to find out basic information about a selected matrix:

def allMatrices = matrices*.name // Scan the model and put all the matrix names in a list
def String chooseMatrixMessage = “Choose a Matrix:”
def chosenMatrix = ask(chooseMatrixMessage,[“Matrix”:allMatrices]) // Let the user select a matrix name from the list
selectedMatrix = matrices[chosenMatrix[“Matrix”]] // Select the matrix using the name that the user selected
def numCategories = selectedMatrix.categories*.name.size().toString()
def numCells = selectedMatrix.values.size().toString()
def numFormulas = selectedMatrix.formulae.size.toString()
alert(“Details for “+ + “nn” + “Categories: “+ numCategories + “n” + “Cells: ” + numCells + “n” + “Formulas: ” + numFormulas)

Kind Regards,


Not that I am aware of.  The only thing that speaks to the size of a Quantrix model of course is its file footprint (filesize).  Model Statistics under Help –>Model Statistics gives some insight into how big your model is, but there is nothing built in that I am aware of that indicates “Matrix” specific size.

I have made multiple requests that there be some sort of properties added to each matrix where one can see (from a right-click properties selection in the model browser ) matrix size, calculation speed, formulas, data source, etc for each respective matrix…perhaps it will be in the next release.

QuantrixAuthority Answered question July 9, 2018

Latest Questions

Qloud Losing Formatting 4 Answers | 0 Votes
Meditation on timelines 3 Answers | 0 Votes