123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <?xml version="1.0" encoding="UTF-8"?>
- <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/HintConfiguration/src-gen" modelPluginID="HintConfiguration"
- runtimeJar="true" modelName="HintConfiguration" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
- testsDirectory="" booleanFlagsField="eFlags" booleanFlagsReservedBits="8" importerID="org.eclipse.emf.ecore.xcore.importer"
- containmentProxies="true" complianceLevel="8.0" language="en" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"
- operationReflection="true" importOrganizing="true" decoration="Live" oSGiCompatible="true"
- eclipsePlatformVersion="Juno" autoResizeProperties="true" autoExpandProperties="10"
- findAction="true" expandAllAction="true" collapseAllAction="true" revertAction="true">
- <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter">
- <genAnnotations source="selectedPackages">
- <details key="http://www.eclipse.org/emf/2002/Ecore" value="Ecore.xsd"/>
- </genAnnotations>
- <details key="directoryURI" value="."/>
- </genAnnotations>
- <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter.xmi">
- <genAnnotations source="selectedPackages">
- <details key="http://www.eclipse.org/emf/2002/Ecore" value="EcoreXMI.xsd"/>
- </genAnnotations>
- <details key="directoryURI" value="."/>
- </genAnnotations>
- <foreignModel>HintConfiguration.xcore</foreignModel>
- <modelPluginVariables>org.eclipse.xtext.xbase.lib</modelPluginVariables>
- <modelPluginVariables>org.eclipse.emf.ecore.xcore.lib</modelPluginVariables>
- <genPackages prefix="Hintco" basePackage="ua.ansymo" disposableProviderFactory="true"
- ecorePackage="hintco.ecore#/">
- <genDataTypes ecoreDataType="hintco.ecore#//Int"/>
- <genClasses image="false" ecoreClass="hintco.ecore#//IDed">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//IDed/identifier"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//HintConfiguration">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/candidates"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/csuDeclarations"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/root"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/nodes"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//VariantDiagram">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//VariantDiagram/children"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//VariantDiagram/alternative"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//VariantDiagram/name"
- get="<%java.lang.String%> _xblockexpression = null;
{
	<%java.lang.String%> _identifier = this.getIdentifier();
	final <%java.lang.String%> prefix = (_identifier + "_");
	<%java.lang.String%> _xifexpression = null;
	<%ua.ansymo.hintco.Alternative%> _alternative = this.getAlternative();
	boolean _tripleNotEquals = (_alternative != null);
	if (_tripleNotEquals)
	{
		<%java.lang.String%> _xifexpression_1 = null;
		<%ua.ansymo.hintco.Alternative%> _alternative_1 = this.getAlternative();
		if ((_alternative_1 instanceof <%ua.ansymo.hintco.RootCandidateScenario%>))
		{
			<%ua.ansymo.hintco.Alternative%> _alternative_2 = this.getAlternative();
			<%java.lang.String%> _name = ((<%ua.ansymo.hintco.RootCandidateScenario%>) _alternative_2).getName();
			_xifexpression_1 = ((prefix + "sce ") + _name);
		}
		else
		{
			<%java.lang.String%> _xifexpression_2 = null;
			<%ua.ansymo.hintco.Alternative%> _alternative_3 = this.getAlternative();
			if ((_alternative_3 instanceof <%ua.ansymo.hintco.XorPortAdaptation%>))
			{
				<%ua.ansymo.hintco.Alternative%> _alternative_4 = this.getAlternative();
				<%java.lang.String%> _name_1 = ((<%ua.ansymo.hintco.XorPortAdaptation%>) _alternative_4).getName();
				_xifexpression_2 = ((prefix + "xor ") + _name_1);
			}
			else
			{
				<%java.lang.String%> _xifexpression_3 = null;
				<%ua.ansymo.hintco.Alternative%> _alternative_5 = this.getAlternative();
				if ((_alternative_5 instanceof <%ua.ansymo.hintco.XorUnitAdaptation%>))
				{
					<%ua.ansymo.hintco.Alternative%> _alternative_6 = this.getAlternative();
					<%java.lang.String%> _name_2 = ((<%ua.ansymo.hintco.XorUnitAdaptation%>) _alternative_6).getName();
					_xifexpression_3 = ((prefix + "xor ") + _name_2);
				}
				else
				{
					<%java.lang.String%> _xifexpression_4 = null;
					<%ua.ansymo.hintco.Alternative%> _alternative_7 = this.getAlternative();
					if ((_alternative_7 instanceof <%ua.ansymo.hintco.ExtrapolationAdaptation%>))
					{
						<%ua.ansymo.hintco.Alternative%> _alternative_8 = this.getAlternative();
						<%java.lang.String%> _name_3 = ((<%ua.ansymo.hintco.ExtrapolationAdaptation%>) _alternative_8).getName();
						_xifexpression_4 = ((prefix + "extra ") + _name_3);
					}
					else
					{
						<%java.lang.String%> _xifexpression_5 = null;
						<%ua.ansymo.hintco.Alternative%> _alternative_9 = this.getAlternative();
						if ((_alternative_9 instanceof <%ua.ansymo.hintco.InterpolationAdaptation%>))
						{
							<%ua.ansymo.hintco.Alternative%> _alternative_10 = this.getAlternative();
							<%java.lang.String%> _name_4 = ((<%ua.ansymo.hintco.InterpolationAdaptation%>) _alternative_10).getName();
							_xifexpression_5 = ((prefix + "intra ") + _name_4);
						}
						else
						{
							_xifexpression_5 = (prefix + "implement");
						}
						_xifexpression_4 = _xifexpression_5;
					}
					_xifexpression_3 = _xifexpression_4;
				}
				_xifexpression_2 = _xifexpression_3;
			}
			_xifexpression_1 = _xifexpression_2;
		}
		_xifexpression = _xifexpression_1;
	}
	else
	{
		_xifexpression = (prefix + "root");
	}
	_xblockexpression = _xifexpression;
}
return _xblockexpression;"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//PrecedenceNode">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/precedes"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/succeeds"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/before"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/after"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//RootCandidateScenario">
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/name"
- get="<%java.lang.String%> _identifier = this.getIdentifier();
<%java.lang.String%> _plus = (_identifier + "(w=");
int _weight = this.getWeight();
<%java.lang.String%> _plus_1 = (_plus + <%java.lang.Integer%>.valueOf(_weight));
return (_plus_1 + ")");"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/stopTime"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/stepSize"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/outputStepSize"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/maxInitIterations"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//Scenario">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//Scenario/cosimunits"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//HierarchicalCosimUnit">
- <genOperations ecoreOperation="hintco.ecore#//HierarchicalCosimUnit/valid" body="final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PortInstance%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PortInstance%>, <%java.lang.Boolean%>>()
{
	public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.PortInstance%> p)
	{
		return <%java.lang.Boolean%>.valueOf((p instanceof <%ua.ansymo.hintco.HierarchicalUnitPort%>));
	}
};
return <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.PortInstance%>>forall(this.getPorts(), _function);"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//CosimUnitDeclaration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//CosimUnitDeclaration/path"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//CosimUnitDeclaration/guid"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//UnitInstance">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitInstance/scenario"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitInstance/adaptation"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitInstance/ports"/>
- <genOperations ecoreOperation="hintco.ecore#//UnitInstance/selectedAdaptations"
- body="<%ua.ansymo.hintco.UnitAdaptation%> _adaptation = this.getAdaptation();
boolean _tripleEquals = (_adaptation == null);
if (_tripleEquals)
{
	return new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.UnitAdaptation%>>(java.util.Collections.<<%ua.ansymo.hintco.UnitAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<<%ua.ansymo.hintco.UnitAdaptation%>>newArrayList()));
}
boolean _isSelected = this.getAdaptation().isSelected();
if (_isSelected)
{
	<%ua.ansymo.hintco.UnitAdaptation%> _adaptation_1 = this.getAdaptation();
	if ((_adaptation_1 instanceof <%ua.ansymo.hintco.DecompositionUnitAdaptation%>))
	{
		<%ua.ansymo.hintco.UnitAdaptation%> _adaptation_2 = this.getAdaptation();
		return ((<%ua.ansymo.hintco.DecompositionUnitAdaptation%>) _adaptation_2).selectedAdaptations();
	}
	<%ua.ansymo.hintco.UnitAdaptation%> _adaptation_3 = this.getAdaptation();
	return new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.UnitAdaptation%>>(java.util.Collections.<<%ua.ansymo.hintco.UnitAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<<%ua.ansymo.hintco.UnitAdaptation%>>newArrayList(_adaptation_3)));
}
return new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.UnitAdaptation%>>(java.util.Collections.<<%ua.ansymo.hintco.UnitAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<<%ua.ansymo.hintco.UnitAdaptation%>>newArrayList()));"/>
- <genOperations ecoreOperation="hintco.ecore#//UnitInstance/getOutputPorts" body="final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.OutputPortInstance%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.OutputPortInstance%>, <%java.lang.Boolean%>>()
{
	public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.OutputPortInstance%> it)
	{
		boolean _isInput = it.isInput();
		return <%java.lang.Boolean%>.valueOf((!_isInput));
	}
};
return <%org.eclipse.emf.common.util.ECollections%>.<<%ua.ansymo.hintco.OutputPortInstance%>>toEList(<%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.OutputPortInstance%>>filter(<%com.google.common.collect.Iterables%>.<<%ua.ansymo.hintco.OutputPortInstance%>>filter(this.getPorts(), <%ua.ansymo.hintco.OutputPortInstance%>.class), _function));"/>
- <genOperations ecoreOperation="hintco.ecore#//UnitInstance/getInputPorts" body="final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.InputPortInstance%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.InputPortInstance%>, <%java.lang.Boolean%>>()
{
	public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.InputPortInstance%> it)
	{
		return <%java.lang.Boolean%>.valueOf(it.isInput());
	}
};
return <%org.eclipse.emf.common.util.ECollections%>.<<%ua.ansymo.hintco.InputPortInstance%>>toEList(<%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.InputPortInstance%>>filter(<%com.google.common.collect.Iterables%>.<<%ua.ansymo.hintco.InputPortInstance%>>filter(this.getPorts(), <%ua.ansymo.hintco.InputPortInstance%>.class), _function));"/>
- <genOperations ecoreOperation="hintco.ecore#//UnitInstance/toString" body="return this.getIdentifier();"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//CosimUnitInstance">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//CosimUnitInstance/declaration"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//PortInstance">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PortInstance/unit"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//PortInstance/adaptation"/>
- <genOperations ecoreOperation="hintco.ecore#//PortInstance/selectedAdaptations"
- body="<%ua.ansymo.hintco.PortAdaptation%> _adaptation = this.getAdaptation();
boolean _tripleEquals = (_adaptation == null);
if (_tripleEquals)
{
	return new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.PortAdaptation%>>(java.util.Collections.<<%ua.ansymo.hintco.PortAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<<%ua.ansymo.hintco.PortAdaptation%>>newArrayList()));
}
boolean _isSelected = this.getAdaptation().isSelected();
if (_isSelected)
{
	<%ua.ansymo.hintco.PortAdaptation%> _adaptation_1 = this.getAdaptation();
	if ((_adaptation_1 instanceof <%ua.ansymo.hintco.DecompositionPortAdaptation%>))
	{
		<%ua.ansymo.hintco.PortAdaptation%> _adaptation_2 = this.getAdaptation();
		return ((<%ua.ansymo.hintco.DecompositionPortAdaptation%>) _adaptation_2).selectedAdaptations();
	}
	<%ua.ansymo.hintco.PortAdaptation%> _adaptation_3 = this.getAdaptation();
	return new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.PortAdaptation%>>(java.util.Collections.<<%ua.ansymo.hintco.PortAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<<%ua.ansymo.hintco.PortAdaptation%>>newArrayList(_adaptation_3)));
}
return new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.PortAdaptation%>>(java.util.Collections.<<%ua.ansymo.hintco.PortAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.<<%ua.ansymo.hintco.PortAdaptation%>>newArrayList()));"/>
- <genOperations ecoreOperation="hintco.ecore#//PortInstance/isInput" body="return false;"/>
- <genOperations ecoreOperation="hintco.ecore#//PortInstance/getsValueFrom" body="return false;">
- <genParameters ecoreParameter="hintco.ecore#//PortInstance/getsValueFrom/p"/>
- </genOperations>
- <genOperations ecoreOperation="hintco.ecore#//PortInstance/toString" body="<%java.lang.String%> _string = this.getUnit().toString();
<%java.lang.String%> _plus = (_string + ".");
<%java.lang.String%> _identifier = this.getIdentifier();
return (_plus + _identifier);"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//HierarchicalUnitPort">
- <genOperations ecoreOperation="hintco.ecore#//HierarchicalUnitPort/isInput"
- body="boolean _xblockexpression = false;
{
	final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.OutputPortInstance%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.OutputPortInstance%>, <%java.lang.Boolean%>>()
	{
		public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.OutputPortInstance%> p)
		{
			<%ua.ansymo.hintco.OutputPortInstance%> _valueFrom = <%this%>.getValueFrom();
			return <%java.lang.Boolean%>.valueOf(<%com.google.common.base.Objects%>.equal(p, _valueFrom));
		}
	};
	boolean _exists = <%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.<<%ua.ansymo.hintco.OutputPortInstance%>>exists(<%com.google.common.collect.Iterators%>.<<%ua.ansymo.hintco.OutputPortInstance%>>filter(this.getUnit().eAllContents(), <%ua.ansymo.hintco.OutputPortInstance%>.class), _function);
	final boolean auxIsInput = (!_exists);
	final boolean auxAltIsInput = this.altIsInput();
	if (((auxIsInput && (!auxAltIsInput)) || ((!auxIsInput) && auxAltIsInput)))
	{
		throw new <%java.lang.RuntimeException%>("Something wrong with the implementation of isInput");
	}
	_xblockexpression = auxIsInput;
}
return _xblockexpression;"/>
- <genOperations ecoreOperation="hintco.ecore#//HierarchicalUnitPort/altIsInput"
- body="boolean _xifexpression = false;
boolean _isEmpty = this.getValueTo().isEmpty();
if (_isEmpty)
{
	_xifexpression = false;
}
else
{
	final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.InputPortInstance%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.InputPortInstance%>, <%java.lang.Boolean%>>()
	{
		public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.InputPortInstance%> trgP)
		{
			boolean _xifexpression = false;
			<%ua.ansymo.hintco.UnitInstance%> _unit = trgP.getUnit();
			<%ua.ansymo.hintco.UnitInstance%> _unit_1 = <%this%>.getUnit();
			boolean _tripleEquals = (_unit == _unit_1);
			if (_tripleEquals)
			{
				_xifexpression = false;
			}
			else
			{
				boolean _xblockexpression = false;
				{
					final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.InputPortInstance%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.InputPortInstance%>, <%java.lang.Boolean%>>()
					{
						public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.InputPortInstance%> ip)
						{
							return <%java.lang.Boolean%>.valueOf((ip == trgP));
						}
					};
					final boolean internal = <%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.<<%ua.ansymo.hintco.InputPortInstance%>>exists(<%com.google.common.collect.Iterators%>.<<%ua.ansymo.hintco.InputPortInstance%>>filter(<%this%>.getUnit().eAllContents(), <%ua.ansymo.hintco.InputPortInstance%>.class), _function);
					boolean _xifexpression_1 = false;
					if ((!internal))
					{
						_xifexpression_1 = false;
					}
					else
					{
						boolean _xifexpression_2 = false;
						if ((trgP instanceof <%ua.ansymo.hintco.HierarchicalUnitPort%>))
						{
							_xifexpression_2 = ((<%ua.ansymo.hintco.HierarchicalUnitPort%>)trgP).altIsInput();
						}
						else
						{
							_xifexpression_2 = true;
						}
						_xifexpression_1 = _xifexpression_2;
					}
					_xblockexpression = _xifexpression_1;
				}
				_xifexpression = _xblockexpression;
			}
			return <%java.lang.Boolean%>.valueOf(_xifexpression);
		}
	};
	_xifexpression = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.InputPortInstance%>>forall(this.getValueTo(), _function);
}
return _xifexpression;"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//InputPortInstance">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//InputPortInstance/extrapolationCost"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//InputPortInstance/internalValueTo"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//InputPortInstance/valueFrom"/>
- <genOperations ecoreOperation="hintco.ecore#//InputPortInstance/getRealValueFrom"
- body="<%ua.ansymo.hintco.OutputPortInstance%> _xifexpression = null;
<%ua.ansymo.hintco.OutputPortInstance%> _valueFrom = this.getValueFrom();
if ((_valueFrom instanceof <%ua.ansymo.hintco.HierarchicalUnitPort%>))
{
	<%ua.ansymo.hintco.OutputPortInstance%> _valueFrom_1 = this.getValueFrom();
	_xifexpression = ((<%ua.ansymo.hintco.HierarchicalUnitPort%>) _valueFrom_1).getRealValueFrom();
}
else
{
	_xifexpression = this.getValueFrom();
}
return _xifexpression;"/>
- <genOperations ecoreOperation="hintco.ecore#//InputPortInstance/getsValueFrom"
- body="<%ua.ansymo.hintco.OutputPortInstance%> _valueFrom = this.getValueFrom();
boolean _tripleEquals = (_valueFrom == p);
if (_tripleEquals)
{
	return true;
}
else
{
	<%ua.ansymo.hintco.OutputPortInstance%> _valueFrom_1 = this.getValueFrom();
	if ((_valueFrom_1 instanceof <%ua.ansymo.hintco.InputPortInstance%>))
	{
		<%ua.ansymo.hintco.OutputPortInstance%> _valueFrom_2 = this.getValueFrom();
		return ((<%ua.ansymo.hintco.InputPortInstance%>) _valueFrom_2).getsValueFrom(p);
	}
	else
	{
		return false;
	}
}">
- <genParameters ecoreParameter="hintco.ecore#//InputPortInstance/getsValueFrom/p"/>
- </genOperations>
- <genOperations ecoreOperation="hintco.ecore#//InputPortInstance/isInput" body="return true;"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//OutputPortInstance">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//OutputPortInstance/valueTo"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//OutputPortInstance/internalValueFrom"/>
- <genOperations ecoreOperation="hintco.ecore#//OutputPortInstance/isInput" body="return false;"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//Alternative">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//Alternative/weight"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//Alternative/selected"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//Alternative/implies"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//Adaptation"/>
- <genClasses image="false" ecoreClass="hintco.ecore#//PortAdaptation">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PortAdaptation/port"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PortAdaptation/parent"/>
- <genOperations ecoreOperation="hintco.ecore#//PortAdaptation/adapted" body="<%ua.ansymo.hintco.PortInstance%> _port = this.getPort();
boolean _tripleNotEquals = (_port != null);
if (_tripleNotEquals)
{
	return this.getPort();
}
<%ua.ansymo.hintco.DecompositionPortAdaptation%> _parent = this.getParent();
boolean _tripleEquals = (_parent == null);
if (_tripleEquals)
{
	return null;
}
return this.getParent().adapted();"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//DecompositionPortAdaptation">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//DecompositionPortAdaptation/children"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//DecompositionPortAdaptation/name"
- get="int _weight = this.getWeight();
<%java.lang.String%> _plus = ("(w=" + <%java.lang.Integer%>.valueOf(_weight));
return (_plus + ")");"/>
- <genOperations ecoreOperation="hintco.ecore#//DecompositionPortAdaptation/selectedAdaptations"
- body="int _size = this.getChildren().size();
final <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.PortAdaptation%>> res = new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.PortAdaptation%>>(_size);
final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PortAdaptation%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PortAdaptation%>, <%java.lang.Boolean%>>()
{
	public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.PortAdaptation%> a)
	{
		return <%java.lang.Boolean%>.valueOf(a.isSelected());
	}
};
<%java.lang.Iterable%><<%ua.ansymo.hintco.PortAdaptation%>> _filter = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.PortAdaptation%>>filter(this.getChildren(), _function);
for (final <%ua.ansymo.hintco.PortAdaptation%> c : _filter)
{
	if ((c instanceof <%ua.ansymo.hintco.DecompositionPortAdaptation%>))
	{
		res.addAll(((<%ua.ansymo.hintco.DecompositionPortAdaptation%>)c).selectedAdaptations());
	}
	else
	{
		res.add(c);
	}
}
return res;"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//UnitAdaptation">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitAdaptation/unit"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitAdaptation/parent"/>
- <genOperations ecoreOperation="hintco.ecore#//UnitAdaptation/adapted" body="<%ua.ansymo.hintco.UnitInstance%> _unit = this.getUnit();
boolean _tripleNotEquals = (_unit != null);
if (_tripleNotEquals)
{
	return this.getUnit();
}
<%ua.ansymo.hintco.DecompositionUnitAdaptation%> _parent = this.getParent();
boolean _tripleEquals = (_parent == null);
if (_tripleEquals)
{
	return null;
}
return this.getParent().adapted();"/>
- </genClasses>
- <genClasses image="false" ecoreClass="hintco.ecore#//DecompositionUnitAdaptation">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//DecompositionUnitAdaptation/children"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//DecompositionUnitAdaptation/name"
- get="int _weight = this.getWeight();
<%java.lang.String%> _plus = ("(w=" + <%java.lang.Integer%>.valueOf(_weight));
return (_plus + ")");"/>
- <genOperations ecoreOperation="hintco.ecore#//DecompositionUnitAdaptation/selectedAdaptations"
- body="int _size = this.getChildren().size();
final <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.UnitAdaptation%>> res = new <%org.eclipse.emf.common.util.BasicEList%><<%ua.ansymo.hintco.UnitAdaptation%>>(_size);
final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.UnitAdaptation%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.UnitAdaptation%>, <%java.lang.Boolean%>>()
{
	public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.UnitAdaptation%> a)
	{
		return <%java.lang.Boolean%>.valueOf(a.isSelected());
	}
};
<%java.lang.Iterable%><<%ua.ansymo.hintco.UnitAdaptation%>> _filter = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.UnitAdaptation%>>filter(this.getChildren(), _function);
for (final <%ua.ansymo.hintco.UnitAdaptation%> c : _filter)
{
	if ((c instanceof <%ua.ansymo.hintco.DecompositionUnitAdaptation%>))
	{
		res.addAll(((<%ua.ansymo.hintco.DecompositionUnitAdaptation%>)c).selectedAdaptations());
	}
	else
	{
		res.add(c);
	}
}
return res;"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//XorUnitAdaptation"/>
- <genClasses ecoreClass="hintco.ecore#//XorPortAdaptation"/>
- <genClasses image="false" ecoreClass="hintco.ecore#//ApproximationAdaptation">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//ApproximationAdaptation/order"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//MultiRateAdaptation">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//MultiRateAdaptation/rate"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//MultiRateAdaptation/name"
- get="int _rate = this.getRate();
<%java.lang.String%> _plus = (<%java.lang.Integer%>.valueOf(_rate) + "(w=");
int _weight = this.getWeight();
<%java.lang.String%> _plus_1 = (_plus + <%java.lang.Integer%>.valueOf(_weight));
return (_plus_1 + ")");"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//PowerBondAdaptation">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/effort"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/flow"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/pOut"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/pIn"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//PowerBondAdaptation/name"
- get="<%java.lang.String%> _xifexpression = null;
if (((this.getEffort() != null) && (this.getFlow() != null)))
{
	<%java.lang.String%> _identifier = this.getEffort().getIdentifier();
	<%java.lang.String%> _plus = ("PBond_" + _identifier);
	<%java.lang.String%> _plus_1 = (_plus + "_");
	<%java.lang.String%> _identifier_1 = this.getFlow().getIdentifier();
	<%java.lang.String%> _plus_2 = (_plus_1 + _identifier_1);
	<%java.lang.String%> _plus_3 = (_plus_2 + "(w=");
	int _weight = this.getWeight();
	<%java.lang.String%> _plus_4 = (_plus_3 + <%java.lang.Integer%>.valueOf(_weight));
	_xifexpression = (_plus_4 + ")");
}
else
{
	int _weight_1 = this.getWeight();
	<%java.lang.String%> _plus_5 = ("PBond(w=" + <%java.lang.Integer%>.valueOf(_weight_1));
	_xifexpression = (_plus_5 + ")");
}
return _xifexpression;"/>
- <genOperations ecoreOperation="hintco.ecore#//PowerBondAdaptation/getDual" body="<%ua.ansymo.hintco.PowerBondAdaptation%> _xblockexpression = null;
{
	<%ua.ansymo.hintco.PowerBondAdaptation%> res = null;
	if (((this.getEffort() instanceof <%ua.ansymo.hintco.InputPortInstance%>) && (this.getFlow() instanceof <%ua.ansymo.hintco.OutputPortInstance%>)))
	{
		final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.UnitInstance%>, <%java.lang.Iterable%><<%ua.ansymo.hintco.PowerBondAdaptation%>>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.UnitInstance%>, <%java.lang.Iterable%><<%ua.ansymo.hintco.PowerBondAdaptation%>>>()
		{
			public <%java.lang.Iterable%><<%ua.ansymo.hintco.PowerBondAdaptation%>> apply(final <%ua.ansymo.hintco.UnitInstance%> u)
			{
				return <%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>toIterable(<%com.google.common.collect.Iterators%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>filter(u.eAllContents(), <%ua.ansymo.hintco.PowerBondAdaptation%>.class));
			}
		};
		final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>> _function_1 = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>>()
		{
			public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.PowerBondAdaptation%> a)
			{
				return <%java.lang.Boolean%>.valueOf(((a.getEffort() instanceof <%ua.ansymo.hintco.OutputPortInstance%>) && (a.getFlow() instanceof <%ua.ansymo.hintco.InputPortInstance%>)));
			}
		};
		final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>> _function_2 = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>>()
		{
			public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.PowerBondAdaptation%> a)
			{
				return <%java.lang.Boolean%>.valueOf((((<%ua.ansymo.hintco.OutputPortInstance%>) a.getEffort()).getValueTo().contains(<%this%>.getEffort()) && (((<%ua.ansymo.hintco.InputPortInstance%>) a.getFlow()).getValueFrom() == <%this%>.getFlow())));
			}
		};
		res = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>findFirst(<%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>filter(<%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.UnitInstance%>, <%ua.ansymo.hintco.PowerBondAdaptation%>>flatMap(this.getUnit().getScenario().getCosimunits(), _function), _function_1), _function_2);
	}
	else
	{
		if (((this.getEffort() instanceof <%ua.ansymo.hintco.OutputPortInstance%>) && (this.getFlow() instanceof <%ua.ansymo.hintco.InputPortInstance%>)))
		{
			final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.UnitInstance%>, <%java.lang.Iterable%><<%ua.ansymo.hintco.PowerBondAdaptation%>>> _function_3 = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.UnitInstance%>, <%java.lang.Iterable%><<%ua.ansymo.hintco.PowerBondAdaptation%>>>()
			{
				public <%java.lang.Iterable%><<%ua.ansymo.hintco.PowerBondAdaptation%>> apply(final <%ua.ansymo.hintco.UnitInstance%> u)
				{
					return <%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>toIterable(<%com.google.common.collect.Iterators%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>filter(u.eAllContents(), <%ua.ansymo.hintco.PowerBondAdaptation%>.class));
				}
			};
			final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>> _function_4 = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>>()
			{
				public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.PowerBondAdaptation%> a)
				{
					return <%java.lang.Boolean%>.valueOf(((a.getEffort() instanceof <%ua.ansymo.hintco.InputPortInstance%>) && (a.getFlow() instanceof <%ua.ansymo.hintco.OutputPortInstance%>)));
				}
			};
			final <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>> _function_5 = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%ua.ansymo.hintco.PowerBondAdaptation%>, <%java.lang.Boolean%>>()
			{
				public <%java.lang.Boolean%> apply(final <%ua.ansymo.hintco.PowerBondAdaptation%> a)
				{
					return <%java.lang.Boolean%>.valueOf(((((<%ua.ansymo.hintco.InputPortInstance%>) a.getEffort()).getValueFrom() == <%this%>.getEffort()) && ((<%ua.ansymo.hintco.OutputPortInstance%>) a.getFlow()).getValueTo().contains(<%this%>.getFlow())));
				}
			};
			res = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>findFirst(<%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.PowerBondAdaptation%>>filter(<%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%ua.ansymo.hintco.UnitInstance%>, <%ua.ansymo.hintco.PowerBondAdaptation%>>flatMap(this.getUnit().getScenario().getCosimunits(), _function_3), _function_4), _function_5);
		}
		else
		{
			throw new <%java.lang.RuntimeException%>("Invalid effort and flow in power bond adaptation");
		}
	}
	if ((res == null))
	{
		throw new <%java.lang.RuntimeException%>("Power bond adaptation has no dual");
	}
	_xblockexpression = res;
}
return _xblockexpression;"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//ExtrapolationAdaptation">
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//ExtrapolationAdaptation/name"
- get="int _order = this.getOrder();
<%java.lang.String%> _plus = (<%java.lang.Integer%>.valueOf(_order) + "(w=");
int _weight = this.getWeight();
<%java.lang.String%> _plus_1 = (_plus + <%java.lang.Integer%>.valueOf(_weight));
return (_plus_1 + ")");"/>
- </genClasses>
- <genClasses ecoreClass="hintco.ecore#//RollbackInterpolationAdaptation"/>
- <genClasses ecoreClass="hintco.ecore#//InterpolationAdaptation">
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//InterpolationAdaptation/name"
- get="int _order = this.getOrder();
<%java.lang.String%> _plus = (<%java.lang.Integer%>.valueOf(_order) + "(w=");
int _weight = this.getWeight();
<%java.lang.String%> _plus_1 = (_plus + <%java.lang.Integer%>.valueOf(_weight));
return (_plus_1 + ")");"/>
- </genClasses>
- </genPackages>
- </genmodel:GenModel>
|