MEASUR-Tools-Suite v1.0.11
The MEASUR Tools Suite is a collection of industrial efficiency calculations written in C++ and with bindings for compilation to WebAssembly.
Loading...
Searching...
No Matches
BagMethod.h
Go to the documentation of this file.
1#pragma once
2
12#include <cmath>
13#include <functional>
14#include <stdexcept>
15#include <vector>
16
17class BagMethod {
18 public:
19 struct Output {
20 Output(const double flowRate, const double annualConsumption)
21 : flowRate(flowRate), annualConsumption(annualConsumption) {}
22
23 const double flowRate, annualConsumption;
24 };
25
35 BagMethod(double operatingTime, double bagFillTime, double bagVolume, int numberOfUnits)
36 : operatingTime(operatingTime), bagFillTime(bagFillTime), bagVolume(bagVolume), numberOfUnits(numberOfUnits) {}
37
44 auto const flowRate = bagVolume / (bagFillTime / 60);
45 return {flowRate, (flowRate * operatingTime * numberOfUnits * 60) / 1000};
46 }
47
48 private:
49 double operatingTime, bagFillTime, bagVolume, numberOfUnits;
50};
51
BagMethod(double operatingTime, double bagFillTime, double bagVolume, int numberOfUnits)
Definition BagMethod.h:35
Output calculate()
Definition BagMethod.h:43