/// <summary> /// <see cref="BrandsController"/> クラスの新しいインスタンスを作成します。 /// </summary> /// <param name="logger">ロガー。</param> public BrandsController( IExecutionModel executor, ILogger <BrandsController> logger ) { this.Logger = logger; }
/// <summary> /// <see cref="ProductsPutService"/> クラスの新しいインスタンスを作成します。 /// </summary> /// <param name="getRepository">取得リポジトリ。</param> /// <param name="putRepository">更新リポジトリ。</param> /// <param name="executor">実行者。</param> /// <param name="logger">ロガー。</param> public ProductsPutService( IProductsGetRepository getRepository, IProductsPutRepository putRepository, IExecutionModel executor, ILogger <ProductsPutService> logger ) { this.GetRepository = getRepository; this.PutRepository = putRepository; this.Executor = executor; this.Logger = logger; this.Output = new ProductsPutOutputDto(); }
/// <summary> /// <see cref="CustomersPutService"/> クラスの新しいインスタンスを作成します。 /// </summary> /// <param name="getRepository">取得リポジトリ。</param> /// <param name="putRepository">更新リポジトリ。</param> /// <param name="executor">実行者。</param> /// <param name="logger">ロガー。</param> public CustomersPutService( ICustomersGetRepository getRepository, ICustomersPutRepository putRepository, IExecutionModel executor, ILogger <CustomersPutService> logger ) { this.GetRepository = getRepository; this.PutRepository = putRepository; this.Executor = executor; this.Logger = logger; this.Output = new CustomersPutOutputDto(); }
/// <summary> /// <see cref="BrandsPutService"/> クラスの新しいインスタンスを作成します。 /// </summary> /// <param name="getRepository">取得リポジトリ。</param> /// <param name="putRepository">更新リポジトリ。</param> /// <param name="executor">実行者。</param> /// <param name="logger">ロガー。</param> public BrandsPutService( IBrandsGetRepository getRepository, IBrandsPutRepository putRepository, IExecutionModel executor, ILogger <BrandsPutService> logger ) { this.GetRepository = getRepository; this.PutRepository = putRepository; this.Executor = executor; this.Logger = logger; this.Output = new BrandsPutOutputDto(); }
/// <summary> /// Sets the execution model /// </summary> /// <param name="execution">Model defining how to execute trades to reach a portfolio target</param> public void SetExecution(IExecutionModel execution) { Execution = execution; }
private void RunSimulation() { bool bStatus; IExecutionModel em = (IExecutionModel)_internalConfig.selectedExecutionModel.objMain; IFileFormatter ff = (IFileFormatter)_internalConfig.selectedFileFormatter.objMain; IDiscreteExecutionTraceWriter etw = (IDiscreteExecutionTraceWriter)_internalConfig.selectedExecutionTraceWriter.objMain; string sFileContents; string sFileName; CTaskSet ts; if (textFolderName.Text.Trim() == "") { MessageBox.Show("Please select a Valid Folder"); return; } DirectoryInfo di = new DirectoryInfo(textFolderName.Text); if (!di.Exists) { MessageBox.Show("Selected folder does not exists"); return; } FileInfo[] rgFiles = di.GetFiles("*.*"); foreach (FileInfo fi in rgFiles) { //Iterate over Task Set Application.DoEvents(); UpdateStatus("Reading and parsing file " + fi.Name); sFileContents = ReadFromFile(fi.FullName); ts = ff.ParseTaskSet(sFileContents); UpdateStatus("Processing file " + fi.Name + " till " + ts.HyperPeriod + " steps ..."); bStatus = em.SimulateExecution(ts); if (bStatus) { AddTaskSetSchedulability(fi.Name + ", TRUE" + ", Last Time: " + em.LastDiscreteTimeValue.ToString()); } else { AddTaskSetSchedulability(fi.Name + ", FALSE" + ", Last Time: " + em.LastDiscreteTimeValue.ToString()); } CDiscreteTimeExecutionData dted = new CDiscreteTimeExecutionData(); dted.hp = ts.HyperPeriod; dted.sFileName = fi.Name; dted.executionTrace = em.ExecutionTrace; AddDiscreteTimeExecution(dted); if (textTraceFolder.Text.Trim() != "") { //Convert 1.txt to 1_txt sFileName = fi.Name.Replace('.', '_'); //Write to File etw.WriteFile(dted.executionTrace, textTraceFolder.Text.Trim(), sFileName, _config); } } UpdateStatus("Completed processing of all files"); }