Merge pull request #33 from Echtzeitsysteme/feature/dspace_example_vis

Feature/dspace example vis
This commit is contained in:
Maximilian Kratz 2024-04-29 13:54:22 +02:00 committed by GitHub
commit 5afd8e154c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
122 changed files with 2934 additions and 74 deletions

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry exported="true" kind="lib" path="lib/javafx.base.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/javafx.controls.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/javafx.fxml.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/javafx.graphics.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/javafx.media.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/javafx.swing.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/javafx.web.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/javafx-swt.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="JavaFxDependencies/dlls"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>JavaFxDependencies</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View file

@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17

View file

@ -0,0 +1,194 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JavaFxDependencies
Bundle-SymbolicName: JavaFxDependencies
Bundle-Version: 1.0.0
Bundle-ClassPath: lib/javafx.base.jar,
lib/javafx.controls.jar,
lib/javafx.fxml.jar,
lib/javafx.graphics.jar,
lib/javafx.media.jar,
lib/javafx.swing.jar,
lib/javafx.web.jar,
lib/javafx-swt.jar
Export-Package: com.sun.glass.events,
com.sun.glass.ui,
com.sun.glass.ui.delegate,
com.sun.glass.ui.win,
com.sun.glass.utils,
com.sun.java.scene.web,
com.sun.javafx,
com.sun.javafx.animation,
com.sun.javafx.application,
com.sun.javafx.beans,
com.sun.javafx.beans.event,
com.sun.javafx.binding,
com.sun.javafx.charts,
com.sun.javafx.collections,
com.sun.javafx.css,
com.sun.javafx.css.parser,
com.sun.javafx.cursor,
com.sun.javafx.effect,
com.sun.javafx.embed,
com.sun.javafx.embed.swing,
com.sun.javafx.embed.swing.newimpl,
com.sun.javafx.event,
com.sun.javafx.font,
com.sun.javafx.font.coretext,
com.sun.javafx.font.directwrite,
com.sun.javafx.font.freetype,
com.sun.javafx.fxml,
com.sun.javafx.fxml.builder,
com.sun.javafx.fxml.builder.web,
com.sun.javafx.fxml.expression,
com.sun.javafx.geom,
com.sun.javafx.geom.transform,
com.sun.javafx.geometry,
com.sun.javafx.iio,
com.sun.javafx.iio.bmp,
com.sun.javafx.iio.common,
com.sun.javafx.iio.gif,
com.sun.javafx.iio.ios,
com.sun.javafx.iio.jpeg,
com.sun.javafx.iio.png,
com.sun.javafx.image,
com.sun.javafx.image.impl,
com.sun.javafx.logging,
com.sun.javafx.logging.jfr,
com.sun.javafx.media,
com.sun.javafx.menu,
com.sun.javafx.perf,
com.sun.javafx.print,
com.sun.javafx.property,
com.sun.javafx.property.adapter,
com.sun.javafx.reflect,
com.sun.javafx.runtime,
com.sun.javafx.runtime.async,
com.sun.javafx.runtime.eula,
com.sun.javafx.scene,
com.sun.javafx.scene.canvas,
com.sun.javafx.scene.control,
com.sun.javafx.scene.control.behavior,
com.sun.javafx.scene.control.inputmap,
com.sun.javafx.scene.control.skin,
com.sun.javafx.scene.control.skin.resources,
com.sun.javafx.scene.input,
com.sun.javafx.scene.layout,
com.sun.javafx.scene.layout.region,
com.sun.javafx.scene.media,
com.sun.javafx.scene.paint,
com.sun.javafx.scene.shape,
com.sun.javafx.scene.text,
com.sun.javafx.scene.transform,
com.sun.javafx.scene.traversal,
com.sun.javafx.scene.web,
com.sun.javafx.scene.web.behavior,
com.sun.javafx.sg.prism,
com.sun.javafx.sg.prism.web,
com.sun.javafx.stage,
com.sun.javafx.text,
com.sun.javafx.tk,
com.sun.javafx.tk.quantum,
com.sun.javafx.util,
com.sun.javafx.webkit,
com.sun.javafx.webkit.prism,
com.sun.javafx.webkit.prism.theme,
com.sun.javafx.webkit.theme,
com.sun.marlin,
com.sun.marlin.stats,
com.sun.media.jfxmedia,
com.sun.media.jfxmedia.control,
com.sun.media.jfxmedia.effects,
com.sun.media.jfxmedia.events,
com.sun.media.jfxmedia.locator,
com.sun.media.jfxmedia.logging,
com.sun.media.jfxmedia.track,
com.sun.media.jfxmediaimpl,
com.sun.media.jfxmediaimpl.platform,
com.sun.media.jfxmediaimpl.platform.gstreamer,
com.sun.media.jfxmediaimpl.platform.java,
com.sun.openpisces,
com.sun.pisces,
com.sun.prism,
com.sun.prism.d3d,
com.sun.prism.image,
com.sun.prism.impl,
com.sun.prism.impl.packrect,
com.sun.prism.impl.paint,
com.sun.prism.impl.ps,
com.sun.prism.impl.shape,
com.sun.prism.j2d,
com.sun.prism.j2d.paint,
com.sun.prism.j2d.print,
com.sun.prism.paint,
com.sun.prism.ps,
com.sun.prism.shader,
com.sun.prism.shape,
com.sun.prism.sw,
com.sun.scenario,
com.sun.scenario.animation,
com.sun.scenario.animation.shared,
com.sun.scenario.effect,
com.sun.scenario.effect.impl,
com.sun.scenario.effect.impl.hw,
com.sun.scenario.effect.impl.hw.d3d,
com.sun.scenario.effect.impl.prism,
com.sun.scenario.effect.impl.prism.ps,
com.sun.scenario.effect.impl.prism.sw,
com.sun.scenario.effect.impl.state,
com.sun.scenario.effect.impl.sw,
com.sun.scenario.effect.impl.sw.java,
com.sun.scenario.effect.impl.sw.sse,
com.sun.scenario.effect.light,
com.sun.util.reentrant,
com.sun.webkit,
com.sun.webkit.dom,
com.sun.webkit.event,
com.sun.webkit.graphics,
com.sun.webkit.network,
com.sun.webkit.network.about,
com.sun.webkit.network.data,
com.sun.webkit.perf,
com.sun.webkit.plugin,
com.sun.webkit.security,
com.sun.webkit.text,
javafx.animation,
javafx.application,
javafx.beans,
javafx.beans.binding,
javafx.beans.property,
javafx.beans.property.adapter,
javafx.beans.value,
javafx.collections,
javafx.collections.transformation,
javafx.concurrent,
javafx.css,
javafx.css.converter,
javafx.embed.swing,
javafx.embed.swt,
javafx.event,
javafx.fxml,
javafx.geometry,
javafx.print,
javafx.scene,
javafx.scene.canvas,
javafx.scene.chart,
javafx.scene.control,
javafx.scene.control.cell,
javafx.scene.control.skin,
javafx.scene.effect,
javafx.scene.image,
javafx.scene.input,
javafx.scene.layout,
javafx.scene.media,
javafx.scene.paint,
javafx.scene.robot,
javafx.scene.shape,
javafx.scene.text,
javafx.scene.transform,
javafx.scene.web,
javafx.stage,
javafx.util,
javafx.util.converter
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: JavaFxDependencies

View file

@ -0,0 +1,9 @@
bin.includes = META-INF/,\
lib/javafx.base.jar,\
lib/javafx.controls.jar,\
lib/javafx.fxml.jar,\
lib/javafx.graphics.jar,\
lib/javafx.media.jar,\
lib/javafx.swing.jar,\
lib/javafx.web.jar,\
lib/javafx-swt.jar

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>

3
LectureStudioModelB/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/bin
/gen
/model/*.genmodel

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>LectureStudioModelB</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.moflon.emf.build.MoflonEmfBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.moflon.emf.build.MoflonEmfNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17

View file

@ -0,0 +1,19 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: LectureStudioModelB;singleton:=true
Bundle-Version: 0.0.1.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: LectureStudioModelB
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.xmi,
org.emoflon.smartemf
Export-Package: LectureStudioModelB,
LectureStudioModelB.impl,
lsmodel.generator

View file

@ -0,0 +1,6 @@
#
#Sat Jun 11 11:39:47 CEST 2022
src.excludes=injection/
bin.includes=META-INF/, bin/, model/, plugin.xml, moflon.properties.xmi
source..=src/,gen/
output..=bin/

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="ASCII"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="LectureStudioModelB" nsURI="platform:/resource/LectureStudioModelB/model/LectureStudioModelB.ecore"
nsPrefix="LectureStudioModelB">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="TODO: Add documentation for LectureStudioModelB. Hint: You may copy this element in the Ecore editor to add documentation to EClasses, EOperations, ..."/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="Network">
<eStructuralFeatures xsi:type="ecore:EReference" name="lectureStudioServer" upperBound="-1"
eType="#//LectureStudioServer" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="time" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="configurations" upperBound="-1"
eType="#//Configuration" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="nextId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Configuration">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="clients" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="slowDown" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="bwSplit" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Node" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="depth" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="clients" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="data" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="activeClients" upperBound="-1"
eType="#//Client" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="clientConnection" upperBound="-1"
eType="#//Connection" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isRelayClient" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isHasRoot" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="transferTime" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="txBW" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="rxBW" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="minTxBW" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="invTxBW" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="invRxBW" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="configuration" eType="#//Configuration"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LectureStudioServer" eSuperTypes="#//Node">
<eStructuralFeatures xsi:type="ecore:EReference" name="waitingClients" upperBound="-1"
eType="#//Client" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Client" eSuperTypes="#//Node"/>
<eClassifiers xsi:type="ecore:EClass" name="Connection">
<eStructuralFeatures xsi:type="ecore:EReference" name="server" lowerBound="1"
eType="#//Node"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="client" lowerBound="1"
eType="#//Client"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="transferRate" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0"/>
</eClassifiers>
</ecore:EPackage>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="ASCII"?>
<org.moflon.core.propertycontainer:MoflonPropertiesContainer xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:org.moflon.core.propertycontainer="platform:/plugin/org.moflon.core.propertycontainer/model/Propertycontainer.ecore" projectName="LectureStudioModelB">
<genModelProps/>
<codeGenerator generator="SMART_EMF"/>
</org.moflon.core.propertycontainer:MoflonPropertiesContainer>

View file

@ -0,0 +1,4 @@
#
pluginName = LectureStudioModelB
providerName =

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse version="3.0"?><plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
<package class="LectureStudioModelB.LectureStudioModelBPackage" genModel="model/LectureStudioModelB.genmodel" uri="platform:/resource/LectureStudioModelB/model/LectureStudioModelB.ecore"/>
</extension>
</plugin>

View file

@ -0,0 +1,5 @@
package lsmodel.generator;
public enum GenDistribution {
CONST, UNI, N, EXP;
}

View file

@ -0,0 +1,57 @@
package lsmodel.generator;
import java.util.Random;
/* Parameter order:
* IF dist == CONST
* 1. const value
*
* ELSE IF dist == EXP
* 2. lambda (<- aka. rate)
*
* ELSE IF dist == UNI
* 2. lower bound
* 3. upper bound
*
* ELSE IF dist == normal
* 2. mean
* 3. deviation
*/
public record GenParameter(GenDistribution dist, double[] parameters) {
public GenParameter(GenDistribution dist, double... parameters) {
this.dist = dist;
this.parameters = parameters;
}
double getParam(final Random rnd) {
return switch (dist) {
case CONST -> {
if (parameters.length != 1)
throw new IllegalArgumentException("Expected parameters size 1, got " + parameters.length + ".");
yield parameters[0];
}
case EXP -> {
if (parameters.length != 1)
throw new IllegalArgumentException("Expected parameters size 1, got " + parameters.length + ".");
yield Math.log(1 - rnd.nextDouble() / -parameters[0]);
}
case N -> {
if (parameters.length != 2)
throw new IllegalArgumentException("Expected parameters size 2, got " + parameters.length + ".");
yield rnd.nextGaussian(parameters[0], parameters[1]);
}
case UNI -> {
if (parameters.length != 2)
throw new IllegalArgumentException("Expected parameters size 2, got " + parameters.length + ".");
yield rnd.nextDouble(parameters[0], parameters[1]);
}
default -> {
throw new IllegalArgumentException("Unknown enumerator.");
}
};
}
}

View file

@ -0,0 +1,192 @@
package lsmodel.generator;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.emoflon.smartemf.persistence.SmartEMFResourceFactoryImpl;
import LectureStudioModelB.Client;
import LectureStudioModelB.Configuration;
import LectureStudioModelB.LectureStudioModelBFactory;
import LectureStudioModelB.LectureStudioModelBPackage;
import LectureStudioModelB.LectureStudioServer;
import LectureStudioModelB.Network;
public class LSGenerator {
public static final DecimalFormat df = new DecimalFormat("0.00");
public static String projectFolder = System.getProperty("user.dir");
public static String instancesFolder = projectFolder + "/../org.emoflon.gips.gipsl.examples.lsp2p/instances/";
protected LectureStudioModelBFactory factory = LectureStudioModelBFactory.eINSTANCE;
protected Random rnd;
public static void initFileSystem() {
File iF = new File(instancesFolder);
if (!iF.exists()) {
iF.mkdirs();
}
}
public static void main(String[] args) {
initFileSystem();
simpleInitialBatch(10);
}
public static Network simpleInitialBatch(int numOfConfigs) {
LSGenerator gen = new LSGenerator("FunSeed123".hashCode());
double fileSize = 10;
double lsBW = 250;
int clients = 5;
double clientsUp = 50;
double clientsDown = 150;
Network net = gen.generateInitial(numOfConfigs, new GenParameter(GenDistribution.CONST, fileSize),
new GenParameter(GenDistribution.CONST, lsBW), new GenParameter(GenDistribution.CONST, clients),
new GenParameter(GenDistribution.UNI, 10, clientsUp),
new GenParameter(GenDistribution.CONST, clientsDown));
StringBuilder fileName = new StringBuilder();
// fileName.append("/LSBW@");
// fileName.append(df.format(lsBW).replace(",", "-"));
// fileName.append("_FS@");
// fileName.append(df.format(fileSize).replace(",", "-"));
// fileName.append("_CL@");
// fileName.append(clients);
// fileName.append("_CLUP@");
// fileName.append(df.format(clientsUp).replace(",", "-"));
// fileName.append("_CLDW@");
// fileName.append(df.format(clientsDown).replace(",", "-"));
// fileName.append("_EMPTY.xmi");
fileName.append("lsp2p_10clients.xmi");
try {
save(net, instancesFolder + fileName.toString());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return net;
}
public static void save(Network model, String path) throws IOException {
URI uri = URI.createFileURI(path);
ResourceSet rs = new ResourceSetImpl();
rs.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xmi", new SmartEMFResourceFactoryImpl("../"));
rs.getPackageRegistry().put(LectureStudioModelBPackage.eNS_URI, LectureStudioModelBPackage.eINSTANCE);
Resource r = rs.createResource(uri);
r.getContents().add(model);
r.save(null);
r.unload();
}
public LSGenerator(long seed) {
rnd = new Random(seed);
}
public Network generateInitial(int numOfConfigs, GenParameter data, GenParameter lsBwUp, GenParameter nodes,
GenParameter nodeBwUp, GenParameter nodeBwDown) {
int id = 0;
Network net = factory.createNetwork();
net.setTime(0);
LectureStudioServer ls = factory.createLectureStudioServer();
ls.setData(data.getParam(rnd));
ls.setId("" + id++);
ls.setTxBW(lsBwUp.getParam(rnd));
ls.setMinTxBW(ls.getTxBW() / 20.0);
// Rx is actually not needed.
ls.setRxBW(lsBwUp.getParam(rnd));
ls.setInvTxBW(1.0 / ls.getTxBW());
// Rx is actually not needed.
ls.setInvRxBW(1.0 / ls.getRxBW());
// ls.setResidualTxBW(ls.getTxBW());
// // Same here.
// ls.setResidualRxBW(ls.getRxBW());
// ls.setAllocatedTxBW(0);
// // Same here.
// ls.setAllocatedRxBW(0);
ls.setTransferTime(0);
ls.setIsRelayClient(1);
ls.setIsHasRoot(1);
ls.setClients(0);
net.getLectureStudioServer().add(ls);
List<Configuration> configs = new LinkedList<>();
for (int i = 0; i < numOfConfigs; i++) {
Configuration config = factory.createConfiguration();
config.setClients(i);
config.setSlowDown(i);
config.setBwSplit(1.0 / i);
configs.add(config);
}
net.getConfigurations().addAll(configs);
List<Client> clients = new LinkedList<>();
for (int i = (int) nodes.getParam(rnd); i > 0; i--) {
Client client = factory.createClient();
client.setData(ls.getData());
client.setDepth(-1);
client.setId("" + id++);
client.setIsRelayClient(0);
client.setTxBW(nodeBwUp.getParam(rnd));
client.setMinTxBW(client.getTxBW() / 2.0);
client.setRxBW(nodeBwDown.getParam(rnd));
// client.setResidualTxBW(client.getTxBW());
// client.setResidualRxBW(client.getRxBW());
// client.setAllocatedTxBW(0);
// client.setAllocatedRxBW(0);
client.setInvTxBW(1.0 / client.getTxBW());
client.setInvRxBW(1.0 / client.getRxBW());
client.setTransferTime(0);
client.setIsRelayClient(0);
client.setIsHasRoot(0);
client.setClients(0);
clients.add(client);
}
ls.getWaitingClients().addAll(clients);
net.setNextId(id);
return net;
}
public void insertRndClients(final LectureStudioServer ls, GenParameter nodes, GenParameter nodeBwUp,
GenParameter nodeBwDown) {
Network network = (Network) ls.eContainer();
int id = network.getNextId();
List<Client> clients = new LinkedList<>();
for (int i = (int) nodes.getParam(rnd); i > 0; i--) {
Client client = factory.createClient();
client.setData(ls.getData());
client.setDepth(-1);
client.setId("" + id++);
client.setIsRelayClient(0);
client.setTxBW(nodeBwUp.getParam(rnd));
client.setMinTxBW(client.getTxBW() / 2.0);
client.setRxBW(nodeBwDown.getParam(rnd));
// client.setResidualTxBW(client.getTxBW());
// client.setResidualRxBW(client.getRxBW());
// client.setAllocatedTxBW(0);
// client.setAllocatedRxBW(0);
client.setInvTxBW(1.0 / client.getTxBW());
client.setInvRxBW(1.0 / client.getRxBW());
client.setTransferTime(0);
client.setIsRelayClient(0);
client.setIsHasRoot(0);
client.setClients(0);
clients.add(client);
}
ls.getWaitingClients().addAll(clients);
network.setNextId(id);
}
}

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src-gen"/>

View file

@ -12,4 +12,6 @@ Require-Bundle: org.emoflon.ibex.common,
org.emoflon.gips.core,
org.emoflon.ibex.gt.democles,
org.emoflon.ibex.gt.hipe,
PersonTaskAssignments;bundle-version="0.0.1"
PersonTaskAssignments;bundle-version="0.0.1",
JavaFxDependencies
Import-Package: com.google.common.collect

View file

@ -0,0 +1,9 @@
package pta.example.house;
import javafx.application.Application;
public class HouseConstructionVisualization {
public static void main(String[] args) {
Application.launch(VisJsAdapter.class);
}
}

View file

@ -0,0 +1,189 @@
package pta.example.house;
import java.io.File;
import java.nio.file.Files;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import java.util.AbstractMap.SimpleEntry;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.emoflon.smartemf.persistence.SmartEMFResourceFactoryImpl;
import PersonTaskAssignments.PersonTaskAssignmentModel;
import PersonTaskAssignments.PersonTaskAssignmentsPackage;
import PersonTaskAssignments.Week;
import com.google.common.collect.HashBiMap;
import javafx.concurrent.Worker;
import javafx.application.Application;
import javafx.application.ConditionalFeature;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import netscape.javascript.JSObject;
public class VisJsAdapter extends Application{
protected PersonTaskAssignmentModel model;
protected WebEngine engine;
protected JSObject window;
protected HashBiMap<Object, String> objs = HashBiMap.create();
protected HashBiMap<String, Entry<String, String>> edges = HashBiMap.create();
protected HashBiMap<Object, HashBiMap<String, Entry<String, String>>> edges2Obj = HashBiMap.create();
public VisJsAdapter() {
String projectFolder = System.getProperty("user.dir");
String instancesFolder = projectFolder + "/instances";
String file = instancesFolder + "/ConstructionProject1_solved.xmi";
ResourceSet rs = new ResourceSetImpl();
rs.getResourceFactoryRegistry().getExtensionToFactoryMap()
.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new SmartEMFResourceFactoryImpl("../"));
rs.getPackageRegistry().put(PersonTaskAssignmentsPackage.eNS_URI, PersonTaskAssignmentsPackage.eINSTANCE);
URI fileURI = URI.createFileURI(file);
Resource r = rs.getResource(fileURI, true);
model = (PersonTaskAssignmentModel) r.getContents().get(0);
}
@Override
public void start(Stage stage) throws Exception {
WebView webview = new WebView();
Scene scene = new Scene(webview, 2500, 900);
stage.setScene(scene);
engine = webview.getEngine();
engine.setJavaScriptEnabled(true);
engine.loadContent(VisJsScriptTemplates.getTemplate());
webview.setVisible(true);
stage.show();
engine.getLoadWorker().stateProperty().addListener((observable, oldValue, newValue) -> {
if(newValue == Worker.State.SUCCEEDED) {
window = (JSObject)engine.executeScript("window");
window.setMember("jfx", this);
initModel();
engine.executeScript("var network = new vis.Network(container, data, options);");
engine.executeScript(VisJsScriptTemplates.getFixLayout());
// engine.executeScript(VisJsScriptTemplates.createCallbackOnStabilized());
// engine.executeScript(VisJsScriptTemplates.createMoveOnDragStart());
// engine.executeScript(VisJsScriptTemplates.createMoveOnDragEnd());
engine.executeScript(VisJsScriptTemplates.createDeletionOnClick());
}
});
}
protected void initModel() {
Map<String, String> nodeAdditions = new LinkedHashMap<>();
Map<String, Entry<String, String>> edgeAdditions = new LinkedHashMap<>();
for(Week week : model.getWeeks().stream()
.filter(w -> w.getOffers().stream()
.filter(o -> !(o.getRequirements() == null || o.getRequirements().isEmpty())).findAny().isPresent())
.collect(Collectors.toList())) {
primeObjectForVisJs(nodeAdditions, week, "KW:"+week.getNumber());
if(week.getPrevious() != null) {
primeEdgeForVisJs(edgeAdditions, week.getPrevious(), week);
}
}
model.getPersons().stream().filter(p -> p.getOffers().stream().filter(o -> !(o.getRequirements() == null || o.getRequirements().isEmpty())).findAny().isPresent()).forEach(p -> {
String id = primeObjectForVisJs(nodeAdditions, p, "P("+p.getName()+")");
p.getOffers().stream().filter(o -> !(o.getRequirements() == null || o.getRequirements().isEmpty())).forEach(o -> {
String id2 = primeObjectForVisJs(nodeAdditions, o, "O("+o.getHours()+")");
primeEdgeForVisJs(edgeAdditions, o, o.getWeek());
primeEdgeForVisJs(edgeAdditions, o.getWeek(), p);
});
});
model.getProjects().stream()
.filter(p -> p.getTasks().stream()
.filter(t -> t.getRequirements().stream()
.filter(r -> !(r.getOffers() == null || r.getOffers().isEmpty())).findAny().isPresent()).findAny().isPresent()).forEach(p -> {
String id = primeObjectForVisJs(nodeAdditions, p, "PR("+p.getName()+")");
p.getTasks().forEach(t -> {
String id2 = primeObjectForVisJs(nodeAdditions, t, "T("+t.getName()+")");
t.getWeeks().forEach(w -> primeEdgeForVisJs(edgeAdditions, p, t));
t.getRequirements().forEach(r -> {
String id3 = primeObjectForVisJs(nodeAdditions, r, "R("+r.getName()+")");
primeEdgeForVisJs(edgeAdditions, t, r);
r.getOffers().forEach(o -> {
primeEdgeForVisJs(edgeAdditions, r, o);
});
});
});
});
engine.executeScript(VisJsScriptTemplates.addNodes(nodeAdditions));
engine.executeScript(VisJsScriptTemplates.addEdges(edgeAdditions));
}
protected String primeObjectForVisJs(Map<String, String> additions, Object obj, String label) {
String id = String.valueOf(objs.size());
objs.put(obj, id);
additions.put(id, label);
return id;
}
protected void primeEdgeForVisJs(Map<String, Entry<String, String>> additions, Object src, Object trg) {
if(!objs.containsKey(src) || !objs.containsKey(trg))
return;
Entry<String, String> pair = new SimpleEntry<String, String>(objs.get(src), objs.get(trg));
String id = String.valueOf(edges.size());
if(!edges.inverse().containsKey(pair))
edges.putIfAbsent(id, pair);
else
return;
HashBiMap<String, Entry<String, String>> otherEdges = edges2Obj.get(src);
if(otherEdges == null) {
otherEdges = HashBiMap.create();
edges2Obj.put(src, otherEdges);
}
if(!otherEdges.inverse().containsKey(pair))
otherEdges.putIfAbsent(id, pair);
otherEdges = edges2Obj.get(trg);
if(otherEdges == null) {
otherEdges = HashBiMap.create();
edges2Obj.put(trg, otherEdges);
}
if(!otherEdges.inverse().containsKey(pair))
otherEdges.putIfAbsent(id, pair);
additions.put(id, pair);
}
public void deleteNode(String id) {
Object obj = objs.inverse().get(id);
HashBiMap<String, Entry<String, String>> otherEdges = edges2Obj.get(obj);
if(otherEdges != null) {
otherEdges.keySet().forEach(eid -> engine.executeScript(VisJsScriptTemplates.removeEdge(eid)));
}
engine.executeScript(VisJsScriptTemplates.removeNode(id));
objs.remove(obj);
}
public void deactivateLayouting() {
objs.values().forEach(id -> {
engine.executeScript(VisJsScriptTemplates.configureNode(id, List.of("allowedToMoveX: false", "allowedToMoveY: false")));
});
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -22,9 +22,12 @@ This repository holds some GIPS example projects.
| **Name** | **Description** |
| -------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `classdiagram*` | Example GIPS-based solution of the TGG 3.0 prototype implementation (classes) |
| `JavaFXDependencies` | JavaFX Dependencies (as Eclipse plug-in project) [will just work on Windows] |
| `LectureStudioModelB` | Adapted (meta)model for the lectureStudio P2P example |
| `org.emoflon.gips.gipsl.examples.headlessrunner.*` | Example on how to build and use a GIPS project headlessly - export it to JAR and run it |
| `org.emoflon.gips.gipsl.examples.helloworld` | Very simple hello world example for the GIPS language - can not be executed |
| `org.emoflon.gips.gipsl.examples.mdvne.*` | Model-driven Virtual Network Embedding example with and without migration functionality |
| `org.emoflon.gips.gipsl.examples.lsp2p*` | Adapted lectureStudio P2P example |
| `network.model` | Network (meta)model with converters and a manipulator for the MdVNE example |
| `org.emoflon.gips.gipsl.examples.sdr.*` | Software-Defined Radio task scheduling on CPUs |
| `PersonTaskAssignments`/`PTA*` | Person-to-Task Assignments for construction purposes |

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="lib/gson/gson-2.8.9.jar"/>
<classpathentry kind="lib" path="lib/gson/gson-2.8.9-javadoc.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="lib/gson/gson-2.8.9.jar"/>
<classpathentry kind="lib" path="lib/gson/gson-2.8.9-javadoc.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -5,18 +5,18 @@ package model;
@GenModel(documentation="A root node as entry point.")
class Root {
@GenModel(documentation="Set of networks within this root node.")
val Network [*]#root networks;
val Network [*]#root networks;
}
@GenModel(documentation="Abstract class for all elements.")
abstract class Element {
@GenModel(documentation="Name.")
attr EString [1] name;
@GenModel(documentation="Name.")
attr EString [1] name;
}
@GenModel(documentation="Abstract class for all nodes.")
abstract class Node extends Element {
@GenModel(documentation="Depth inside tree-based networks.")
@GenModel(documentation="Depth inside tree-based networks.")
attr EInt [1] depth;
@GenModel(documentation="Network this node belongs to.")
@ -26,29 +26,29 @@ abstract class Node extends Element {
ref Link [*]#source outgoingLinks;
@GenModel(documentation="Set of incoming links (links that end at this node).")
ref Link [*]#target incomingLinks;
ref Link [*]#target incomingLinks;
}
@GenModel(documentation="Abstract class for all servers.")
abstract class Server extends Node {
@GenModel(documentation="CPU amount of this server.")
@GenModel(documentation="CPU amount of this server.")
attr ELong [1] cpu;
@GenModel(documentation="Memory (RAM) amout of this server.")
attr ELong [1] memory;
@GenModel(documentation="Storage (HDD/SSD) amout of this server.")
attr ELong [1] storage;
attr ELong [1] storage;
}
@GenModel(documentation="Abstract class for all switches.")
abstract class Switch extends Node {
abstract class Switch extends Node {
}
@GenModel(documentation="Abstract class for all links.")
abstract class Link extends Element {
@GenModel(documentation="Bandwidth amount of this link.")
@GenModel(documentation="Bandwidth amount of this link.")
attr EInt [1] bandwidth;
@GenModel(documentation="Network this link belongs to.")
@ -58,28 +58,28 @@ abstract class Link extends Element {
ref Node [1]#outgoingLinks source;
@GenModel(documentation="Target node at which this link ends.")
ref Node [1]#incomingLinks target;
ref Node [1]#incomingLinks target;
}
@GenModel(documentation="Abstract class for all networks.")
abstract class Network extends Element {
@GenModel(documentation="Root node this network belongs to.")
@GenModel(documentation="Root node this network belongs to.")
ref Root [1]#networks root;
@GenModel(documentation="Set of nodes that are part of this network.")
val Node [*]#network nodes;
@GenModel(documentation="Set of links that are part of this network.")
val Link [*]#network links;
val Link [*]#network links;
}
@GenModel(documentation="Abstract class that represents a substrate element.")
abstract class SubstrateElement extends Element {
abstract class SubstrateElement extends Element {
}
@GenModel(documentation="Abstract class that represents a substrate node.")
abstract class SubstrateNode extends Node, SubstrateElement {
@GenModel(documentation="Virtual guest switches.")
@GenModel(documentation="Virtual guest switches.")
ref VirtualSwitch [*]#host guestSwitches;
@GenModel(documentation="Paths that use this node.")
@ -89,18 +89,18 @@ abstract class SubstrateNode extends Node, SubstrateElement {
ref SubstratePath [*]#source outgoingPaths;
@GenModel(documentation="Set of incoming paths (paths that end at this node).")
ref SubstratePath [*]#target incomingPaths;
ref SubstratePath [*]#target incomingPaths;
}
@GenModel(documentation="Abstract class that can host a virtual link.")
abstract class SubstrateHostLink extends SubstrateElement {
abstract class SubstrateHostLink extends SubstrateElement {
@GenModel(documentation="Virtual guest links.")
ref VirtualLink [*]#host guestLinks;
ref VirtualLink [*]#host guestLinks;
}
@GenModel(documentation="Class that represents a substrate server.")
class SubstrateServer extends Server, SubstrateNode, SubstrateHostLink {
@GenModel(documentation="Virtual guest servers.")
@GenModel(documentation="Virtual guest servers.")
ref VirtualServer [*]#host guestServers;
@GenModel(documentation="Residual CPU amount of this server.")
@ -114,21 +114,21 @@ class SubstrateServer extends Server, SubstrateNode, SubstrateHostLink {
// Extension for directly hosting a complete virtual network
@GenModel(documentation="Virtual guest networks.")
ref VirtualNetwork [*]#hostServer guestNetworks;
ref VirtualNetwork [*]#hostServer guestNetworks;
}
@GenModel(documentation="Class that represents a substrate switch.")
class SubstrateSwitch extends Switch, SubstrateNode {
}
@GenModel(documentation="Class that represents a substrate link.")
class SubstrateLink extends Link, SubstrateElement, SubstrateHostLink {
class SubstrateLink extends Link, SubstrateElement, SubstrateHostLink {
@GenModel(documentation="Residual bandwidth amount of this link.")
attr EInt [1] residualBandwidth;
@GenModel(documentation="Paths that use this link.")
ref SubstratePath [*]#links paths;
ref SubstratePath [*]#links paths;
}
@GenModel(documentation="Class that represents a substrate path.")
@ -153,9 +153,9 @@ class SubstratePath extends SubstrateElement, SubstrateHostLink {
@GenModel(documentation="Number of hops of this path.")
attr EInt [1] hops;
@GenModel(documentation="Residual bandwidth amount of this path.")
attr EInt [1] residualBandwidth;
attr EInt [1] residualBandwidth;
}
@GenModel(documentation="Class that represents a substrate network")
@ -164,35 +164,35 @@ class SubstrateNetwork extends Network, SubstrateElement {
ref VirtualNetwork [*]#host guests;
@GenModel(documentation="Set of paths that are part of this network.")
val SubstratePath [*]#network paths;
val SubstratePath [*]#network paths;
}
@GenModel(documentation="Abstract class that represents a virtual element.")
abstract class VirtualElement extends Element {
abstract class VirtualElement extends Element {
}
@GenModel(documentation="Abstract class that represents a virtual node.")
abstract class VirtualNode extends Node, VirtualElement {
abstract class VirtualNode extends Node, VirtualElement {
}
@GenModel(documentation="Class that represents a virtual server.")
class VirtualServer extends Server, VirtualNode {
@GenModel(documentation="Host server that runs this virtual server.")
ref SubstrateServer [1]#guestServers host;
@GenModel(documentation="Host server that runs this virtual server.")
ref SubstrateServer [1]#guestServers host;
}
@GenModel(documentation="Class that represents a virtual switch.")
class VirtualSwitch extends Switch, VirtualNode {
@GenModel(documentation="Host node that runs this virtual switch.")
ref SubstrateNode [1]#guestSwitches host;
@GenModel(documentation="Host node that runs this virtual switch.")
ref SubstrateNode [1]#guestSwitches host;
}
@GenModel(documentation="Class that represents a virtual link.")
class VirtualLink extends Link, VirtualElement {
@GenModel(documentation="Substrate host element.")
ref SubstrateHostLink [1]#guestLinks host;
@GenModel(documentation="Substrate host element.")
ref SubstrateHostLink [1]#guestLinks host;
}
@GenModel(documentation="Represents a virtual network.")
@ -213,5 +213,5 @@ class VirtualNetwork extends Network, VirtualElement {
attr ELong [1] storage;
@GenModel(documentation="Host server that runs this virtual network.")
ref SubstrateServer [1]#guestNetworks hostServer;
ref SubstrateServer [1]#guestNetworks hostServer;
}

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-16"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=16
org.eclipse.jdt.core.compiler.source=17

Some files were not shown because too many files have changed in this diff Show more