Esempio n. 1
0
        private void convertAucIVCache(IndividualSimulation individualSimulation)
        {
            var value = individualSimulation.AucIVFor(DUMMY_COMPOUND_NAME);

            if (!value.HasValue)
            {
                return;
            }

            //use the real compoud name and set the value loaded previously
            var compoundName = individualSimulation.CompoundNames.First();

            individualSimulation.ClearPKCache();
            individualSimulation.AddCompoundPK(new CompoundPK {
                CompoundName = compoundName, AucIV = value
            });
        }
Esempio n. 2
0
        private Task <SimulationRunResults> runSimulation(IndividualSimulation simulation, SimulationRunOptions simulationRunOptions)
        {
            return(Task.Run(() =>
            {
                var modelCoreSimulation = _modelCoreSimulationMapper.MapFrom(simulation, shouldCloneModel: false);
                var simResults = _simModelManager.RunSimulation(modelCoreSimulation, simulationRunOptions);

                if (!simResults.Success)
                {
                    return Task.FromResult(simResults);
                }

                _simulationResultsSynchronizer.Synchronize(simulation, simResults.Results);
                updateResultsName(simulation);

                simulation.ClearPKCache();

                raiseEvent(new SimulationResultsUpdatedEvent(simulation));
                return Task.FromResult(simResults);
            }));
        }