Chapter 9Actuation

After tackling data acquisition and state inference in the previous two chapters, in this chapter we will address the final step of our HiTLCPS sample app: actuation. To do so, in Section 9.1 we will first handle emotions on the server side. This implies the need to implement intelligence that saves and updates emotional information and associates it with certain POIs. We will also need to prune the database for outdated emotions; that is, each emotion has limited validity, after which it should be deleted from the database. Afterwards, in Section 9.2, we will keep working on EmotionTasker, defining when the results of our neural network should be considered, as well as what to do with them. Last but not least, in Section 9.3, we will also discuss how to provide positive reinforcement to the user and how to represent emotional information on the map.

9.1 Handling Emotions on the Server

As previously mentioned in Section 5.2.2, this book does not cover how to implement and handle the database. Instead, it focuses on the intelligence associated with the handling of emotions in the server. In particular, we will detail how to save and update emotional information and how to prune outdated emotions.

In this section we will be implementing the setEmotion web service referenced back on page ???. Before we begin, we suggest a revision of the server's class structure, previously discussed on page ??. We will need to create new classes in the Model, Web, and Com

Get A Practical Introduction to Human-in-the-Loop Cyber-Physical Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.