File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -242,18 +242,15 @@ def ask_oracle(self, X) -> np.ndarray:
242
242
self .gotod ()
243
243
data0 = self .F_get ()
244
244
f0 = get_param (data0 , self .density_param , reactors )
245
- f0 = np .array (list (f0 .values ())).astype (float )
246
245
247
246
self .F_set (self .payload )
248
247
time .sleep (self .deltaT )
249
248
data = self .F_get ()
250
249
f = get_param (data , self .density_param , reactors )
251
- f = np .array (list (f .values ())).astype (float )
252
250
253
- #alpha = (np.log(f) - np.log(f0))/self.deltaT #Growth Rate $f=f_0 exp(alpha T)$
254
- yield_rate = (f / f0 - 1 )/ self .deltaT #Yield rate (not growth rate)
251
+ #yield_rate = np.array([(float(f[id])/float(f[id]) - 1)/self.deltaT/self.power[id] for id in reactors]).astype(float)
255
252
256
- fitness = yield_rate / self .power
253
+ fitness = np . array ([ self .power [ id ] for id in reactors ]). astype ( float )
257
254
258
255
y = np .append (y ,fitness )
259
256
return - y
You can’t perform that action at this time.
0 commit comments