Hi,
I have a "for" loop to simulate different CAPEX for a power plant. Then, i want to assign the variable 'om_fixed' as a function of CAPEX. In this case, 0.5% of CAPEX.
I realized that the variable 'om_fixed' expects an array as input. So, first of all, I'm importing a .csv file with a repetition of 0.005 for every year of the simulation.
However, when I try to run the following script, I get the error: "access violation: expected numeric, but found array".
Could you please try to help me?
active_case('example');
function array_2d_to_1d( x )
{
for( w=0; w<#x; w++ )
{
arr[w] = x[w][0];
}
return arr;
}
oem_csv = csvread('example.csv', {'skip' = 1, 'numeric'=true, 'table'=false});
oem_annual = array_2d_to_1d(oem_csv);
set('om_fixed', oem_annual * 2); //2, is just an example of a numeric variable.
check_oem = get('om_fixed');
outln(check_oem);
Thanks,
GK