示例#1
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));
        }
示例#2
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);
        }