## 3 Mathematical Model for Drawing a Hierarchical Hypergraph with Orthogonal Hyperedges and Ports  
If hypergraph \(H\) contains hyperedges connecting the vertices of non-adjacent layers, then every such \"long\" hyperedge \(e\) has to be transformed into several hyperedges that connect the vertices of adjacent layers only, with additional (dummy) vertices being introduced for every \(e\) in the following way:  
1. Find adjacent vertices \(u\) and \(v\) such that \(\{u,v\}=\operatorname{argmax}_{u\in S,v\in T}(\lambda(u)-\lambda(v))\);
2. Insert a single dummy node on each layer \(l\) of hypergraph \(H\), \(\lambda(u)<l<\lambda(v)\);
3. Replace the long hyperedge \(e\) with \(\lambda(v)-\lambda(u)\) hyperedges that connect the inserted dummy vertices with the incident vertices of the original long hyperedge \(e\) so that each new hyperedge connects the vertices of the adjacent layers. This step should hold all of the connections between nodes on adjacent layers that are defined by hyperedge \(e\). Consider the hypergraph \(H^{\prime}=(V^{\prime},E_{H^{\prime}},\lambda^{\prime})\), which is constructed from the hypergraph \(H\) (after inserting dummy vertices into it) by splitting each vertex into subsets of port vertices. For each vertex \(u\in V\) (so-called \"generating vertex\"), sets \(K_{U}\) and \(K_{L}\) of the port vertices are introduced, \(K_{U}(u)=\{u_{U}^{1},u_{U}^{2},\ldots,u_{U}^{m_{U}}\}\) and \(K_{L}(u)=\{u_{L}^{1},u_{L}^{2},\ldots,u_{L}^{m_{L}}\}\), where \(m_{U}\) and \(m_{L}\) denote the numbers of ports of vertex \(u\) for the upper vertical segments and for the lower vertical segments of the incident hyperedges, respectively. Each port vertex in the set \(K_{U}(u)\cup K_{L}(u)\) is considered a vertex of hypergraph \(H^{\prime}\). A function \(C\) is introduced as well. For each port vertex, the function \(C\) yields its generating vertex. Note that \(\lambda^{\prime}(v)=\lambda\ (u)\ \forall\ v\in K_{U}(u)\cup K_{L}(u)\). Figure 7 demonstrates an example of such a transformation of hypergraph \(H\) into hypergraph \(H^{\prime}\). Figure 6: Examples of the non-feasible overlapping of hyperedges: (**a**) non-feasible overlapping of vertical segments; (**b**) non-feasible overlapping of horizontal segments. The following specific constraints are to be taken into account for the drawing of hypergraph \(H^{\prime}\): port vertices with the same value for function \(C\) (those generated by one generating vertex) should be neighboring ones, i.e., between any two port vertices with the same value for function \(C\), on every layer, there is no port vertex with another value for function \(C\). For the mathematical formulation of the hypergraph drawing problem, three sets of real variables are introduced--\(X\), \(LMX\), and \(RMX\)--as well as four sets of integer variables--\(AC\), \(HO\), \(UC\), and \(LC\). Variable \(X_{v}\) denotes the \(x\)-coordinate of the vertex \(v\in V^{\prime}\). The variables \(LMX_{e}\) and \(RMX_{e}\) are the \(x\)-coordinates of the leftmost and rightmost nodes of hyperedge \(e\), respectively. A minimum distance \(\rho(u,v)\) is known for each pair of port vertices \(u,v\in V^{\prime}\): \(u,v\in K_{U}(C(u))\) (or \(u,v\in K_{L}(C(u))\)), \(u\prec v\), or each pair of generating vertices \(u,v\in V\): \(u\prec v\). The order relation \(u\prec v\) for a pair of vertices \(u\) and \(v\) means that they are in lexicographic order on the same layer. A maximum distance \(\delta(u^{\prime},v^{\prime})\) is known between each pair of port vertices \(u^{\prime},v^{\prime}\in K_{U}(u)\) (or \(u^{\prime},v^{\prime}\in K_{L}(u)\)) of a generating vertex \(u\), \(u^{\prime}\prec v^{\prime}\). A minimum distance \(\theta(e_{1},e_{2})\) is known between vertical segments \(sU(e_{1})\) and \(sL(e_{2})\) or \(sL(e_{1})\) and \(sU(e_{2})\) for each pair of hyperedges \(e_{1},e_{2}\in E_{H^{\prime}}\): \(e_{1}\prec e_{2}\).