valueflows / agent

agent has moved to https://lab.allmende.io/valueflows/agent
10 stars 4 forks source link

More about agent relationships with other things #28

Closed bhaugen closed 4 years ago

bhaugen commented 8 years ago

This is a followup to #27 which is now closed. Several sub-topics about agent relationships with things other than agents emerged from the discussion of splitting off Relationship and RelationshipType into their own repo (which we decided not to do, at least for the time being).

I quote here from a couple of @elf-pavlik's comments on that issue that I wanted to discuss in more detail:

We will need to also look at various types of relationships

Agent <-> Agent Agent <-> Process Agent <-> Exchange Agent <-> Resource Process <-> Resource Exchange <-> Resource etc.

BTW I just added placeholder for https://w3id.org/role where I plan to experiment with

attendee organizer speaker host guest member chair staff Some examples in https://github.com/hackers4peace/plp-test-data/blob/master/w3c-social.jsonld

Some examples of relationships (direct/unqualified) from schema.org

http://schema.org/provider http://schema.org/seller http://schema.org/buyer http://schema.org/producer To get qualified version we could use patter I describe in https://github.com/w3c-social/social-vocab/wiki/Verbs---owl:Class-vs.-rdf:Property#qualified-relations

IMO we should also take a closer look at http://www.gs1.org/gtin-plus eg. search for 'OrganizationRole' in http://www.gs1.org/sites/default/files/docs/gtin_plus/gs1Voc_v1.ttl

bhaugen commented 8 years ago

http://schema.org/provider is interesting.

Says: Values expected to be one of these types: (@elf-pavlik - is that the Domain?) Organization [vf:Agent] Person [vf:Agent]

Used on these types: (@elf-pavlik - is that the Range?) BusTrip [probably vf:Process] CreativeWork [vf:EconomicResource] Flight [probably vf:Process] Invoice [a materialized set of vf:Claims that one or more vf:EconomicEvents have been performed and payment is due from the recipient of the events] ParcelDelivery [vf:EconomicEvent] Reservation [vf:Commitment] Service [smells like vf:EconomicResourceType] TrainTrip [probably vf:Process]

bhaugen commented 8 years ago

A gtin identifies a vf:EconomicResourceType vf:Exchanged in international commerce.

Each of that fascinating collection of OrganizationRoles is a relationship between a vf:Agent and (usually) a vf:EconomicResourceType, but there's a lot of detailed knowledge buried behind each of them.

For example: http://gs1.org/voc/OrganizationRole-BRAND_OWNER> skos:prefLabel "BRAND_OWNER" ; a http://gs1.org/voc/OrganizationRole ; rdfs:comment "The organisation that owns the specifications of the Organization regardless of where and by whom it is manufactured is normally responsible for the allocation of the Global Trade Item Number (GTIN)." ; rdfs:label "Brand Owner" .

This one is actually a relationship between a vf:Agent and an individual animal. How do we classify animals? Are they EconomicResources? That's how they would be classified in commodity exchanges. Should we rethink that? http://gs1.org/voc/OrganizationRole-BREEDER skos:prefLabel "BREEDER" ; a http://gs1.org/voc/OrganizationRole ; rdfs:comment "The organization which breeds the animal." ; rdfs:label "Breeder" .

P.S. We don't classify humans as Human Resources, either. Their work is a resource. The human is an agent that provides the work.

elf-pavlik commented 8 years ago

Values expected to be one of these types: (@elf-pavlik - is that the Domain?) Used on these types: (@elf-pavlik - is that the Range?)

Schema.org doesn't use rdfs:domain and rdfs:range (even that people who take technical leadership in schema.org - Dan Brickley & R.V. Guha) authored http://www.w3.org/TR/rdf-schema/

Schema.org uses instead a 'relaxed' version schema:domainIncludes and schema:rangeIncludes which act as a hint but don't cause any inferences if someone runs a reasoner over the dataset. See also https://github.com/schemaorg/schemaorg/issues/255

If you take a look at RDFa definition of schema:provider, you will see that Values expected to be one of these types comes from schema:rangeIncludes and Used on these types comes from schema:domainIncludes - which follows (subject = enity) and (object=value) pattern explained in http://www.w3.org/TR/rdf-schema/#ch_properties

P.S. We don't classify humans as Human Resources, either. Their work is a resource. The human is an agent that provides the work.

What about human who consumes ProductOrService?

BusTrip [probably vf:Process] Flight [probably vf:Process] TrainTrip [probably vf:Process]

All three we can consider Process but for person who consumes it as service - takes trip on a Bus/Train/Plain/... i works as ProductOrService

For something like CarpoolingTrip we can also have prosumer role if people traveling take turns in driving. People can also share responsibility for securing a fuel, but someone can also share responsibility for securing food (fuel for people who drive or just travel). I think we can work together with @dahacouk on all kind of different carpooling/ridesharing scenarios where we will don't have simple provider/consumer case...

bhaugen commented 8 years ago

What about human who consumes ProductOrService?

BusTrip [probably vf:Process] Flight [probably vf:Process] TrainTrip [probably vf:Process]

All three we can consider Process but for person who consumes it as service - takes trip on a Bus/Train/Plain/... i works as ProductOrService

Yeah, it's complicated. For the people who drive the bus or work on the flight or traintrip, it's a process, which provides a service. For the people who ride, it's a ticket to use the service. We are still dithering about that in this design discussion document about right to use underlying resource.

I was coming from http://schema.org/provider for which it would be (I think) a process.

For operational software, we think we need to distinguish the people who provide the resource, the resource itself, and the people who use the resource. I'm not sure this vocab needs all of these distinctions, but it might.

So, for a train trip, the resources that are inputs to the process might be:

and the output is the train trip. And the riders would get tickets that entitle them to use the train trip from their departure station to their destination station.

bhaugen commented 8 years ago

Oh, and @elf-pavlik thanks for the explanation and link about domain and range. If I read that correctly, I had the domain and range backwards. The range is Person and Organization, and the domains are all of those other things?

      <span>Range: <a property="http://schema.org/rangeIncludes" href="http://schema.org/Person">Person</a></span>
      <span>Range: <a property="http://schema.org/rangeIncludes" href="http://schema.org/Organization">Organization</a></span>
elf-pavlik commented 8 years ago

Yeah, it's complicated. For the people who drive the bus or work on the flight or traintrip, it's a process, which provides a service. For the people who ride, it's a ticket to use the service. We are still dithering about that in this design discussion document about right to use underlying resource.

We could also see BusTrip as a output of a gtfs:Trip and work done by person driving it as one of the inputs:

{
  "@context": [ "https://w3id.org/valueflows/", { "ex": "http://dataset.example" } ],
  "@graph": [
    { "@id": "ex:agents/elf-pavlik",
      "@type": "Person" },
    { "@id": "ex:agents/driver-jane",
      "@type": "Person" },
    { "@id": "ex:agents/hacker-alice",
      "@type": "Person" },
    { "@id": "ex:events/9bb5046e-ae19-43a7-aa72-378276501cff",
      "@type": "gtfs:Trip",
      "role:driver": "ex:agents/driver-jane",
      "role:passenger": [ "ex:agents/elf-pavlik", "ex:agents/hacker-alice" ] },
    { "@id": "ex:qualified/229e549e-4609-47c9-aa46-4bb66a830874",
      "@type": "Relation",
      "subject": "ex:events/9bb5046e-ae19-43a7-aa72-378276501cff",
      "object": "ex:agents/driver-jane",
      "property": "role:driver",
      "earned": "ex:token/ecea4aa0-381c-4dd2-bd57-3cd4654ab765" },
    { "@id": "ex:qualified/b1dc0995-a397-4f24-8af2-e4b089975508",
      "@type": ["Relation", "BusTrip"],
      "subject": "ex:events/9bb5046e-ae19-43a7-aa72-378276501cff",
      "object": "ex:agents/elf-pavlik",
      "property": "role:passenger",
      "paid": "ex:token/9462cec5-cec2-4bbf-b4a2-cafc03ad024a" },
    { "@id": "ex:qualified/ab34f1c8-10db-4bed-a0db-5b44be6d2273",
      "@type": ["Relation", "BusTrip"],
      "subject": "ex:events/9bb5046e-ae19-43a7-aa72-378276501cff",
      "object": "ex:agents/elf-pavlik",
      "property": "role:passenger",
      "paid": "ex:token/6bcd2de2-f77b-4380-9598-ea508bb69ae3" },
    { "@id": "ex:token/ecea4aa0-381c-4dd2-bd57-3cd4654ab765",
      "@type": "FoodStamp" },
    { "@id": "ex:token/9462cec5-cec2-4bbf-b4a2-cafc03ad024a",
      "@type": "BusTicket" },
    { "@id": "ex:token/6bcd2de2-f77b-4380-9598-ea508bb69ae3",
      "@type": "BusTicket" }
  ]
}

If I read that correctly, I had the domain and range backwards. The range is Person and Organization, and the domains are all of those other things?

yes, you can always check RDFa file I linked to to see the source

bhaugen commented 8 years ago

gtfs:trip is pretty nice, as is what you posted above. But it might be a view over a more complex set of stuff happening below, depending on the use case, like a flattened view over a set of database relations. driver-jane provided some hours or miles of driving time, for which she got paid X amount of money. On a long trip or a shift change, the bus may need a change of drivers. The bus needed to be refueled before and enroute. And then it needs some cleaning and maintenance after the trip. Your ticket gave you the right to use the bus trip from your departure to your destination but not beyond.

So it's not just that driver-jane has a role:driver, it's also that she actually did drive for 1000 kilometers, on a particular date, between particular times. (Is that what "subject": "ex:events/9bb5046e-ae19-43a7-aa72-378276501cff", means?)

Operationally, we may need to plan and account for all that stuff in detail. Or depending on what you are doing, you may be happy with the flattened view.

ahdinosaur commented 8 years ago

the agent-to-resource relationships i had in mind earlier were around ownership or things of that nature. while process and exchange also relate agents with resources, those intuitively seem to be of a different form than our current agent-to-agent relationships. also i'm unsure of roles at the moment, we're removing them from Holodex since we realized agent-to-agent relationships are all we need and more.

fosterlynn commented 8 years ago

Re. roles: Yes we ended up with roles (say role in an organization) and relationships (let's say between people, although that might not always be true) being the same thing. The difference is pretty subtle, and the agent-to-agent relationship works fine for any of these. I'll try to put this into a definition when we get to the doc.

bhaugen commented 8 years ago

Even ownership can get complicated. Read that "right to use underlying resource" discussion linked above-thread. Or don't, it's great for insomnia. We had a side conversation with Kendra about rights to media assets. In the movie biz, for example, you can buy the rights to show in theaters in Europe, or online streaming everywhere, or it used to be the rights to sell or rent out DVDs in certain regions. Or you can buy the rights to use some music tracks in your movie. In none of those cases do you own the underlying resource (the movie itself, which is intangible, although it has a master copy and other tangible assets).

elf-pavlik commented 8 years ago

@bhaugen I guess what you refer to as flattened view I refer to as direct relation (as illustrated here). As you can see in my example above, in addition I provided qualified versions of that relation which include examples earned/paid, where I use tokens FoodStamp and BusTicket to stay away from involving monetary currencies (based on coins not existing in physical reality).

I will expand my example below to separate driving trip from riding trip and include it as .jsonld file on one of repositories here.

also i'm unsure of roles at the moment, we're removing them from Holodex since we realized agent-to-agent relationships are all we need and more.

@ahdinosaur as I see it, in one to one relationships e.g. Mentorship we can find two roles mentor and mentee, possibly in some context. in one to many relationships we can have more roles, in W3C Group we have: member, staff, chair... during an Event (eg telecon) we also have: chair, scribe etc. I still want to explore how verbs and roles connect is scribe vs. does scribe - as person using E-Prime I prefer does scribe much more! But many people think in terms of roles which I would like to take into account...

bhaugen commented 8 years ago

The direct relationships between agents and resources that I have seen include:

fosterlynn commented 8 years ago

In Sensorica, the roles authorized to do something include:

(these related to a resource that is a piece of equipment)

bhaugen commented 8 years ago

I guess what you refer to as flattened view I refer to as direct relation

I mean flattened in the sense that what is going on in real life (or in an operational view that needs to plan and account for such things) has a lot more indirection (an agent provided driving service via an economic event that was measured in miles or hours, flattened into role:driver).

elf-pavlik commented 8 years ago

I mean flattened in the sense that what is going on in real life (or in an operational view that needs to plan and account for such things) has a lot more indirection (an agent provided driving service via an economic event that was measured in miles or hours, flattened into role:driver).

I must admit that I prefer much more to look at what we DO and will look at alternative way of expressing things which uses verb instead of role eg. verb:transports & verb:travels

I think most people would say "Jane (driver) drove the bus " and "Pavlik and Alice (passengers) took the ride". Someone else may want to express more elaborated view with emphasis on things like providing, consuming, economic events, accounting etc. I look for a way which in coherent way allows making simple statements and also gives pattern for more complex elaborations. In the end we will need to write down use cases, various examles of modeling and analyze pros and cons from various perspectives - including querying the data and reasoning on it etc.

@bhaugen could you maybe add some more details for the examples of Resource <-> Agent relationships in https://github.com/valueflows/agent/blob/master/Properties.md ?

bhaugen commented 8 years ago

I like Jane drove the bus better than role:driver, too. Whether to use more elaborated views depends on what you are trying to express, whether Jane drove the bus, or Jane drove for 1000 kilometers between Berlin and wherever on Friday and then Mary took over and they had to refuel the bus and replace the window that was hit by a pelican.

Pavlik and Alice probably didn't care about any of that, except for the story about the pelican.

elf-pavlik commented 8 years ago
elf-pavlik commented 8 years ago

Looking at things in terms of roles and in terms of actions (verbs) most likely should have a straight forward mapping. Possibly also rules for a reasoner to make inferences.

I see describing things in terms of roles useful when it comes to Access Controll, for example organizer of an event (meetup etc.) can change the location of this event, but not attendee / invitee.

Also a Person who has admin role in a group can approve requests to join it (or admin = chair in case of W3C groups), but member can not approve such requests.

While sometimes it comes beneficial to have only one way to state something, sometimes it also has benefit to have different ways to make statements. If in addition clear ways exist to translate those statements or infer one from the other one via reasoning, it can provide very robust way of managing knowledge.

See also: https://www.w3.org/wiki/WebAccessControl

bhaugen commented 8 years ago

could you maybe add some more details for the examples of Resource <-> Agent relationships in https://github.com/valueflows/agent/blob/master/Properties.md ?

@elf-pavlik - do you mean more details for those examples, or more examples, or examples that have more details?

elf-pavlik commented 8 years ago

More details for those examples, and we can add more examples with details as we encounter them. I would see very practical to have at least one real world scenario for each of those different relationships. Later we can start proposing different concrete ways to model those scenarios!

bhaugen commented 8 years ago

Are you editing that file in place, or merging pull requests from a fork? (We have a fork, I could do it that way.)

elf-pavlik commented 8 years ago

I would say let's just edit such files in place, for more crucial files like JSON-LD context / RDFS/OWL vocab I see it more important to have PR based workflow.

bhaugen commented 8 years ago

Added explanations of what they mean, at least in most cases I have seen. Is that the kind of details you were looking for? I don't yet feel competent to write RDF statements about them.

elf-pavlik commented 8 years ago

LGTM @bhaugen :star:

Could you please add a scenario which include owner, custodian, manager and planner? Just to see on particular example how those relationships differ from each other and complement each other. If possible let's use a single resource and four different agents.

bhaugen commented 8 years ago

Done, I think.

I'm basing it on Sensorica's community-funded 3D printer: http://nrp.sensorica.co/accounting/resource/411/

I'm also changing some of the relationships because I think they have them wrong, but I don't want to change their data. They didn't have planner, but they added some others.

The planner relationship came from vendor-managed inventory relationships, where (for example) a US chain toy store didn't own anything on their shelves, it was all owned by the vendor, who also stocked the shelves. It just washed through the store company's books when somebody bought something, in which case, the vendor got a notification, which went to the planner who was responsible for keeping the shelves restocked.

Planner is also common in manufacturing inventory.

Plus, a possibly instructive discussion of some difficulties with the 3D printer example situation: https://www.loomio.org/d/dcR4aTZW/how-do-we-ensure-a-complete-value-flow-

bhaugen commented 8 years ago

@elf-pavlik wrote:

For something like CarpoolingTrip we can also have prosumer role if people traveling take turns in driving. People can also share responsibility for securing a fuel, but someone can also share responsibility for securing food (fuel for people who drive or just travel). I think we can work together with @dahacouk on all kind of different carpooling/ridesharing scenarios where we will don't have simple provider/consumer case...

I love it! This and other examples of ride-sharing would be great use cases! We got a food network near us that wants to do food ride-sharing. It's fed by a lot of small farmers so they got a lot of small batches of food being trucked around. They want to arrange rides for the food with people who are already driving to work or wherever, in return for some food shares. They need some software to arrange these rides.

Then the real fun part is many of the farmers are Amish, who do not use electricity, let alone computers.

myriamboure commented 8 years ago

Interesting conversation! I'm actually starting to use the Nimber platform to deliver some of the products we buy through our new buying group in Oslo. But we have to do it manually, would be great to have some more automation ;-) It works pretty well on some often used ways, but a bit harder in remote areas, and we need a critical mass of users for a distributed logistics system to be efficient. Maybe when ride data will be shared openly all the rides posted on bablacar could be offered for food transportation ;-)

bhaugen commented 8 years ago

@myriamboure how does Nimber work for you? We're in a remote area (southwest Wisconsin USA).

(But my sister lives in Oslo, maybe she'd be interested in your buying group...:wink:)

myriamboure commented 8 years ago

For the moment we just publish an offer to ask if someone can bring x kg of vegetable from here to there between this day ad this day :-) The very old fashion way, but it enabled us to find people who did regularly the trip and could do the delivery for every order cycle maybe. For remote areas it's harder to find drivers who do the trip regularly, so you have more uncertainty and need back-up solutions. We are just experimenting this week so I can keep you updated if we find smartest way to do it :-)

bhaugen commented 8 years ago

We have a lot of people in the area who regularly drive to and from work or school. And the food network has a lot of farmers who have food to deliver regularly. So the drivers and the farmers could work out routes.

bhaugen commented 8 years ago

So maybe Nimber is overkill...too fancy for the requirements, and doesn't look like it's open source anyway.

almereyda commented 4 years ago

We have moved the ValueFlows organization from GitHub to https://lab.allmende.io/valueflows.

This issue has been closed here, and all further discussion on this issue can be done at

https://lab.allmende.io/valueflows/agent/-/issues/28.

If you have not done so, you are very welcome to register at https://lab.allmende.io and join the ValueFlows organization there.