MCPcopy Create free account
hub / github.com/dimvasdim/Thesis / gain

Function gain

pso.py:88–94  ·  view source on GitHub ↗
(price, steady, cost, model)

Source from the content-addressed store, hash-verified

86
87
88def gain(price, steady, cost, model):
89 temp = np.array(steady)
90 temp = np.append(temp, price)
91 temp = np.reshape(temp, (1, len(temp)))
92 quantity = np.round_(model.predict(temp))
93 result = (price - cost) * quantity
94 return float(np.round_(result, 2))
95
96
97def optimize_prices():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected