How to determine most attractive politician?
Posted: Tue Mar 14, 2023 10:30 pm
This is a wonderful educational experience for a Ventity beginner. The problem to solve is in the model I’m currently designing and building. The model simulates behavior of the democratic backsliding problem, which involves elections.
Each voter has a Belief Memes (BM) entity type with attractiveness, country, politician, voter. There is one entity for each meme the voter has been exposed to, so there can be many entities with the same politician. In this early stage of the model, BM is populated by an init table.
The problem is how to determine the most attractive politician in a voter’s BM. This would be the maximum of the average attractiveness for each politician. This becomes a voter’s politician supported.
The model is attached. On the Voter diagram you will see a 4-step procedure of using triggers and actions to do this. (See image)
Can this be done? Is this a good procedure? It’s incredibly complex, but this is how the real-world works. This is similar to the way customer see ads and eventually make relative buy decisions. There are many similar business problems.
As far as I can tell, this would be so much easier if Ventity allowed something like SELECT PoliticianID, attractiveness FROM Belief Memes WHERE country =, voter=, GROUP BY PoliticianID, ORDER BY AVG(attractiveness) DESC. If Ventity 5.0 has this feature as an action kind, I think a lot of problems could be much more easily modeled. There’s a reason SQL is so common.
I can already see some barriers. Presently the model generates one warning per time step: “Unable to reference Entity Type [politician] from politician_attraction [politician_attraction[politician_attraction_0001]] using Attribute [Politician] = "" This is because of a missing Value To Match for PoliticianID in the Politician Attraction work table. Setting Value to Match to “Politician AttractionID” makes no difference. Why does Ventity demand the key to the table be set? I will never use it. It’s a hidden key.
Another anticipated barrier is determining the count for Create the work table. How does one calculate the number of different PoliticianIDs in Belief Memes?
And then how does one use a Process List to walk a Belief Memes table, and in the work table, add a record if not there or increment one if there? A lot of challenges here. Note how I’ve slipped into talking about tables and records, since that's what entities are. They are declarative language OO tables.
Thanks for your help here. I’m hoping that I’ll learn so much from this that the rest of developing the model will be a piece of cake!
And thanks for sharing your thought process on a recent reply. That is so important. I haven’t yet worked on that area, I've been so busy with the above problem.
Each voter has a Belief Memes (BM) entity type with attractiveness, country, politician, voter. There is one entity for each meme the voter has been exposed to, so there can be many entities with the same politician. In this early stage of the model, BM is populated by an init table.
The problem is how to determine the most attractive politician in a voter’s BM. This would be the maximum of the average attractiveness for each politician. This becomes a voter’s politician supported.
The model is attached. On the Voter diagram you will see a 4-step procedure of using triggers and actions to do this. (See image)
Can this be done? Is this a good procedure? It’s incredibly complex, but this is how the real-world works. This is similar to the way customer see ads and eventually make relative buy decisions. There are many similar business problems.
As far as I can tell, this would be so much easier if Ventity allowed something like SELECT PoliticianID, attractiveness FROM Belief Memes WHERE country =, voter=, GROUP BY PoliticianID, ORDER BY AVG(attractiveness) DESC. If Ventity 5.0 has this feature as an action kind, I think a lot of problems could be much more easily modeled. There’s a reason SQL is so common.
I can already see some barriers. Presently the model generates one warning per time step: “Unable to reference Entity Type [politician] from politician_attraction [politician_attraction[politician_attraction_0001]] using Attribute [Politician] = "" This is because of a missing Value To Match for PoliticianID in the Politician Attraction work table. Setting Value to Match to “Politician AttractionID” makes no difference. Why does Ventity demand the key to the table be set? I will never use it. It’s a hidden key.
Another anticipated barrier is determining the count for Create the work table. How does one calculate the number of different PoliticianIDs in Belief Memes?
And then how does one use a Process List to walk a Belief Memes table, and in the work table, add a record if not there or increment one if there? A lot of challenges here. Note how I’ve slipped into talking about tables and records, since that's what entities are. They are declarative language OO tables.
Thanks for your help here. I’m hoping that I’ll learn so much from this that the rest of developing the model will be a piece of cake!
And thanks for sharing your thought process on a recent reply. That is so important. I haven’t yet worked on that area, I've been so busy with the above problem.