The Signature
SSR uses a combined signature of the grid and robots.
// Robot controls
public DynamicSignature createRobotSignature() {
DynamicSignatureBuilder b = pureSignatureBuilder();
b.add("WayPoint", 1)
.add("OccupiedBy", 0)
.add("Robot", 1)
.add("ID", 0)
.add("N0", 0).add("N1", 0).add("N2", 0)
.add("N3", 0).add("N4", 0).add("N5", 0)
.add("Bat", 0).add("Pow", 0)
.add("SLck", 0).add("SLckRef", 1)
.add("Mvmt", 0).add("Token", 0);
return b.create();
}
The full signature merges the grid Ecore/XMI with the robot controls:
public DynamicSignature getCombinedSystemSignature() throws IOException {
List<EObject> sigEObjects = BigraphFileModelManagement.Load
.signatureInstanceModel(
"src/test/resources/models/selfsortingrobots/mm_sig_loc.ecore",
"src/test/resources/models/selfsortingrobots/sig_loc.xmi"
);
AbstractEcoreSignature<?> locSig = createOrGetSignature(sigEObjects.get(0));
return BigraphUtil.mergeSignatures((DynamicSignature) locSig, createRobotSignature());
}
File meanings:
mm_sig_loc.ecore— the bi-spatial signature metamodel ("location-aware bigraph")sig_loc.xmi— the bi-spatial signature instance
This bi-spatial signature defines a very abstract syntax layer for this cyber-physical application.
It consist of only Routes and Locales.
These files were exported using the model-provider-core library of the Bigraph Toolkit Suite: https://github.com/bigraph-toolkit-suite/bigraphs.model-provider
They can also be created programmatically using:
BiSpaceSignatureProvider.getInstance().getSignature();