What's the best syntax for defining a matrix/tensor via its indices?

95 Views Asked by At

This is a question about math notation. The context is, I'm trying to correctly define a problem of scheduling the flow through a set of devices, $D = \{d_1, d_2, ... d_n\}$, over a finite discrete future planning horizon $T$ = $(1,2,3\dots,60)$. The schedule of all devices over the planning horizon can be described by a real valued matrix, $Q$, with $|D|$ rows and $|T|$ columns. To define $Q$ I could state just that. But given a definition of $D$ and $T$ which form the "index sets", or just "indices" of matrix, to define $Q$ could/should I just say "Let $Q = D \times T \rightarrow \mathbb{R}$", or something else that is more succinct and direct than "Let $Q$ be a matrix with $|D|$ rows and $|T|$ columns"?

1

There are 1 best solutions below

1
On

Is there any advantage to representing your flows as a matrix ? Will you be adding sets of flow values from different scenarios, for example ?

If not, you might as well just define a function $f:D \times T \rightarrow \mathbb{R}$ where $f(d_i, t)$ is the flow through device $d_i$ at time $t$. And you might want to think about whether your domain is really the whole of $\mathbb{R}$. For example, can flow values be negative ?