public IActionResult GetEquationSystem([FromBody] HybridSystemRequest hybridRequest)
        {
            if (hybridRequest.Type != ModuleType.Multiple)
            {
                return(BadRequest());
            }

            var systemRequest = HybridToSystemRequest(hybridRequest, _ => _);
            var system        = (MultipleModuleSystem)systemRequest.ToSystem();
            var graph         = new SystemStateGraph(system, false);
            var matrix        = graph.BuildWeightMatrix();

            var result = new List <List <double> >();
            var sb     = new StringBuilder();

            for (var row = 0; row < matrix.GetLength(0); row++)
            {
                sb.Append($"P{row + 1}(t)/dt = ");
                var currentEq = new List <double>();
                for (var col = 0; col < matrix.GetLength(1); col++)
                {
                    matrix[row, col] = Math.Round(matrix[row, col], 7, MidpointRounding.AwayFromZero);

                    currentEq.Add(matrix[row, col]);
                    if (matrix[row, col] != 0)
                    {
                        var value = matrix[row, col] < 0
                            ? $" - {(-1 * matrix[row, col]).ToString(CultureInfo.InvariantCulture)}"
                            : $" + {matrix[row, col].ToString(CultureInfo.InvariantCulture)}";

                        sb.Append($"{value} * P{col + 1}(t)");
                    }
                }

                result.Add(currentEq);
                sb.AppendLine();
            }

            return(Ok(new EquationSystemModel
            {
                Coefficients = result,
                SystemStates = graph.AllPossibleStates.Select(ToModel)
            }));
        }