I'd like to use a player in the following way, similar to the example in the wiki. (except that I define 'value' as complex , not as double)
http://sourceforge.net/apps/mediawiki/gridlab-d/index.php?title=Player
module tape; module powerflow; clock { timezone GMT0+1; starttime '2012-12-19 11:00:00'; stoptime '2012-12-19 11:59:59'; } class player { complex value; // define variable } ... object load { name load1; parent meter1; phases "ABCN"; constant_power_A s1H.value*1.0133; constant_power_B s2H.value*1.0064; constant_power_C s3H.value*1.0095; nominal_voltage 230V; } ... object player { name s1H; file Haus_s1_H1_2012121911.csv; }; object player { name s2H; file Haus_s2_H1_2012121911.csv; }; object player { name s3H; file Haus_s3_H1_2012121911.csv; };
In the csv files all values are complex, but the player only uses the real part. This can be observed by a recorder on meter1:measured_power_A
I consider this a bug.
This however works like it should:
But this way I can't do gain correction.
Brenzikofer,
Recommend posting this to the forums. This was discussed somewhat at:
http://sourceforge.net/p/gridlab-d/discussion/842561/thread/f51cb19e/?limit=25#75b3
among other forum posts. The player transform only supports the manipulation of double values (as they are inherent to C++), but there are ways to achieve what you are looking for - varying from accessing the real and imaginary portions individually to runtime code.
Diff: