Autonomous Prognostics and Health Management Automation Language (APHMAL)

McGill University 2022

Github

Download Report



The metamodel for APHMAL

Working with Alex Popov, AIAA Senior Member, provided a unique opportunity The APHMAL could be a part of the PHM-for-HH&P solution with predictive screening capability, providing early and actionable real-time warnings on impending health issues on the International Space Station (ISS).

This project is written using open source DSL tools from Eclipse Epsilon

Takeaways

Learning about open source modelling tools that weren't covered in class taught me a lot about learning to parse documentation. A lot of these tools have minimal documentation, and I had to really experiment and scoure the web to figure out how they worked, find examples of execution, or even set them up in Eclipse.

Much of this project involved planning and modelling. It was interesting to put a lot of thought into technical things that weren't purely coding

I did, however, gain some coding practice with Java reflection. eCore EObjects use some nasty reflective methods, and it took a good amount of recall of previous Java classes in order to create a working mapping algorithm using these objects.

Although I didn't apply it directly in this project, I also learned a lot about automatic code generation in this class, which is super cool. You can do it right from eCore, and it really does improve refactoring, as changing the model can update all the related code. These Eclipse tools do come with a lot of boilerplate and setup cost, but once running they are pretty sweet! A word of caution: I would maybe shy away from self-learning this if you don't have an expert to talk to.

I was working full time at Opal while working on this project, so I was extremely overworked at the time. Working 80 hours a week sucks.

What's Going On

Model Driven Engineering (MDE)

The goal of MDE is to minimize code through the use of modelling. Models can facilitate code through model-to-text transformations, or be converted to other models directly through model-to-model transformation technologies.

In ECSE 539 - Advanced Software Language at McGill we had the opportunity to build a DSL in the domain of our choice, using new software of our choice.

Problem Description

The goal of this project is to provide a "minimal set" of various types of devices, so that they treat biomarkers, while minimizing the sum of a linear value like cost

Input is a Flexi Model, Output is a eCore .model (Flexmi does not support saving)

Example

The following example illustrates mapping of two astronauts based on two different qualities. Even though they have identical biomarkers, they are prioritizing different qualities, and so have different devices mapped to them. For more examples, and to test it out yourself, see Github

Input Model

Output Model

Assumptions

For the input syntax:

  • Each crew member is recognized as a healthy person based on the formal pre-flight health screening routine and its results
  • Each crew member is provided with a set of his/her biomarkers
  • Biomarker is provided with a set of sensors, and a set of responders that “treat”/act upon the biomarkers. There must be at least 1 sensor and 1 responder for each biomarker.
  • Devices must have qualityType specified of type == Astronaut.Quality in order to be selected to treat a biomarker. (1)

For the output syntax:

  • The list of devices contained in an Astronaut all contain qualities of type Input!Astronaut.Quality
  • The list of devices has been optimized to minimize the sum of qualities for the qualityType given by Input!Astronaut.Quality
  • Each biomarker is covered by a responder and sensor (if (1) is met)

Metamodel

Defined in Epsilon EMFatic, designed to be extendable


Transformation

Written in ETL. A simple binding wrapper, that acted to call custom Java plugin. The Java plugin provides an algorithm to generate sensor mappings from input. These are in the form of lists, which are bound in ETL.

Big thanks to Gunter Mussbacher for advising on this project