that's all my code, paul.
Others system's informations:
DC/AC: 1.40
Number of inverters: 22
Module power: 660Wp
Inverter power: 330kWac
path = 'weather files path';
files = dir_list(path, 'csv'); // search for csv files only
set('use_specific_weather_file',1);
errors = '';
for ( idx = 0; idx < #files;idx=idx+1) {
fpath[0] = path;
fpath[1] = files[idx];
weatherfiles[idx] = join(fpath,'');
outln('--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.\n');
outln('Simulacao realizada com o RMY: ' + files[idx] + '\n');
set( 'user_specified_weather_file', weatherfiles[idx] );
simulate(errors,0);
//sum_clip = sum(get('inv_cliploss'));
sum_dcinput = sum(get('dc_net'));
clippingloss = get('annual_ac_inv_clip_loss_percent');
outln('
Summary
\n');
outln('Annual AC energy in Year 1 [kWh]: ' + get('annual_energy'));
outln('DC capacity factor in Year 1 [%]: ' + get('capacity_factor'));
outln('Energy yield in Year 1 [kWh/kW]: ' + get('kwh_per_kw'));
outln('Performance ratio in Year 1 [-]: ' + get('performance_ratio') + '\n');
outln('
Clipping
\n');
outln('Total Clipping energy [kW]: ' + get('annual_inv_cliploss'));
outln('Total DC input power [kW]: ' + sum_dcinput);
outln('Total Clipping loss [%]: ' + clippingloss + '\n');
//
//Gerando .txt de sa_da
if (idx == 0){
data = "";
}
data = data + '--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--.--\n';
data = data + 'Simulacao realizada com o RMY: ' + files[idx] + '\n';
data = data + '\n';
data = data + '
Summary
\n';
data = data + 'Annual AC energy in Year 1 [kWh]: ' + get('annual_energy') + '\n';
data = data + 'DC capacity factor in Year 1 [%]: ' + get('capacity_factor') + '\n';
data = data + 'Energy yield in Year 1 [kWh/kW]: ' + get('kwh_per_kw') + '\n';
data = data + 'Performance ratio in Year 1 [-]: ' + get('performance_ratio') + '\n';
data = data + '\n';
data = data + '
Clipping
\n';
data = data + 'Total Clipping energy [kW]: ' + get('annual_inv_cliploss') + '\n';
data = data + 'Total DC input power [kW]: ' + sum_dcinput + '\n';
data = data + 'Total Clipping loss [%]: ' + clippingloss + '\n';
data = data + '\n';
data = data + '\n';
data = data + '\n';
}
ok = write_text_file( "txt file path", data ); //path to create a txt file with the results of 28 simulations
if (!ok)
outln("Error writing text file.");