GeoMapBuilder-for-SoS is a constructor of geographical environment of system of systems (SoS) based on the Meta-Model for System-of-Systems (M2SoS)1.
This repository shows the overall process of building the geographical environment of SoS, and provides the simple exemples.
- Java 15.1
- Download the source code.
- Build your own GeoMap of your secnario.
- Update the GeoMap data using SQL-like queries.
-
Make classes of dimensions that extend DimVar
something
- Implement
checkUpdateValid(int diff)
method - Implement
updateValueOfDim(int diff)
method
- Implement
-
Make a user-defined SoS class that extends SoS
public class ExampleSoSType extends SoS
- Implement
initSoSModel()
- Declare and instantiate user-defined entities
ExampleObjectType obj01 = new ExampleObjectType(this, "OBJ_01_ID", "OBJ_01_NAME");
- Add the entities into the SoS
addMemberEntity(obj01);
- Implement
-
Make a user-defined map class that extends SoSMap
public class MapType_04_Cuboid extends SoSMap
-
Declare and initialize dimension variables (DimVars) with their domains (DimVarDomain) in the user-defined map class adsfasdf
- Implement
initMapDimensions()
method- Instantiate DimVarDomains
DimVarDomain xPosDomain = new DimVarDomain(EnumDomainType.VALUE_RANGE_DISCRETE, 0, 2);
DimVarDomain floorDomain = new DimVarDomain(EnumDomainType.ENUMERATION, new ArrayList<String>(Arrays.asList("FLOOR_1", "FLOOR_2")));
- Make DimVar objects based on your own DimVar
MapCoordinateDimType xPosDimVar = new MapCoordinateDimType( "xPosVar", "xPosVar", "Int", "0", "0", xPosDomain);
- Add the DimVars into the map
addDimVar(xPosDimVar);
- Instantiate DimVarDomains
- Implement
initMapInformation()
method- Instantiate Data Var Domains
- Make DataVar objects with the DataVarDomains defined
- Add the DataVars into the map
addDataVar(isWallVar);
- Implement
-
Instantiate the user-defined map class at your SoS class file (
ExampleSoSType.java
) by implementinginitMap()
method of your SoS classMapType_04_Cuboid mapObject04Cuboid = new MapType_04_Cuboid("SOSMAP04", "EXAMPLE_SOS_MAP_04", "Map_Initialization_Type04_Cuboid.txt");
Here, Map_Initialization_Type04_Cuboid.txt is a file for the map initialization. See How to update map data section below.
-
Instantiate the user-defined SoS class at
Main.java
ExampleSoSType sos = new ExampleSoSType("SOS01", "EXAMPLE_SOS", "", cuboidMap , new ArrayList<Entity>());
You need to make a text file that stores the formally defined geographical data.
The exemple of it is at the ExampleSoSMapInit.txt
, and ExampleSoSMapInit_pool.txt
.
SET(dustLevelVar=3);
SET(isWallVar=0, isChargingStationVar=1)WHERE(ALL);
SET(isWallVar=3)WHERE(xPosVar==1 && yPosVar==1);
The syntax is combines with SET
, and WHERE
for a single line.
SET
shows the geographical data, and WHERE
shows the location of the data.
If WHERE
does not exist, GeoMapBuilder sets the data to whole possible location in the map.
1 Y.-M. Baek, J. Song, Y.-J. Shin, S. Park, and D.-H. Bae, “A meta-model for representing system-of-systems ontologies,” in 2018 IEEE/ACM 6th International Workshop on Software Engineering for Systems-of-Systems(SESoS). IEEE, 2018, pp. 1–7. ↩