## 3 Mathematical Model for Drawing a Hierarchical Hypergraph with Orthogonal Hyperedges and Ports
 \tag{7}\]  
Analogous conditions are to be imposed for the distance between each pair of port vertices \(u^{\prime},v^{\prime}\in K_{U}(u)\) (or \(u^{\prime},v^{\prime}\in K_{L}(u)\)) of every generating vertex \(u\in V\). Note that they set both the minimum and the maximum distance between \(u^{\prime}\) and \(v^{\prime}\) as follows:  
\[ \begin{split}\rho(u^{\prime},v^{\prime})\leq|X_{u^{\prime}}-X_{ v^{\prime}}|\leq\delta(u^{\prime},v^{\prime})\\ \forall\ u\in V,\,\forall\ u^{\prime},\,v^{\prime}\in K_{U}(u) \text{ or }\forall\ u^{\prime},\,v^{\prime}\in K_{L}(u):\ u^{\prime}\prec v^{\prime}\,. \end{split}  \tag{8}\]The next set of conditions ensure that the mean value of the \(x\)-coordinates of the port vertices in the sets \(K_{U}(u)\) and \(K_{L}(u)\) are equal such that all of the port vertices in \(K_{U}(u)\) and \(K_{L}(u)\) are to be merged back into one generating vertex in the hypergraph drawing:  
\[ \begin{split}\left|\frac{1}{|K_{U}(u)|}\sum_{u^{\prime}\in K_{U}( u)}X_{u^{\prime}}\right|&=\left|\frac{1}{|K_{L}(u)|}\sum_{v^{ \prime}\in K_{L}(u)}X_{v^{\prime}}\right|\\ &\qquad\qquad\qquad\qquad\qquad\qquad\forall\ u\in V:\ K_{U}(u) \
eq\emptyset,\ K_{L}(u)\
eq\emptyset.\end{split}  \tag{9}\]  
The obvious condition that every port vertex \(u\) incident to hyperedge \(e\) lies between the leftmost and the rightmost vertices incident to hyperedge \(e\) defines the following connection between variables \(X_{u}\), \(LMX_{e}\), and \(RMX_{e}\) for every hyperedge \(e\):  
\[ \begin{split} LMX_{e}&\leq X_{u}\leq RMX_{e}\\ &\qquad\qquad\qquad\forall\ e=(S,T)\in\ E_{H^{\prime}},\ \forall\ u\in S\cup T\,.\end{split}  \tag{10}\]  
A set of constraints (11)-(17) is formulated for each pair of hyperedges \(e_{1}=(S_{1},T_{1})\), \(e_{2}=(S_{2},T_{2})\) with source nodes on the same layer. If the abscissa of a port vertex \(u\) incident to the hyperedge \(e_{2}\) belongs to the interval that is defined by the \(x\)-coordinates of the leftmost and the rightmost vertices incident to hyperedge \(e_{1}\), then the vertex \(u\) is inside the area of crossings of hyperedge \(e_{1}\). In this case, there might be a crossing of a vertical segment of hyperedge \(e_{2}\) connected with the vertex \(u\) and a horizontal segment of hyperedge \(e_{1}\). The fact that a vertex is inside the area of crossings for a pair of hyperedges depends on the abscissa of the vertex and the values of the variables \(LMX_{e_{1}}\) and \(RMX_{e_{1}}\) in the following manner:  
\[ \begin{split} RMX_{e_{1}}-M\times AC_{e_{1},u}\leq X_{u}\quad \text{or}\quad X_{u}\leq LMX_{e_{1}}+M\times AC_{e_{1},u}\\ \forall\ e_{1}=(S_{1},T_{1}),\ e_{2}=(S_{2},T_{2})\in E_{H^{ \prime}},\ \forall\ u\in S_{2}\cup T_{2}\,,\end{split}  \tag{11}\]  
Note that in expression (11) and in all of the formulae below, \(M\) is an arbitrary large positive number, \(M\gg 1\). The nonlinear conditions (3) and (4) are to be linearized in a standard manner as follows:  
\[ \begin{split} UC_{e_{1},e_{2}}&\geq\sum_{u\in S_{ 2}}AC_{e_{1},u}-M\times(1-HO_{e_{1},e_{2}})\\ &\qquad\qquad\qquad\qquad\forall\ e_{1},\ e_{2}\in E_{H^{\prime }}:\ e_{2}=(S_{2},T_{2}),\ e_{1}\prec e_{2}\,.\end{split}  \tag{12}\]  
\[ \begin{split} LC_{e_{1},e_{2}}&\geq\sum_{u\in T_{1}} AC_{e_{2},u}-M\times(1-HO_{e_{1},e_{2}})\\ &\qquad\qquad\qquad\qquad\forall\ e_{1},\ e_{2}\in E_{H^{\prime }}:\ e_{1}=(S_{1},T_{1}),\ e_{1}\prec e_{2}\,.\end{split}  \tag{13}\]  
\[ \begin{split} UC_{e_{1},e_{2}}&\geq\sum_{u\in S_{ 1}}AC_{e_{2},u}-M\times HO_{e_{1},e_{2}}\\ &\qquad\qquad\qquad\forall\ e_{1},\ e_{2}\in E_{H^{\prime}}:\ e_{1}=(S_{1},T_{1}),\ e_{1}\prec e_{2}\,.\end{split}  \tag{14}\]  
\[ \begin{split} LC_{e_{1},e_{2}}&\geq\sum_{u\in T_{2}} AC_{e_{2},u}-M\times HO_{e_{1},e_{2}}\\ &\qquad\qquad\qquad\qquad\forall\ e_{1},\ e_{2}\in E_{H^{\prime }}:\ e_{2}=(S_{2},T_{2}),\ e_{1}\prec e_{2}\,.\end{split}  \tag{15}\]  
The vertical segments of every two hyperedges have no common point in the hypergraph layout.