valueflows

valueflows docs
git clone https://s.sonu.ch/~srfsh/valueflows.git
Log | Files | Refs | README

order-fulfillment.md (13934B)


      1 ## Snippet to study fulfillment of process and exchange related commitments
      2 
      3 This initial version of the picture does not have any of the proposed differentiation between process-related and exchange-related commitments.  The yaml has some of that.  It is all here to facilitate discussion on the issue, see what it actually might look like.
      4 
      5 Use case:
      6 * The bakery orders 2 bushels of apples from the fruit farm in exchange for 1000 Faircoin.
      7 * The fruit farm delivers 1.5 bushels of apples (all they had left) to the bakery.
      8 * The fruit farm does a day of harvesting apples.
      9 * The bakery order another .5 bushel of apples, since they have a delivery coming anyhow.
     10 * The fruit farm delivers 1 bushel of apples, so that all orders are fulfilled.
     11 * The bakery pays for all the apples at once, with 1250 Faircoin.
     12 
     13 ![pic](https://github.com/valueflows/valueflows/blob/master/snippets/order-fulfillment.png)
     14 
     15 #### Resources before
     16 ``` yaml
     17 '@context': https://w3id.org/valueflows/v1
     18 '@id': https://fruitfarm.example/apples
     19 '@type': vf:EconomicResource
     20 'vf:resourceCategory': https://www.wikidata.org/wiki/Q89#apple-category
     21 'skos:note': This only has a resource category, the fruitfarm does not keep inventory records on its apples.
     22 ```
     23 ``` yaml
     24 '@context': https://w3id.org/valueflows/v1
     25 '@id': https://bakery.example/apples
     26 '@type': vf:EconomicResource
     27 'vf:resourceCategory': https://www.wikidata.org/wiki/Q89#apple-category
     28 'vf:quantity':
     29   '@type': qudt:QuantityValue
     30   'qudt:unit': unit:Bushel
     31   'qudt:numericValue': .5
     32 ```
     33 ``` yaml
     34 '@context': https://w3id.org/valueflows/v1
     35 '@id': https://chain.fair-coin.org/address/fVRdLE87ywagHTLkWf7B4y2f3DU1K59nFE/#
     36 '@type': vf:EconomicResource
     37 'vf:resourceCategory': https://www.wikidata.org/wiki/Q8142#currency
     38 'vf:resourceModel': https://ocp.freedomcoop.eu/accounting/resource-type/26/#Faircoin-address #best way to do currency?
     39 'vf:quantity':
     40   '@type': qudt:QuantityValue
     41   'qudt:unit': unit:Faircoin
     42   'qudt:numericValue': 20433
     43 'skos:note': the bakery faircoin address (account)
     44 ```
     45 ``` yaml
     46 '@context': https://w3id.org/valueflows/v1
     47 '@id': https://chain.fair-coin.org/address/fFdw8QyWwJjHVPnjkWkYAYbQ1GxmT5JA7w/#
     48 '@type': vf:EconomicResource
     49 'vf:resourceCategory': https://www.wikidata.org/wiki/Q8142#currency
     50 'vf:resourceModel': https://ocp.freedomcoop.eu/accounting/resource-type/26/#Faircoin-address #best way to do currency?
     51 'vf:quantity':
     52   '@type': qudt:QuantityValue
     53   'qudt:unit': unit:Faircoin
     54   'qudt:numericValue': 5400
     55 'skos:note': the fruit farm faircoin address (account)
     56 ```
     57 #### The bakery orders apples from the fruit farm
     58 ``` yaml
     59 '@context': https://w3id.org/valueflows/v1
     60 '@id': https://fruitfarm.example/rf789f7f#exchange
     61 '@type': vf:ExchangeAgreement
     62 'skos:note': bakery orders apples in exchange for Faircoin
     63 'vf:commitments':
     64   - '@id': '#unload-1'
     65     '@type': vf:Commitment
     66     'vf:committedAction': vf:unload
     67     'vf:involves': https://fruitfarm.example/apples
     68     'vf:committedQuantity':
     69       '@type': qudt:QuantityValue
     70       'qudt:unit': unit:Bushel
     71       'qudt:numericValue': 2
     72     'vf:provider': https://fruitfarm.example/#agent
     73     'vf:receiver': https://customer.example/#agent
     74   - '@id': '#receive-3'
     75     '@type': vf:Commitment
     76     'vf:committedAction': vf:transfer #just trying this out; could also be vf:receive
     77     'vf:resourceCategory': https://www.wikidata.org/wiki/Q8142#currency #don't even really need this
     78     'vf:committedQuantity':
     79       '@type': qudt:QuantityValue
     80       'qudt:unit': unit:Faircoin
     81       'qudt:numericValue': 1000
     82     'vf:provider: https://bakery.example/#agent
     83     'vf:receiver': https://fruitfarm.example/#agent    
     84 ```
     85 #### Fruit Farm delivers some of the apples
     86 ``` yaml
     87 '@context': https://w3id.org/valueflows/v1
     88 '@id': https://fruitfarm.example/rf782334df#process
     89 '@type': vf:Transportation
     90 'vf:input':
     91   - '@id': '#work-1'
     92     '@type': vf:EconomicEvent
     93     'vf:action': vf:work
     94     'vf:affectedQuantity':
     95       '@type': qudt:QuantityValue
     96       'qudt:unit': unit:Hour
     97       'qudt:numericValue': .5  
     98     'vf:provider': https://bob.example/#agent
     99     'vf:receiver': https://fruitfarm.example/#agent
    100   - '@id': '#load-1'
    101     '@type': vf:EconomicEvent
    102     'vf:action': vf:load
    103     'vf:affectedQuantity':
    104       '@type': qudt:QuantityValue
    105       'qudt:unit': unit:Bushel
    106       'qudt:numericValue': 1.5
    107     'vf:provider': https://fruitfarm.example/#agent
    108     'vf:receiver': https://fruitfarm.example/#agent
    109 'vf:output':
    110   - '@id': '#unload-1'
    111     '@type': vf:EconomicEvent
    112     'vf:action': vf:unload # deliver sounds better in this use case
    113     'vf:affects': https://bakery.example/apples
    114     'vf:action': vf:unload
    115     'vf:affectedQuantity':
    116       '@type': qudt:QuantityValue
    117       'qudt:unit': unit:Bushel
    118       'qudt:numericValue': 1.5
    119     'vf:provider: https://fruitfarm.example/#agent
    120     'vf:receiver': https://bakery.example/#agent
    121 ```
    122 ``` yaml
    123 '@context': https://w3id.org/valueflows/v1
    124 '@id': https://fruitfarm.example/rf78233ccc#fulfillment
    125 '@type': vf:TransferFulfillment
    126 'vf:fulfillsTransfer': https://fruitfarm.example/rf789f7f#unload-1   #commitment
    127 'vf:fulfilledBy': https://fruitfarm.example/rf782334df#unload-1    #event
    128 'vf:fulfilledQuantity':
    129   '@type': qudt:QuantityValue
    130   'qudt:unit': unit:Bushel
    131   'qudt:numericValue': 1.5
    132 ```
    133 
    134 #### Fruit Farm plans and harvests more apples
    135 ``` yaml
    136 '@context': https://w3id.org/valueflows/v1
    137 '@id': https://fruitfarm.example/rf78234uj8#process
    138 '@type': vf:Transformation
    139 'skos:note': harvest apples
    140 'vf:input':
    141   - '@id': '#commitment-1'
    142     '@type': vf:Commitment
    143     'vf:action': vf:work
    144     'vf:affectedQuantity':
    145       '@type': qudt:QuantityValue
    146       'qudt:unit': unit:Hour
    147       'qudt:numericValue': 8  
    148     'vf:provider': https://alice.example/#agent
    149     'vf:receiver': https://fruitfarm.example/#agent
    150   - '@id': '#work-1'
    151     '@type': vf:EconomicEvent
    152     'vf:action': vf:work
    153     'vf:affectedQuantity':
    154       '@type': qudt:QuantityValue
    155       'qudt:unit': unit:Hour
    156       'qudt:numericValue': 8  
    157     'vf:provider': https://alice.example/#agent
    158     'vf:receiver': https://fruitfarm.example/#agent
    159     'vf:fulfills': https://fruitfarm.example/rf78234uj8#commitment-1
    160 'vf:output':
    161   - '@id': '#commitment-2'
    162     '@type': vf:EconomicEvent
    163     'vf:action': vf:produce
    164     'vf:affects': https://fruitfarm.example/apples 
    165     'vf:affectedQuantity':
    166       '@type': qudt:QuantityValue
    167       'qudt:unit': unit:Bushel
    168       'qudt:numericValue': 12
    169     'vf:provider: https://fruitfarm.example/#agent
    170     'vf:receiver': https://fruitfarm.example/#agent
    171   - '@id': '#produce-1'
    172     '@type': vf:EconomicEvent
    173     'vf:action': vf:produce
    174     'vf:affects': https://fruitfarm.example/apples 
    175     'vf:affectedQuantity':
    176       '@type': qudt:QuantityValue
    177       'qudt:unit': unit:Bushel
    178       'qudt:numericValue': 15
    179     'vf:provider: https://fruitfarm.example/#agent
    180     'vf:receiver': https://fruitfarm.example/#agent
    181     'vf:fulfills': https://fruitfarm.example/rf78234uj8#commitment-2
    182 ```
    183 #### The bakery decides to order some more apples as long as they are still due a delivery
    184 ``` yaml
    185 '@context': https://w3id.org/valueflows/v1
    186 '@id': https://fruitfarm.example/rf78as88#exchange
    187 '@type': vf:ExchangeAgreement
    188 'skos:note': bakery ordersapples in exchange for Faircoin
    189 'vf:commitments':
    190   - '@id': '#unload-1'
    191     '@type': vf:Commitment
    192     'vf:committedAction': vf:unload
    193     'vf:involves': https://fruitfarm.example/apples
    194     'vf:committedQuantity':
    195       '@type': qudt:QuantityValue
    196       'qudt:unit': unit:Bushel
    197       'qudt:numericValue': .5
    198     'vf:provider: https://fruitfarm.example/#agent
    199     'vf:receiver': https://customer.example/#agent
    200   - '@id': '#receive-3'
    201     '@type': vf:Commitment
    202     'vf:committedAction': vf:transfer #just trying this out; could also be vf:receive
    203     'vf:resourceCategory': https://www.wikidata.org/wiki/Q8142#currency #don't even really need this
    204     'vf:committedQuantity':
    205       '@type': qudt:QuantityValue
    206       'qudt:unit': unit:Faircoin
    207       'qudt:numericValue': 250
    208     'vf:provider: https://bakery.example/#agent
    209     'vf:receiver': https://fruitfarm.example/#agent    
    210 ```
    211 
    212 #### Fruit farm plans and delivers the rest of the apples 
    213 ``` yaml
    214 '@context': https://w3id.org/valueflows/v1
    215 '@id': https://fruitfarm.example/rf782334df#process
    216 '@type': vf:Transportation
    217 'vf:input':
    218   - '@id': '#commitment-1'
    219     '@type': vf:Commitment
    220     'vf:action': vf:load
    221     'vf:affectedQuantity':
    222       '@type': qudt:QuantityValue
    223       'qudt:unit': unit:Bushel
    224       'qudt:numericValue': 1
    225     'vf:provider': https://fruitfarm.example/#agent
    226     'vf:receiver': https://fruitfarm.example/#agent
    227   - '@id': '#load-1'
    228     '@type': vf:EconomicEvent
    229     'vf:action': vf:load
    230     'vf:affectedQuantity':
    231       '@type': qudt:QuantityValue
    232       'qudt:unit': unit:Bushel
    233       'qudt:numericValue': 1
    234     'vf:provider': https://fruitfarm.example/#agent
    235     'vf:receiver': https://fruitfarm.example/#agent
    236     'vf:fulfills': https://fruitfarm.example/rf782334df#commitment-1
    237 'vf:output':
    238   - '@id': '#commitment-2'
    239     '@type': vf:Commitment
    240     'vf:action': vf:unload # deliver sounds better in this use case
    241     'vf:affects': https://bakery.example/apples
    242     'vf:action': vf:unload
    243     'vf:affectedQuantity':
    244       '@type': qudt:QuantityValue
    245       'qudt:unit': unit:Bushel
    246       'qudt:numericValue': 1
    247     'vf:provider: https://fruitfarm.example/#agent
    248     'vf:receiver': https://bakery.example/#agent
    249   - '@id': '#unload-1'
    250     '@type': vf:EconomicEvent
    251     'vf:action': vf:unload # deliver sounds better in this use case
    252     'vf:affects': https://bakery.example/apples
    253     'vf:action': vf:unload
    254     'vf:affectedQuantity':
    255       '@type': qudt:QuantityValue
    256       'qudt:unit': unit:Bushel
    257       'qudt:numericValue': 1
    258     'vf:provider: https://fruitfarm.example/#agent
    259     'vf:receiver': https://bakery.example/#agent
    260     'vf:fulfills': https://fruitfarm.example/rf782334df#commitment-2
    261 ```
    262 ``` yaml
    263 '@context': https://w3id.org/valueflows/v1
    264 '@id': https://fruitfarm.example/rfdfs7789d#fulfillment
    265 '@type': vf:TransferFulfillment
    266 'vf:fulfillsTransfer': https://fruitfarm.example/rf789f7f#unload-1   #commitment
    267 'vf:fulfilledBy': https://fruitfarm.example/rf782334df#unload-1    #event
    268 'vf:fulfilledQuantity':
    269   '@type': qudt:QuantityValue
    270   'qudt:unit': unit:Bushel
    271   'qudt:numericValue': .5
    272 ```
    273 ``` yaml
    274 '@context': https://w3id.org/valueflows/v1
    275 '@id': https://fruitfarm.example/rfdfs778ww#fulfillment
    276 '@type': vf:TransferFulfillment
    277 'vf:fulfillsTransfer': https://fruitfarm.example/rf78as88#unload-1   #commitment
    278 'vf:fulfilledBy': https://fruitfarm.example/rf782334df#unload-1    #event
    279 'vf:fulfilledQuantity':
    280   '@type': qudt:QuantityValue
    281   'qudt:unit': unit:Bushel
    282   'qudt:numericValue': .5
    283 ```
    284 #### The bakery pays for all the apples
    285 ``` yaml
    286 '@context': https://w3id.org/valueflows/v1
    287 '@id': https://bakery.example/erw890e8r#transfer
    288 '@type': vf:Transfer #???? one event? two events? do like issue/receive?
    289 'vf:affectedQuantity':
    290   '@type': qudt:QuantityValue
    291   'qudt:unit': unit:Faircoin
    292   'qudt:numericValue': 1250
    293 'vf:provider': https://bakery.example/#agent
    294 'vf:receiver': https://fruitfarm.example/#agent
    295 'vf:give':
    296   - '@id': '#give-1'
    297     '@type': vf:EconomicEvent
    298     'vf:action': vf:give
    299     'vf:affects': '@id': https://chain.fair-coin.org/address/fVRdLE87ywagHTLkWf7B4y2f3DU1K59nFE/#
    300 'vf:take':
    301   - '@id': '#take-1'
    302     '@type': vf:EconomicEvent
    303     'vf:action': vf:take
    304     'vf:affects': '@id': https://chain.fair-coin.org/address/fFdw8QyWwJjHVPnjkWkYAYbQ1GxmT5JA7w/#
    305 ```
    306 ``` yaml
    307 '@context': https://w3id.org/valueflows/v1
    308 '@id': https://fruitfarm.example/rfdfwerw3#fulfillment
    309 '@type': vf:TransferFulfillment
    310 'vf:fulfillsTransfer': https://fruitfarm.example/rf789f7f#receive-3   #commitment
    311 'vf:fulfilledBy': https://bakery.example/erw890e8r#take-1    #event
    312 'vf:fulfilledQuantity':
    313   '@type': qudt:QuantityValue
    314   'qudt:unit': unit:Faircoin
    315   'qudt:numericValue': 1000
    316 ```
    317 ``` yaml
    318 '@context': https://w3id.org/valueflows/v1
    319 '@id': https://fruitfarm.example/rfdfwerw4#fulfillment
    320 '@type': vf:TransferFulfillment
    321 'vf:fulfillsTransfer': https://fruitfarm.example/rf78as88#receive-3   #commitment
    322 'vf:fulfilledBy': https://bakery.example/erw890e8r#take-1    #event
    323 'vf:fulfilledQuantity':
    324   '@type': qudt:QuantityValue
    325   'qudt:unit': unit:Faircoin
    326   'qudt:numericValue': 250
    327 ```  
    328 
    329 #### Resources after
    330 ``` yaml
    331 '@context': https://w3id.org/valueflows/v1
    332 '@id': https://fruitfarm.example/apples
    333 '@type': vf:EconomicResource
    334 'vf:resourceCategory': https://www.wikidata.org/wiki/Q89#apple-category
    335 'skos:note': This only has a resource category, the fruitfarm does not keep inventory records on its apples.
    336 ```
    337 ``` yaml
    338 '@context': https://w3id.org/valueflows/v1
    339 '@id': https://bakery.example/apples
    340 '@type': vf:EconomicResource
    341 'vf:resourceCategory': https://www.wikidata.org/wiki/Q89#apple-category
    342 'vf:quantity':
    343   '@type': qudt:QuantityValue
    344   'qudt:unit': unit:Bushel
    345   'qudt:numericValue': 3
    346 ```
    347 ``` yaml
    348 '@context': https://w3id.org/valueflows/v1
    349 '@id': https://chain.fair-coin.org/address/fVRdLE87ywagHTLkWf7B4y2f3DU1K59nFE/#
    350 '@type': vf:EconomicResource
    351 'vf:resourceCategory': https://www.wikidata.org/wiki/Q8142#currency
    352 'vf:resourceModel': https://ocp.freedomcoop.eu/accounting/resource-type/26/#Faircoin-address #best way to do currency?
    353 'vf:quantity':
    354   '@type': qudt:QuantityValue
    355   'qudt:unit': unit:Faircoin
    356   'qudt:numericValue': 19183
    357 'skos:note': the bakery faircoin address (account)
    358 ``` yaml
    359 '@context': https://w3id.org/valueflows/v1
    360 '@id': https://chain.fair-coin.org/address/fFdw8QyWwJjHVPnjkWkYAYbQ1GxmT5JA7w/#
    361 '@type': vf:EconomicResource
    362 'vf:resourceCategory': https://www.wikidata.org/wiki/Q8142#currency
    363 'vf:resourceModel': https://ocp.freedomcoop.eu/accounting/resource-type/26/#Faircoin-address #best way to do currency?
    364 'vf:quantity':
    365   '@type': qudt:QuantityValue
    366   'qudt:unit': unit:Faircoin
    367   'qudt:numericValue': 6650
    368 'skos:note': the fruit farm faircoin address (account)
    369 ```