-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8a2278
commit 73d9ad2
Showing
5 changed files
with
49 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,73 @@ | ||
For greater expressivity we use the following shorthands | ||
\[ | ||
\left\{ \begin{array}{lrl} | ||
\locTransfersValue & \define & | ||
\locTransfersValue & \define & | ||
\begin{cases} | ||
\If \locCctv = 0: & 0 \\ | ||
\If \locCctv = 1: & 1 - \resLo_{i + 1} \\ | ||
\end{cases} \\ | ||
& \equiv & \locCctv \cdot (1 - \resLo_{i + 1}) \vspace{2mm} \\ | ||
\locZeroValue & \define & | ||
& \define & | ||
\locCctv \cdot (1 - \resLo_{i + 1}) | ||
\vspace{2mm} \\ | ||
%%%%%%%%%% | ||
\locZeroValue & \define & | ||
\begin{cases} | ||
\If \locCctv = 0: & 0 \\ | ||
\If \locCctv = 1: & \resLo_{i + 1} \\ | ||
\end{cases} \\ | ||
& \equiv & \locCctv \cdot \resLo_{i + 1} \vspace{2mm} \\ | ||
\locGasAccess & \define & | ||
& \define & \locCctv \cdot \resLo_{i + 1} | ||
\vspace{2mm} \\ | ||
%%%%%%%%%% | ||
\locGasAccess & \define & | ||
\begin{cases} | ||
\If \locWarm = 1: & G_\text{warmaccess} \\ | ||
\If \locWarm = 1: & G_\text{warmaccess} \\ | ||
\If \locWarm = 0: & G_\text{coldaccountaccess} \\ | ||
\end{cases} \\ | ||
\locGasTransfer & \define & | ||
\end{cases} | ||
\vspace{2mm} \\ | ||
%%%%%%%%%% | ||
\locValueTransferGasCost & \define & | ||
\begin{cases} | ||
\If \locTransfersValue = 1: & G_\text{callvalue} \\ | ||
\If \locTransfersValue = 0: & 0 \\ | ||
\If \locTransfersValue = 0: & 0 \\ | ||
\end{cases} \\ | ||
& \equiv & \locTransfersValue \cdot G_\text{callvalue} \vspace{2mm} \\ | ||
\locGasNewAcc & \define & | ||
& \define & \locTransfersValue \cdot G_\text{callvalue} | ||
\vspace{2mm} \\ | ||
%%%%%%%%%% | ||
\locGasNewAcc & \define & | ||
\begin{cases} | ||
\If \locExists = 1 \vee \locTransfersValue = 0: & 0 \\ | ||
\If \locExists = 0 \wedge \locTransfersValue = 1: & G_\text{newaccount} \\ | ||
\If \stpCall_{i} = 0 ~ \Then & 0 \\ | ||
\If \stpCall_{i} = 1 ~ \Then & | ||
\begin{cases} | ||
\If \locExists = 1 \vee \locTransfersValue = 0 : & 0 \\ | ||
\If \locExists = 0 \wedge \locTransfersValue = 1 : & G_\text{newaccount} \\ | ||
\end{cases} | ||
\end{cases} \\ | ||
& \equiv & (1 - \locExists) \cdot \locTransfersValue \cdot G_\text{newaccount} \vspace{2mm} \\ | ||
\locGasXtra & \define & \locGasAccess + \locGasTransfer + \locGasNewAcc \\ | ||
\locGasUpfrontCall & \define & \locGasMxp + \locGasXtra \vspace{2mm} \\ | ||
\locOneSixtyFourth & \define & \resLo_{i + 3} \\ | ||
\locGasCompBit & \define & \resLo_{i + 4} \\ | ||
\locDiff & \define & \locGasActl ~ - ~ \locGasUpfrontCall \\ | ||
\locLOfGasDiff & \define & \locGasDiff ~ - ~ \locOneSixtyFourth \\ | ||
\locMin & \define & | ||
& \define & | ||
G_\text{newaccount} \cdot | ||
\left[ \begin{array}{cr} | ||
\cdot & \stpCall_{i} \\ | ||
\cdot & (1 - \locExists) \\ | ||
\cdot & \locTransfersValue \\ | ||
\end{array} \right] | ||
\vspace{2mm} \\ | ||
%%%%%%%%%% | ||
\locGasXtra & \define & \locGasAccess + \locValueTransferGasCost + \locGasNewAcc \\ | ||
\locGasUpfrontCall & \define & \locGasMxp + \locGasXtra \vspace{2mm} \\ | ||
\locOneSixtyFourth & \define & \resLo_{i + 3} \\ | ||
\locGasCompBit & \define & \resLo_{i + 4} \\ | ||
\locDiff & \define & \locGasActl ~ - ~ \locGasUpfrontCall \\ | ||
\locLOfGasDiff & \define & \locGasDiff ~ - ~ \locOneSixtyFourth \\ | ||
\locMin & \define & | ||
\begin{cases} | ||
\If \locGasCompBit = 0 : & \locLOfGasDiff \\ | ||
\If \locGasCompBit = 1 : & \gasLo_{i} \\ | ||
\If \locGasCompBit = 1 : & \gasLo_{i} \\ | ||
\end{cases} \\ | ||
\end{array} \right. | ||
\] | ||
These are only to be used if the row index $i$ is such that | ||
\[ | ||
\begin{cases} | ||
\stpStamp_{i} \neq \stpStamp_{i - 1} \\ | ||
\isCall _{i} = 1 \\ | ||
\stpStamp _{i} \neq \stpStamp_{i - 1} \\ | ||
\isCall _{i} = 1 \\ | ||
\end{cases} | ||
\] |