示例#1
0
 private Task <SimulationPKParametersImport> importPKAnalysesFromFile(string fileFullPath, IModelCoreSimulation modelCoreSimulation, CancellationToken cancellationToken)
 {
     return(Task.Run(() =>
     {
         var importLogger = new SimulationPKParametersImport {
             FilePath = fileFullPath
         };
         importLogger.PKParameters = _pkAnalysesImporter.ImportPKParameters(fileFullPath, modelCoreSimulation, importLogger);
         return importLogger;
     }, cancellationToken));
 }
示例#2
0
        private void addImportedPKToLogForSuccessfulImport(SimulationPKParametersImport pkParameterImport)
        {
            if (pkParameterImport.Status.Is(NotificationType.Error))
            {
                return;
            }

            pkParameterImport.AddInfo(Messages.FollowingPKParametersWereSuccessfullyImported);
            foreach (var quantityPKParameter in pkParameterImport.PKParameters)
            {
                pkParameterImport.AddInfo(quantityPKParameter.ToString());
            }
        }
示例#3
0
        private void verifyThatQuantityExistsInSimulation(PathCache <IQuantity> allQuantities, QuantityPKParameter pkParameter, SimulationPKParametersImport importedPKParameter)
        {
            if (allQuantities.Contains(pkParameter.QuantityPath))
            {
                return;
            }

            importedPKParameter.AddError(Error.CouldNotFindQuantityWithPath(pkParameter.QuantityPath));
        }
示例#4
0
        private void validateConsistencyWithSimulation(IModelCoreSimulation simulation, SimulationPKParametersImport importedPKParameter)
        {
            var allQuantities = _entitiesInSimulationRetriever.OutputsFrom(simulation);

            foreach (var pkParameter in importedPKParameter.PKParameters)
            {
                verifyThatQuantityExistsInSimulation(allQuantities, pkParameter, importedPKParameter);
            }
        }