internal AircraftConfigurationEngines CreateIncremental(AircraftConfigurationEngines cfg) { EnsurePopulated(); cfg.EnsurePopulated(); if (cfg.Equals(this)) { return(null); } AircraftConfigurationEngines inc = new AircraftConfigurationEngines(); if (HasEngine1Object && cfg.HasEngine1Object) { inc.Engine1 = Engine1.CreateIncremental(cfg.Engine1); } if (HasEngine2Object && cfg.HasEngine2Object) { inc.Engine2 = Engine2.CreateIncremental(cfg.Engine2); } if (HasEngine3Object && cfg.HasEngine3Object) { inc.Engine3 = Engine3.CreateIncremental(cfg.Engine3); } if (HasEngine4Object && cfg.HasEngine4Object) { inc.Engine4 = Engine4.CreateIncremental(cfg.Engine4); } return(inc); }
public void InitEngines() { navEngine = engineMng.GetEngine(Engine.engineType.navigation); weaponEngine = engineMng.GetEngine(Engine.engineType.weapon); repairEngine = engineMng.GetEngine(Engine.engineType.repair); medicEngine = engineMng.GetEngine(Engine.engineType.medic); engList.Add(navEngine); engList.Add(weaponEngine); engList.Add(repairEngine); engList.Add(medicEngine); navEngine2 = new Engine2(navEngine, navEnginePriority); weaponEngine2 = new Engine2(weaponEngine, weaponEnginePriority); repairEngine2 = new Engine2(repairEngine, repairEnginePriority); medicEngine2 = new Engine2(medicEngine, medicEnginePriority); eng2List.Add(navEngine2); eng2List.Add(weaponEngine2); eng2List.Add(repairEngine2); eng2List.Add(medicEngine2); }
public void InitEngines() { navEngine = engineMng.GetEngine(Engine.engineType.navigation); weaponEngine = engineMng.GetEngine(Engine.engineType.weapon); repairEngine = engineMng.GetEngine(Engine.engineType.repair); medicEngine = engineMng.GetEngine(Engine.engineType.medic); engList.Add(navEngine); engList.Add(weaponEngine); engList.Add(repairEngine); engList.Add(medicEngine); navEngine2 = new Engine2(navEngine, navEnginePriority); weaponEngine2 = new Engine2(weaponEngine, weaponEnginePriority); repairEngine2 = new Engine2(repairEngine, repairEnginePriority); medicEngine2 = new Engine2(medicEngine, medicEnginePriority); eng2List.Add(navEngine2); eng2List.Add(weaponEngine2); eng2List.Add(repairEngine2); eng2List.Add(medicEngine2); }
internal void ApplyIncremental(AircraftConfigurationEngines inc) { if (inc.HasEngine1Object && HasEngine1Object) { Engine1.ApplyIncremental(inc.Engine1); } if (inc.HasEngine2Object && HasEngine2Object) { Engine2.ApplyIncremental(inc.Engine2); } if (inc.HasEngine3Object && HasEngine3Object) { Engine3.ApplyIncremental(inc.Engine3); } if (inc.HasEngine4Object && HasEngine4Object) { Engine4.ApplyIncremental(inc.Engine4); } }
internal void EnsurePopulated() { if (HasEngine1Object) { Engine1.EnsurePopulated(); } if (HasEngine2Object) { Engine2.EnsurePopulated(); } if (HasEngine3Object) { Engine3.EnsurePopulated(); } if (HasEngine4Object) { Engine4.EnsurePopulated(); } }
internal AircraftConfigurationEngines Clone() { AircraftConfigurationEngines clone = new AircraftConfigurationEngines(); if (HasEngine1Object) { clone.Engine1 = Engine1.Clone(); } if (HasEngine2Object) { clone.Engine2 = Engine2.Clone(); } if (HasEngine3Object) { clone.Engine3 = Engine3.Clone(); } if (HasEngine4Object) { clone.Engine4 = Engine4.Clone(); } return(clone); }
public override void Initialize(System.Collections.Hashtable properties) { string config = null; string elevation = null; string fdr = null; //read input arguments foreach (DictionaryEntry arg in properties) { switch (arg.Key.ToString()) { case "ConfigFile": config = arg.Value.ToString(); break; case "SurfaceElevation": elevation = arg.Value.ToString(); break; case "FlowDirection": fdr = arg.Value.ToString(); break; } } //make sure that Surface Elevation and Config path have been specified if (config == null || elevation == null || fdr == null) { throw new Exception("Exception Occured in Diffusive Wave Wrapper: User Must Supply config path, elevation, and fdr in *.omi"); } //setup model properties this.SetValuesTableFields(); this.SetVariablesFromConfigFile(config); //get model information InputExchangeItem input = this.GetInputExchangeItem(0); _inExcessElementSet = input.ElementSet.ID; _inExcessQuantity = input.Quantity.ID; input = this.GetInputExchangeItem(1); _inStageElementSet = input.ElementSet.ID; _inStageQuantity = input.Quantity.ID; OutputExchangeItem output = this.GetOutputExchangeItem(0); _outExcessElementSet = output.ElementSet.ID; _outExcessQuantity = output.Quantity.ID; _dt = this.GetTimeStep(); //create instance of engine _engine = new Engine2(hw, _dt); //Define element set ElementSet eset; _engine.BuildElementSet(elevation, this.GetModelID(), this.GetModelDescription(), out eset); //save cell size this._cellsize = _engine._cellsize; //save elevation //this._elevation = _engine._elevations; rows = _engine.rows; cols = _engine.cols; //set ny and nx _engine.ny = this.ny; _engine.nx = this.nx; //STARTHERE: !!!!! Read land cover data and set Nx Ny //TODO: Read land cover data and set Nx Ny //_discretization._nx = _nx; //_discretization._ny = _ny; //create array to hold head _h = new double[_engine._elementCount]; }