Exemplo n.º 1
0
        public SimulationBatch Create(IModelCoreSimulation modelCoreSimulation, SimulationBatchOptions simulationBatchOptions)
        {
            var simulationBatch = Create();

            simulationBatch.Initialize(modelCoreSimulation, simulationBatchOptions);
            return(simulationBatch);
        }
Exemplo n.º 2
0
 public override void GlobalContext()
 {
     base.GlobalContext();
     _simulationBatchOptions = new SimulationBatchOptions
     {
         VariableMolecules = new[]
         {
             new[] { "Organism", "Kidney", "Intracellular", "Caffeine" }.ToPathString(),
             new[] { "Organism", "Kidney", "Intracellular", "NOT_THERE" }.ToPathString()
         }
     };
 }
Exemplo n.º 3
0
 public override void GlobalContext()
 {
     base.GlobalContext();
     _simulationBatchOptions = new SimulationBatchOptions
     {
         VariableParameters = new[]
         {
             new[] { "Organism", "NOT THERE", "Volume" }.ToPathString(),
             new[] { "Organism", "Hematocrit" }.ToPathString(),
         }
     };
 }
Exemplo n.º 4
0
        public override void GlobalContext()
        {
            base.GlobalContext();
            _simulationBatchOptions = new SimulationBatchOptions
            {
                VariableMolecule = new[] { "Organism", "Kidney", "Intracellular", "Caffeine" }.ToPathString(),

                VariableParameter = new[] { "Organism", "Liver", "Volume" }.ToPathString(),

                CalculateSensitivity = true
            };
            sut = _simulationBatchFactory.Create(_simulation, _simulationBatchOptions);
        }
Exemplo n.º 5
0
 public void Initialize(IModelCoreSimulation simulation, SimulationBatchOptions simulationBatchOptions)
 {
     _simulationPersistableUpdater.UpdateSimulationPersistable(simulation);
     //SimModel optionally caches XML used for loading a simulation as string.
     //This XML string was used e.g. by the old Matlab-/R-Toolbox when saving a simulation to XML.
     //C++ export also depends on the original XML string at the moment (not quite clear why).
     //Because per default XML is NOT cached, we need to set the KeepXML-option to true BEFORE loading a simulation.
     _simModelBatch.KeepXMLNodeInSimModelSimulation = true;
     _simModelBatch.InitializeWith(simulation, simulationBatchOptions.Parameters, simulationBatchOptions.Molecules, simulationBatchOptions.CalculateSensitivity);
     //This needs to be done after initialization of the SimModelBatch so that we can check parameters
     validate(simulationBatchOptions);
     _simulationBatchOptions = simulationBatchOptions;
 }
Exemplo n.º 6
0
        public override void GlobalContext()
        {
            base.GlobalContext();
            _simulationBatchOptions = new SimulationBatchOptions
            {
                VariableMolecules = new[]
                {
                    new[] { "Organism", "Kidney", "Intracellular", "Caffeine" }.ToPathString()
                },

                VariableParameters = new[]
                {
                    new[] { "Organism", "Liver", "Volume" }.ToPathString(),
                    new[] { "Organism", "Hematocrit" }.ToPathString(),
                }
            };
            sut = _simulationBatchFactory.Create(_simulation, _simulationBatchOptions);
        }
 public ConcurrentRunSimulationBatch(IModelCoreSimulation simulation, SimulationBatchOptions simulationBatchOptions)
 {
     Simulation             = simulation;
     SimulationBatchOptions = simulationBatchOptions;
     Id = generateId();
 }
Exemplo n.º 8
0
 private void validate(SimulationBatchOptions simulationBatchOptions)
 {
     validate(simulationBatchOptions.Molecules, _simModelBatch.VariableMoleculePaths);
     validate(simulationBatchOptions.Parameters, _simModelBatch.VariableParameterPaths);
 }