fixed bug that caused the price of gflop to actually be the price of flop
This commit is contained in:
parent
bc29b1186e
commit
6e35053852
|
@ -83,6 +83,7 @@ def get_computer_value_over_time(inventory, computer_id, time_value, flops_price
|
|||
computer_flops = inventory.get_computer_dflops(computer_id)
|
||||
computer_flops_over_time = np.where(time_value < purchase_time, 0.0, computer_flops)
|
||||
computer_value_over_time = computer_flops_over_time * flops_price_over_time
|
||||
|
||||
return computer_value_over_time
|
||||
|
||||
# def stackplot(ax, x_signal, y_signals):
|
||||
|
@ -215,10 +216,10 @@ def draw_dp_gflops_price_over_time_over_time_graph(inventory, from_date, to_date
|
|||
"""
|
||||
|
||||
time_value = matplotlib.dates.drange(dstart=from_date, dend=to_date, delta=datetime.timedelta(days=1))
|
||||
flops_price_over_time = get_flops_price_over_time(inventory, time_value)
|
||||
gflops_price_over_time = get_flops_price_over_time(inventory, time_value) * 1.0e9
|
||||
fig, ax = plt.subplots()
|
||||
ax.set_yscale('log')
|
||||
ax.plot(time_value, flops_price_over_time)
|
||||
ax.plot(time_value, gflops_price_over_time)
|
||||
ax.set_xlabel('time')
|
||||
ax.set_ylabel(u'double precision flops price (€/gflops)')
|
||||
ax.set_title('gflops_price_over_time')
|
||||
|
|
Loading…
Reference in New Issue