Closed da-ekchajzer closed 2 years ago
This has been implemented in https://github.com/Boavizta/boaviztapi/commit/36b7b3330ad500676e4f34bcfee7c0f8303c563a.
A route parameter makes it possible to choose between TOTAL and LINEAR allocation. TOTAL is set by default.
Problem
Usage impacts are computed for a certain period of time. The manufacture impacts are returned for all the life cycle of a device. We should provide a way to distribute manufacture impacts on a certain period of usage given by the user.
Solution
The easiest way to distribute manufacture impacts is linearly.
Different time distribution can be process :
Distribution could be a query parameter :
UpTime
:(ManufactureImpact/TotalUpTimeInHour)*HourUsageServer
Where TotalUpTimeInHour is the number of hours the server was up during its lifeLifspan
:(ManufactureImpact/LifespanInHour)*HourUsageServer
Where LifespanInHour is the lifespan of the device in hoursTotal
: All manufacture impacts is returned