I'm trying to run battery storage module separately.
Having issues in running battwatts module using SAM SDK after setting the input parameters specified in battwatts module SDK. Can I run it as standalone module? meaning not running pvwatts module before this run. Any dependent input values populated by pvwatts that needs to be set?
Is there a way to debug or get more information on SAM module exec failure? Like missing input parameters, invalid values for the parameter etc? (ssc_module_log always returns null, is this call invocation correct?)
I don't see any errors being logged in the console using ssc_module_exec_simple method either.
Here is the Java code snippet to execute battwatts module.
api.ssc_data_set_number( data, "system_capacity", 2000f );
set_array( data, "load", "./load.csv", 8760); // Using the default load.csv generated from SAM application
api.ssc_data_set_number( data, "batt_simple_enable", 1f );
api.ssc_data_set_number( data, "batt_simple_kwh", 1000f );
api.ssc_data_set_number( data, "batt_simple_kw", 700f );
api.ssc_data_set_number( data, "batt_simple_chemistry", 1f );
api.ssc_data_set_number( data, "batt_simple_dispatch", 0f );
api.ssc_data_set_number( data, "batt_simple_meter_position", 0f );
api.ssc_data_set_number( data, "dc", 1900000f );
api.ssc_data_set_number( data, "ac", 1500000f );
api.ssc_data_set_number( data, "inverter_model", 0f );
api.ssc_data_set_number( data, "inverter_efficiency", 96f );
mod = api.ssc_module_create("battwatts");
if (api.ssc_module_exec(mod,data)==0)
{
System.out.println("error during simulation.");
int idx = 0;
int[] type = new int[2];
float[] time = new float[2];
String msg = null;
while ((msg = SSCAPIJNI.ssc_module_log(mod, idx, type, time)) != null) {
System.out.println("SAM module log " + msg + " Type:" + type[0] + " time:" + time[0]);
}
api.ssc_module_free(mod);
api.ssc_data_free(data);
return;
}
else {
System.out.println("battwatts run completed");
}
Appreciate your help.
Thanks
Ashok