Пример #1
0
 public HttpResponseMessage Put(ParametersEntityModel parametersModel)
 {
     _parametersRepository.UpdateParameters(parametersModel);
     var list = _parametersRepository.GetParametersList();
     HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, list);
     return response;
 }
Пример #2
0
 public ParametersEntityModel GetParametersDBModel(Parameters parameters)
 {
     var model = new ParametersEntityModel();
     model.Alpha = parameters.Alpha;
     model.Betta = parameters.Betta;
     model.DefaultPheromone = parameters.DefaultPheromone;
     model.EvaporationRate = parameters.EvaporationRate;
     model.GreedyRate = parameters.EvaporationRate;
     model.Iterations = parameters.Iterations;
     model.IterationsWithoutChanges = parameters.IterationsWithoutChanges;
     model.Q = parameters.Q;
     model.MatrixString = MatrixToString(parameters.Matrix);
     return model;
 }