Dear Mr. Gilman,
Thanks a lot for your reply, I really appreciate it.
Since your reply, I have been trying to do what you told me to, however it goes wrong while indexing the total_output and I
don't understand why exactly..
In your last reply, when you mentioned that I have to set each individual case inputs, did you mean all the inputs (from the LK
for SDK) ? or just the for loop with the variables of interest ?
Please kindly have a look on the code I wrote:
a = csvread('C:/Users/Mohammed/Desktop/SAM trials/SPT + WT/Design TES range.csv',{'skip'=1, 'numeric'=true});
b = csvread('C:/Users/Mohammed/Desktop/SAMtrials/SPT + WT/Design SM range.csv', {'skip'=1, 'numeric'=true});
c = csvread('C:/Users/Mohammed/Desktop/SAMtrials/SPT + WT/cut in speed.csv', {'skip'=1, 'numeric'=true});
d = csvread('C:/Users/Mohammed/Desktop/SAMtrials/SPT + WT/cut out speed.csv', {'skip'=1, 'numeric'=true});
active_case = ('SPT');
for (w=0; w<2; w++)
{ for (x=0;x<2; x++)
{ R = a[w][0];
set ('tshours', R);
S = b[x][0];
set ('solarm', S);
simulate ();
SPT_output_array = get('system_pre_curtailment_kwac');
outln (SPT_output_array);
}
}
active_case = ('WT');
for (y=0; y<2; y++)
{ for (z=0;z<2; z++)
{ T = c[y][0];
set ('wind_turbine_cutin', T);
U = d[z][0];
set ('wind_turbine_cutout', U);
simulate ();
WT_output_array = get ('system_pre_curtailment_kwac');
outln (WT_output_array);
}
}
for ( i=0; i<8; i++ )
{
{total_output = SPT_output_array + WT_output_array; }
active_case('WT + SPT');
set( 'spec_mode', 1 ); // sets mode to import hourly or subhourly profile from file
set('energy_output_array', total_output);
simulate();
energy_output_array = get ('total_output');
outln (energy_output_array);
}
If I am at the combined case page (WT + SPT), it gives some results for the WT case and other results for the SPT case and 'null' for the combined case.
Same happens when I am placed in the WT or the SPT pages, however always with different results for the individual WT, SPT cases and null for the combined..
Thanks a lot in advance, I really appreciate your time and effort.
Regards,
Mohammed