is performed with the search of line sets which can transmit simultaneously using the same specific orthogonal resource. Maximal throughput can be achieved if all lines transmit simultaneously using one orthogonal resource. Network capacity (throughput, unit of information per unit of time) is the essence of any network and the ultimate target of performance optimization [1]. The research on ad hoc network capacity can be divided into two parts: the estimation of achievable capacity, and the ways to achieve maximal theoretical capacity. There are three main types of network capacity [1]:  
1. The sum of all active lines' successful reception rates (the case of transmission between two neighbor nodes). 2. The sum of all active routes' successful reception rates (the case of multi-hop transmission between non-neighbor nodes). 3. The sum of all active route trees' successful reception rates (the case of multicast transmission from one node to multiple nodes). The throughput of routes depends on line throughput. Therefore, great research attention is paid to the line throughput (the first type mentioned above). Several works have proposed achievable capacity estimations for the following: common case of ad hoc networks [1; 4; 5; 6]; multicast data flows in ad hoc networks [7]; mobile ad hoc networks [8], where the capacity dependence on the network mobility was demonstrated; ad hoc networks with directional antennas [9; 10]; ad hoc networks with spatial diversity using multiple input and output antennas (MIMO) [11; 12]; ad hoc networks with infrastructure nodes [13]; capacity-delay tradeoffs in delay-tolerant ad hoc networks [14; 15; 16; 17]; multipacket reception using network coding [18; 19; 20]. Works that search for ways to achieve theoretically maximal capacity are usually based either on heuristic optimization of randomly allocated resources [21] or on simplified cases or approximation where resource allocation can be expressed as a convex optimization problem [22]. Usually, the capacity maximization parameters are chosen beforehand, but the work [21] utilizes the elephant herding lion optimizer (EHLO) algorithm to pinpoint critical attributes of a vehicular ad hoc network to use for resource allocation. Afterwards, for scalability, the network is divided into clusters with the multiple fuzzy c-means (MFCM) algorithm. Subsequently, the crossover and mutation (CM)-centered marine predator algorithm (MPA) is used for resource allocation optimization. Some works incorporate routing into resource optimization, because routes define active lines. For example, the work [22] proposes a cross-layer routing and radio resource allocation algorithm in the case of Massive MIMO and orthogonal frequency division multiple access (OFDMA) wireless ad hoc networks. The proposed algorithm simultaneously finds data routes, sub-carrier schedules, and power allocations that maximize network throughput by converting a non-convex resource allocation optimization problem into a convex one. Channel resources can be allocated to more than data transmission. The paper [23] proposes an algorithm to allocate spectrum and power between positioning and data transmission. MIMO systems allow us to estimate the signal's angle of arrival. With multiple nodes, it is possible to estimate the location of each node in an ad hoc network. Location-based routing and resource allocation allow for higher network throughput, but at the same time, some part of network throughput is spent on node localization. This work considers the tradeoff between positioning and data transmission. The network is separated into clusters based on nodes' direct line-of-sight probability. Afterwards, the allocation of power and spectrum between localization and data transmission is chosen for clusters using the Generalized Benders Decomposition (GBD) algorithm. The work [24]proposes the algorithm for time slot allocation between data transmission and channel sensing. Good channel state estimates can provide higher line throughput.