public ArrayParametersComputedList(GISData gis, ArrayParameterList array) : base(new List <FloatParameter>(), defaults) { int numModules = calcNumPanelsOnRoof(gis.width, gis.height, array.module_model_params.getWidth(), array.module_model_params.getHeight()); if (array.inverter_model_params == null) { InverterModelParams imp = new DatasheetInverterModel("default", numModules * array.module_model_params.getRatedPower() * 1.15f); array.setInverterModelParams(imp); } int[] shape = calcArrayWiring(numModules, array.inverter_model_params.getMaxRatedVoltage(), array.module_model_params.getVmax()); Dictionary <string, IParameter> update = new Dictionary <string, IParameter>() { { "modules_per_string", new FloatParameter("modules_per_string", shape[0]) }, { "strings_in_parallel", new FloatParameter("strings_in_parallel", shape[1]) }, { "subarray1_tilt", new FloatParameter("subarray1_tilt", gis.tilt) }, { "subarray1_azimuth", new FloatParameter("subarray1_azimuth", gis.azimuth) }, { "inverter_count", new FloatParameter("inverter_count", 1) } }; parameters.Clear(); foreach (string key in update.Keys) { parameters.Add(key, update[key]); } }
public ArrayParametersComputedList(GISData gis, ArrayParameterList array) : base(new List<FloatParameter>(),defaults) { int numModules = calcNumPanelsOnRoof(gis.width, gis.height, array.module_model_params.getWidth(), array.module_model_params.getHeight()); if (array.inverter_model_params == null) { InverterModelParams imp = new DatasheetInverterModel("default", numModules * array.module_model_params.getRatedPower() * 1.15f); array.setInverterModelParams(imp); } int[] shape = calcArrayWiring(numModules, array.inverter_model_params.getMaxRatedVoltage(), array.module_model_params.getVmax()); Dictionary<string, IParameter> update = new Dictionary<string, IParameter>() { {"modules_per_string", new FloatParameter("modules_per_string",shape[0])}, {"strings_in_parallel", new FloatParameter("strings_in_parallel",shape[1])}, {"subarray1_tilt", new FloatParameter("subarray1_tilt",gis.tilt)}, {"subarray1_azimuth", new FloatParameter("subarray1_azimuth",gis.azimuth)}, {"inverter_count", new FloatParameter("inverter_count", 1)} }; parameters.Clear(); foreach (string key in update.Keys) { parameters.Add(key,update[key]); } }
public PVSystemModel(GISData gis,ArrayParameterListBuilder apl,UtilityRateParameterBuilder upl, CashLoanParameterBuilder clp, SizeAndCostParameterBuilder scb) { gisData = gis; arrayBuilder = apl; utilityBuilder = upl; cashBuilder = clp; sizeBuilder = scb; }
public static MultiplePVSystemModel multiRunModel(GISData gis, GUIData gui, int[] years) { MultiplePVSystemModel pv = new MultiplePVSystemModel(); for (int i = 0; i < years.Length; i++) { String fn = "ExampleFiles\\Prospector\\radwx_075153995_" + years[i] + "~.tm2"; pv.Add(runModel(gis, gui, fn)); } return pv; }
public static PVSystemModel runModel(GISData gis, GUIData gui,string filename) { ArrayParameterListBuilder ab = new ArrayParameterListBuilder(); UtilityRateParameterBuilder ub = new UtilityRateParameterBuilder(); CashLoanParameterBuilder cb = new CashLoanParameterBuilder(); SizeAndCostParameterBuilder sc = new SizeAndCostParameterBuilder(); if (filename != null) { ab.weather_file(filename); } sc.overall_cost_per_watt_dc(gui.cost_per_watt_dc); ub.analysis_years(gui.analysis_years); ub.rate_escalation(gui.inflation_rate + gui.utility_ann_escal_rate); ub.ur_monthly_fixed_charge(gui.utility_monthly_fixed_cost); ub.ur_flat_buy_rate(gui.utility_price_to_compare); ub.ur_flat_sell_rate(gui.utility_price_to_compare); ub.ur_sell_eq_buy(true); cb.loan_rate(gui.loan_rate); cb.loan_term(gui.loan_term); cb.loan_debt(gui.loan_debt); cb.inflation_rate(gui.inflation_rate); cb.discount_rate(gui.discount_rate); if (gui.enable_incentives) {//Enable cb.pbi_sta_amount(gui.srec_price / 1000f); cb.itc_fed_percent(30); } else {//Disable cb.pbi_sta_amount(0); cb.itc_fed_percent(0); } PVSystemModel pv = new PVSystemModel(gis, ab, ub, cb, sc); pv.run(); return pv; }
public ArrayParameterList(IEnumerable <IParameter> input, GISData gis) : base(input, defaults) { this.gis = gis; string module_model_identifier; string inverter_model_identifier; module_model_identifier = "default"; //module_model_identifier = "BEoptCA Default Module"; inverter_model_identifier = "default"; //inverter_model_identifier = "ABB: MICRO-0.25-I-OUTD-US-208 208V [CEC 2014]"; //TODO Get the appropriate ones based on the identifiers int module_model = 1; int inverter_model = 1; //inverter_model_params = InverterModelParams.getInverterParams(inverter_model, inverter_model_identifier); inverter_model_params = null; module_model_params = ModuleModelParams.getModuleParams(module_model, module_model_identifier); }
public static PVSAMV1Settings getSettings(GISData gis) { PVSAMV1Settings pvss = PVSAMV1Settings.getDefault(); int numModules = calcNumPanelsOnRoof(gis.width, gis.height, pvss.module_model.getWidth(), pvss.module_model.getHeight()); if (pvss.inverter_model == null) { //InverterModelParams imp = new DatasheetInverterModel("default", numModules * pvss.module_model_params.getRatedPower() * 1.15f); //pvss.inverter_model = imp; } int[] shape = calcArrayWiring(numModules, pvss.inverter_model.getMaxRatedVoltage(), pvss.module_model.getVmax()); pvss.modules_per_string = shape[0]; pvss.strings_in_parallel = shape[1]; pvss.subarray1_tilt = gis.tilt; pvss.subarray1_azimuth = gis.azimuth; pvss.inverter_count = 1; return pvss; }
public ArrayParameterList(IEnumerable<IParameter> input, GISData gis) : base(input,defaults) { this.gis = gis; string module_model_identifier; string inverter_model_identifier; module_model_identifier = "default"; //module_model_identifier = "BEoptCA Default Module"; inverter_model_identifier = "default"; //inverter_model_identifier = "ABB: MICRO-0.25-I-OUTD-US-208 208V [CEC 2014]"; //TODO Get the appropriate ones based on the identifiers int module_model = 1; int inverter_model = 1; //inverter_model_params = InverterModelParams.getInverterParams(inverter_model, inverter_model_identifier); inverter_model_params = null; module_model_params = ModuleModelParams.getModuleParams(module_model, module_model_identifier); }
public static CompiledOutputData run(GISData gis, GUIData gui) { PVSAMV1Settings pvss = GISAdapter.getSettings(gis); float arraypower = pvss.modules_per_string * pvss.strings_in_parallel * pvss.module_model.getRatedPower(); DatasheetInverterSettings inverter = new DatasheetInverterSettings("default", arraypower * 1.15f); pvss.inverter_model = inverter; PVSAMV1Output pvo = (PVSAMV1Output) ModuleRunner.runModule(pvss); UtilityRateSettings urs = GUIAdapter.getUtilityRateSettings(gui); urs.setValuesFromPriorOutput(pvo); UtilityRateOutput uro = (UtilityRateOutput)ModuleRunner.runModule(urs); SizeAndCostSettings sc = GUIAdapter.getSizeAndCostSettings(gui); sc.setValuesFromPriorOutput(pvo); CashLoanSettings cls = GUIAdapter.getCashLoanSettings(gui); cls.setValuesFromPriorOutput(sc, uro); CashLoanOutput clo = (CashLoanOutput)ModuleRunner.runModule(cls); return new CompiledOutputData(pvo, uro, clo, sc); }
public static PVSystemModel runModel(GISData gis, GUIData gui) { return runModel(gis, gui, null); }
public GISData build() { GISData d = new GISData(this); return(d); }
public void initialize(GISData gis) { isInit = true; this.gis = gis; }
public ArrayParameterListBuilder(GISData gis) { initialize(gis); }
public GISData build() { GISData d = new GISData(this); return d; }