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
10#ifndef TOOLS_SUITE_BAGMETHOD_H
11#define TOOLS_SUITE_BAGMETHOD_H
12
13#include <cmath>
14#include <functional>
15#include <stdexcept>
16#include <vector>
17
18class BagMethod {
19 public:
20 struct Output {
21 Output(const double flowRate, const double annualConsumption)
22 : flowRate(flowRate), annualConsumption(annualConsumption) {}
23
24 const double flowRate, annualConsumption;
25 };
26
36 BagMethod(double operatingTime, double bagFillTime, double bagVolume, int numberOfUnits)
37 : operatingTime(operatingTime), bagFillTime(bagFillTime), bagVolume(bagVolume), numberOfUnits(numberOfUnits) {}
38
45 auto const flowRate = bagVolume / (bagFillTime / 60);
46 return {flowRate, (flowRate * operatingTime * numberOfUnits * 60) / 1000};
47 }
48
49 private:
50 double operatingTime, bagFillTime, bagVolume, numberOfUnits;
51};
52
53#endif
BagMethod(double operatingTime, double bagFillTime, double bagVolume, int numberOfUnits)
Definition BagMethod.h:36
Output calculate()
Definition BagMethod.h:44