Trimix Filling Station
Trimix is breathing gas for diving, which is a mixture of Helium, Oxygen and air.
This is an example how you could use Tackler for Trimix Filling station accounting purposes. This example is also part of Tackler’s test setup and it is run with test target.
Trimix is made out of mix of Helium and Nitrox, or mix of Helium, Oxygen and compressed air. Helium is expensive and Oxygen substantially cheaper (depending where do you live and how Oxygen is available in your region).
At filling station you have to track
-
Individual users (how much and which gas they have used)
-
How much do you have gas in your Helium and Oxygen tanks.
Also you have to generate bills to users and reset Helium and Oxygen usage for each billing period.
Below are accounting transactions for filling station, and an examples what kind of transactions are recorded of one mixing of 18/45 (O2/He) trimix gas.
There are also examples how you could record the used gas and generate bills for users.
Gas usage
Initial gas delivery
Woikoski is gas supply company, and their bill of lading number is used as tracking code for transactions.
Nominal pressure of storage tanks are 298 bars for Helium and 198 bars for Oxygen.
2017-01-01 (#123456789) 'Helium delivery (three tanks) Gas:He:Tank·102 298 bar·He Gas:He:Tank·103 298 bar·He Gas:He:Tank·104 298 bar·He Woikoski:He 2017-01-01 (#123456789) 'Oxygen delivery (one tank) Gas:O2:Tank·208 198 bar·O2 Woikoski:O2
One 18/45 trimix blend with Helium (He) and Oxygen (O2)
Here we have one mix of trimix, which uses Helium and Oxygen. The mix is #1234 in station’s logbook, and that number is recorded to transactions. Below is explanation why this is using negative pressure delta.
2017-05-01 (mix-1234) 'tmx 18/45 D12L ; This mix used 26 bar of Helium from 50L tank Gas:He:Tank·102 247 bar·He ; End pressure Gas:He:Tank·102 -273 bar·He ; Start pressure, negative pressure delta Mixer:diverX:He 2017-05-01 (mix-1234) 'tmx 18/45 D12L ; This mix used 5 bar of Oxygen from 50L tank Gas:O2:Tank·208 145 bar·O2 ; End pressure Gas:O2:Tank·208 -150 bar·O2 ; Start pressure, negative pressure delta Mixer:diverX:O2
Why is this using negative pressure deltas?
When negative pressure delta is used, then the whole account flow makes more sense and there are 1:1 real world check points with the accounting data.
When system uses negative pressure deltas, then tank pressure decreases as gas is used, and remaining pressure in storage tank (reported by gauge) matches pressure reported by accounting system (Reported by Balance report for the tank).
Also with negative deltas, gas which accumulates for user (e.g. is used by user) has positive sign, which correlates nicely natural language "I have used 26bars of Helium"
This accumulated saldo is then in turn zeroed with negative pressures and positive monetary values within payment transactions.
So in overall, whole transaction flow makes more sense with real starting pressure and negative pressure deltas when mixing gas. Examples below should clarify this.
Accounting
Here is a balance report by gas type and by tank (e.g. "how much there is gas left"). Full tanks were 298 bars (He) and 198 bars (O2).
tackler --config ../tests/commodity/gb.toml --accounts ^Gas:.*:Tank.* Tank pressures -------------- 272.00 272.00 bar·He Gas:He:Tank·102 298.00 298.00 bar·He Gas:He:Tank·103 298.00 298.00 bar·He Gas:He:Tank·104 193.00 193.00 bar·O2 Gas:O2:Tank·208 ============================ 868.00 bar·He 193.00 bar·O2
Gas Balance per users.
How much users have used gas? This is also outstanding amount of goods to be billed.
tackler --config ../tests/commodity/gb.toml --accounts ^User:.*:.* Users Gas Balance ----------------- 26.00 26.00 bar·He User:diverX:He 5.00 5.00 bar·O2 User:diverX:O2 ============================ 26.00 bar·He 5.00 bar·O2
Generate billing transactions
This is an example of transaction which converts used gases to euros and moves the value to Billing account. At the same time gas balance is zeroed.
2017-05-02 'diverX outstanding payments ; Convert used gas (bars) to EUR User:diverX:He -26 bar·He @ 1.25 EUR ; -32.50 EUR User:diverX:O2 -5 bar·O2 @ 0.25 EUR ; -1.25 EUR Billing:diverX:Receivable 33.75 EUR
Generate billing reports
Here we can see what are the outstanding bills for each user.
tackler --config ../tests/commodity/gb-billing.toml Outstanding payments -------------------- 33.75 33.75 EUR Billing:diverX:Receivable 0.00 0.00 bar·He User:diverX:He 0.00 0.00 bar·O2 User:diverX:O2 ============================ 33.75 EUR 0.00 bar·He 0.00 bar·O2
Trimix accounting and Tackler test setup
This example is also part of Tackler’s test set, and it is run evertytime with test target. Test data and setup is described below.
Test data
Configuration
Reports
Example reports