private void SendCostMatrixResponseMessage(CostMatrixResponseMessage message)
        {
            m_Converter.DoubleMatrix = message.Matrix;
            m_Converter.Convert();

            var calculatedMessage = new CostMatrixCalculatedMessage
                                    {
                                        Matrix = m_Converter.IntegerMatrix,
                                        CostPerFeature = CostPerFeature.ToArray()
                                    };

            m_Bus.PublishAsync(calculatedMessage);
        }
Example #2
0
        internal void CostMatrixCalculatedMessageHandler(CostMatrixCalculatedMessage message)
        {
            IAntSettingsSource antSettingsSource = m_AntSettingsSourceManager.Source;

            IColonyParameters colonyParameters = m_ColonyParametersFactory.Create(message.Matrix,
                                                                                  message.CostPerFeature,
                                                                                  antSettingsSource.IsFixedStartNode,
                                                                                  antSettingsSource.FixedStartNode);

            m_ServiceProxy.CreateColony(colonyParameters);

            WaitForIsColonyCreatedMessage();

            m_ServiceProxy.Start();
        }