Commit 9fe3924f authored by acs-ede's avatar acs-ede

code working with multiple units

parent 48e1b8ea
No preview for this file type
......@@ -156,7 +156,7 @@ class PV_generator:
self.number_units = np.around(self.number_units)
self.len_pv = np.shape(np.matrix(self.pvdata))[0]
if self.number_units>self.len_pv:
self.pvdata = np.matrix([self.pvdata,
self.pvdata = np.matrix([np.array(self.pvdata).flatten(),
np.array([np.ones(self.number_units-self.len_pv), 30*np.ones(self.number_units-self.len_pv),180*np.ones(self.number_units-self.len_pv),0.2*np.ones(self.number_units-self.len_pv)]).flatten()])
self.pv_profiles = np.concatenate((self.pv_profiles,np.zeros((self.number_units-self.len_pv,86400)) ), axis=0)
elif self.number_units<self.len_pv:
......@@ -234,10 +234,12 @@ if __name__ == "__main__":
PVgen = PV_generator(cloudiness_level=2)
PVgen.get_Data_1(latitude=50.77, longitude=6.09, gmt_diff= 1, day =1, month=6)
PVgen.get_Data_2(number_units=1, pv_power=[1],tilt_angle=[30], azimuth_angle=[180], albedo=[0.2])
PVgen.get_Data_2(number_units=2, pv_power=[1,1],tilt_angle=[30,20], azimuth_angle=[180,150], albedo=[0.2]*2)
PVgen.generate_profiles()
PVprofiles = PVgen.pv_profiles
plt.figure(1)
plt.plot(np.array(PVprofiles)[0])
plt.plot(np.array(PVprofiles)[0],'red')
plt.plot(np.array(PVprofiles)[1],'blue')
plt.show()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment