| Algorithm 2: Pricing video transaction algorithm |
|
Input:
|
|
Output: The income of the seller producer is profitproducer, and the amount paid by the buyer is payconsumer. |
|
initialization:videoinput = 0, videooutput
|
|
|
|
ifvideooutput ≥ videoinput
|
|
According to Formula(24)and Formula(25), the purchase pricepriinand the sale priceprioutare calculated
|
|
else
|
|
According to Formula(27)and Formula(28), the purchase pricepriinand the sale priceprioutare calculated
|
|
end if
|
|
fori = 0;i<=m;i++ do
|
|
|
end for
|
|
forj = 0;j<=m+n;j++ do
|
|
| end for |
|