예제 #1
0
        protected override void Context()
        {
            _dataFactory               = A.Fake <IDataFactory>();
            _simModelExporter          = A.Fake <ISimModelExporter>();
            _simModelSimulationFactory = A.Fake <ISimModelSimulationFactory>();
            _simModelSimulation        = A.Fake <ISimulation>();

            sut = new SimModelBatch(_simModelExporter, _simModelSimulationFactory, _dataFactory);

            A.CallTo(() => _simModelSimulationFactory.Create()).Returns(_simModelSimulation);
            _modelCoreSimulation = A.Fake <IModelCoreSimulation>();
            _simModelXmlString   = "SimModelXml";
            A.CallTo(() => _simModelExporter.Export(_modelCoreSimulation, SimModelExportMode.Optimized)).Returns(_simModelXmlString);

            _parameterProperties1 = A.Fake <IParameterProperties>();
            _parameterProperties2 = A.Fake <IParameterProperties>();
            _parameterProperties3 = A.Fake <IParameterProperties>();

            A.CallTo(() => _parameterProperties1.Path).Returns("ParameterPath1");
            A.CallTo(() => _parameterProperties2.Path).Returns("ParameterPath2");
            A.CallTo(() => _parameterProperties3.Path).Returns("ParameterPath3");

            _allSimModelParameters = new List <IParameterProperties> {
                _parameterProperties1, _parameterProperties2, _parameterProperties3
            };
            A.CallTo(() => _simModelSimulation.ParameterProperties).Returns(_allSimModelParameters);

            _variableParameterPaths = new List <string> {
                _parameterProperties1.Path, _parameterProperties2.Path
            };
        }
예제 #2
0
 public SimModelManagerFactory(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory, IMoBiContext context, IDataNamingService dataNamingService, IDisplayUnitRetriever displayUnitRetriever)
 {
     _simModelExporter          = simModelExporter;
     _simModelSimulationFactory = simModelSimulationFactory;
     _context              = context;
     _dataNamingService    = dataNamingService;
     _displayUnitRetriever = displayUnitRetriever;
 }
예제 #3
0
 public SimModelManagerFactory(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory, IMoBiContext context, IDisplayUnitRetriever displayUnitRetriever, IDataRepositoryTask dataRepositoryTask)
 {
     _simModelExporter          = simModelExporter;
     _simModelSimulationFactory = simModelSimulationFactory;
     _context = context;
     _displayUnitRetriever = displayUnitRetriever;
     _dataRepositoryTask   = dataRepositoryTask;
 }
예제 #4
0
 public SimModelManager(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory, IDataFactory dataFactory) : base(simModelExporter, simModelSimulationFactory)
 {
     _dataFactory        = dataFactory;
     _executionTimeLimit = 0;
     _timer = new Timer {
         Interval = 1000
     };
     _timer.Elapsed += onTimeElapsed;
 }
예제 #5
0
 public PopulationRunner(
     ISimModelExporter simModelExporter,
     ISimModelSimulationFactory simModelSimulationFactory,
     IObjectPathFactory objectPathFactory,
     IEntitiesInSimulationRetriever entitiesInSimulationRetriever) : base(simModelExporter, simModelSimulationFactory)
 {
     _objectPathFactory             = objectPathFactory;
     _entitiesInSimulationRetriever = entitiesInSimulationRetriever;
 }
예제 #6
0
 public SimModelBatch(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory, IDataFactory dataFactory) : base(
         simModelExporter, simModelSimulationFactory)
 {
     _dataFactory = dataFactory;
     KeepXMLNodeInSimModelSimulation = false;
 }
예제 #7
0
 public SimModelManagerForSpecs(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory) : base(simModelExporter, simModelSimulationFactory)
 {
 }
예제 #8
0
 public SimModelBatch(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory, IDataFactory dataFactory) : base(simModelExporter, simModelSimulationFactory)
 {
     _dataFactory         = dataFactory;
     _parameterValueCache = new Cache <string, double>();
 }
예제 #9
0
 public PopulationRunner(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory, IObjectPathFactory objectPathFactory) : base(simModelExporter, simModelSimulationFactory)
 {
     _objectPathFactory = objectPathFactory;
     NumberOfCoresToUse = 1;
 }
예제 #10
0
 protected SimModelManagerBase(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory)
 {
     _simModelExporter          = simModelExporter;
     _simModelSimulationFactory = simModelSimulationFactory;
 }
예제 #11
0
 public SimulationAnalyzer(ISimModelExporter simModelExporter, ISimModelSimulationFactory simModelSimulationFactory) : base(simModelExporter, simModelSimulationFactory)
 {
 }