Пример #1
0
 public static SizeAndCostSettings getSizeAndCostSettings(GUIData gui)
 {
     SizeAndCostSettings sc = SizeAndCostSettings.getDefault();
     sc.overall_cost_per_watt_dc = gui.cost_per_watt_dc;
     sc.use_overall_cost_per_watt_dc = gui.use_cost_per_watt_override ? 1 : 0;
     return sc;
 }
Пример #2
0
        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;
        }
Пример #3
0
        public static UtilityRateSettings getUtilityRateSettings(GUIData gui)
        {
            UtilityRateSettings ub = UtilityRateSettings.getDefault();

            ub.analysis_years = gui.analysis_years;
            ub.rate_escalation = new float[] {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;

            return ub;
        }
Пример #4
0
        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;
        }
Пример #5
0
        public static CashLoanSettings getCashLoanSettings(GUIData gui)
        {
            CashLoanSettings cb = CashLoanSettings.getDefault();
            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.real_discount_rate = gui.discount_rate;

            if (gui.enable_incentives)
            {//Enable
                cb.pbi_sta_amount = new float[] {gui.srec_price / 1000f};
                cb.itc_fed_percent = 30;
            }
            else
            {//Disable
                cb.pbi_sta_amount = new float[] {0};
                cb.itc_fed_percent = 0;
            }

            return cb;
        }
Пример #6
0
        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);
        }
Пример #7
0
 public static PVSystemModel runModel(GISData gis, GUIData gui)
 {
     return runModel(gis, gui, null);
 }
Пример #8
0
 public GUIData build()
 {
     GUIData d = new GUIData(this);
     return d;
 }
Пример #9
0
        public GUIData build()
        {
            GUIData d = new GUIData(this);

            return(d);
        }