Commit b1771d67 authored by Sayanti Kundu's avatar Sayanti Kundu
Browse files

Evaluation Matrix using java services for two "Features"

parent 4e5000b5
Pipeline #44753 failed with stages
......@@ -17,11 +17,11 @@
<listing name="Listing"/>
</variationpoint>
<variationpoint xsi:type="otf:FeedbackLoopFacilitator" name="Feedback Loop Facilitator" score="25">
<rating name="Star Rating" weight="2.0" desiredValue="1" derivedRating="true">
<rating name="Star Rating" weight="66.66666666666666" desiredValue="1" derivedRating="true">
<pairedComparison>1.0</pairedComparison>
<pairedComparison>2.0</pairedComparison>
</rating>
<ranking name="Ranking" weight="1.0" desiredValue="1">
<ranking name="Ranking" weight="33.33333333333333" desiredValue="1">
<pairedComparison>0.5</pairedComparison>
<pairedComparison>1.0</pairedComparison>
</ranking>
......@@ -30,6 +30,8 @@
<variant name="C" weight="2.0"/>
<variant name="D" weight="7.5"/>
<variant name="E" weight="2.0"/>
<variant name="X" weight="100.0"/>
<variant name="Feature" weight="100.0"/>
</variationpoint>
<variationpoint name="Name">
<variant name="Feature"/>
......
......@@ -310,22 +310,11 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_MpHUsovwEeiJLpU4YlWxpw"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_MpE4cYvwEeiJLpU4YlWxpw" fontName=".AppleSystemUIFont" fontHeight="8" bold="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_MpE4covwEeiJLpU4YlWxpw" x="772" y="436"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_MpE4covwEeiJLpU4YlWxpw" x="772" y="436" width="327" height="163"/>
</children>
<children xmi:type="notation:Node" xmi:id="_2POocJvQEeiogrvkLeKesA" type="2002" element="_2OmWUJvQEeiogrvkLeKesA">
<children xmi:type="notation:Node" xmi:id="_2PP2kJvQEeiogrvkLeKesA" type="5006"/>
<children xmi:type="notation:Node" xmi:id="_2PP2kZvQEeiogrvkLeKesA" type="7001">
<children xmi:type="notation:Node" xmi:id="_2PREsJvQEeiogrvkLeKesA" type="3007" element="_2PGFkJvQEeiogrvkLeKesA">
<children xmi:type="notation:Node" xmi:id="_2PRrwJvQEeiogrvkLeKesA" type="5003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_2PRrwZvQEeiogrvkLeKesA" y="5"/>
</children>
<children xmi:type="notation:Node" xmi:id="_2PSS0JvQEeiogrvkLeKesA" type="3005" element="_2PGFkZvQEeiogrvkLeKesA">
<styles xmi:type="notation:ShapeStyle" xmi:id="_2PSS0ZvQEeiogrvkLeKesA" fontName=".AppleSystemUIFont"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_2PSS0pvQEeiogrvkLeKesA"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_2PREsZvQEeiogrvkLeKesA" fontName=".AppleSystemUIFont" fontHeight="10" bold="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_2PREspvQEeiogrvkLeKesA" x="219" y="26" width="100" height="55"/>
</children>
<children xmi:type="notation:Node" xmi:id="_2pil4JvQEeiogrvkLeKesA" type="3007" element="_2pXmwJvQEeiogrvkLeKesA">
<children xmi:type="notation:Node" xmi:id="_2pjM8JvQEeiogrvkLeKesA" type="5003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_2pjM8ZvQEeiogrvkLeKesA" y="5"/>
......@@ -348,6 +337,39 @@
<styles xmi:type="notation:ShapeStyle" xmi:id="_3CSdEZvQEeiogrvkLeKesA" fontName=".AppleSystemUIFont" fontHeight="10" bold="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_3CSdEpvQEeiogrvkLeKesA" x="-5" y="18" width="100" height="55"/>
</children>
<children xmi:type="notation:Node" xmi:id="_wMXioMImEeiI2qoYK6Z3dw" type="3007" element="_wK3t0MImEeiI2qoYK6Z3dw">
<children xmi:type="notation:Node" xmi:id="_wNeV4MImEeiI2qoYK6Z3dw" type="5003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_wNe88MImEeiI2qoYK6Z3dw" y="5"/>
</children>
<children xmi:type="notation:Node" xmi:id="_wNpVAMImEeiI2qoYK6Z3dw" type="3005" element="_wK478MImEeiI2qoYK6Z3dw">
<styles xmi:type="notation:ShapeStyle" xmi:id="_wNpVAcImEeiI2qoYK6Z3dw" fontName=".AppleSystemUIFont"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_wNpVAsImEeiI2qoYK6Z3dw"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_wMXiocImEeiI2qoYK6Z3dw" fontName=".AppleSystemUIFont" fontHeight="10" bold="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_wMXiosImEeiI2qoYK6Z3dw" x="328" y="26" width="100" height="55"/>
</children>
<children xmi:type="notation:Node" xmi:id="_eaf0wMIsEeiI2qoYK6Z3dw" type="3007" element="_eZZBgMIsEeiI2qoYK6Z3dw">
<children xmi:type="notation:Node" xmi:id="_eahC4MIsEeiI2qoYK6Z3dw" type="5003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_eahC4cIsEeiI2qoYK6Z3dw" y="5"/>
</children>
<children xmi:type="notation:Node" xmi:id="_eaiRAMIsEeiI2qoYK6Z3dw" type="3005" element="_eZaPoMIsEeiI2qoYK6Z3dw">
<styles xmi:type="notation:ShapeStyle" xmi:id="_eaiRAcIsEeiI2qoYK6Z3dw" fontName=".AppleSystemUIFont"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_eaiRAsIsEeiI2qoYK6Z3dw"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_eaf0wcIsEeiI2qoYK6Z3dw" fontName=".AppleSystemUIFont" fontHeight="10" bold="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_eaf0wsIsEeiI2qoYK6Z3dw" x="460" y="30" width="100" height="55"/>
</children>
<children xmi:type="notation:Node" xmi:id="_km17EMJUEeiIUoydHFM9OA" type="3007" element="_kmLMsMJUEeiIUoydHFM9OA">
<children xmi:type="notation:Node" xmi:id="_km2iIMJUEeiIUoydHFM9OA" type="5003">
<layoutConstraint xmi:type="notation:Location" xmi:id="_km2iIcJUEeiIUoydHFM9OA" y="5"/>
</children>
<children xmi:type="notation:Node" xmi:id="_km3JMMJUEeiIUoydHFM9OA" type="3005" element="_kmLzwMJUEeiIUoydHFM9OA">
<styles xmi:type="notation:ShapeStyle" xmi:id="_km3JMcJUEeiIUoydHFM9OA" fontName=".AppleSystemUIFont"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_km3JMsJUEeiIUoydHFM9OA"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_km17EcJUEeiIUoydHFM9OA" fontName=".AppleSystemUIFont" fontHeight="10" bold="true"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_km17EsJUEeiIUoydHFM9OA" x="-135" y="-66" width="100" height="55"/>
</children>
<styles xmi:type="notation:SortingStyle" xmi:id="_2PP2kpvQEeiogrvkLeKesA"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_2PP2k5vQEeiogrvkLeKesA"/>
</children>
......@@ -758,13 +780,10 @@
<description xmi:type="style:FlatContainerStyleDescription" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']"/>
<ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_2PGFkJvQEeiogrvkLeKesA" name="C(Feature)" tooltipText="Feature" width="10" height="10" resizeKind="NSEW">
<ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_kmLMsMJUEeiIUoydHFM9OA" name="C(Feature)" tooltipText="Feature" width="10" height="10" resizeKind="NSEW">
<target xmi:type="otf:Feature" href="My.otf#//@variationpoint.4/@variant.0"/>
<semanticElements xmi:type="otf:Feature" href="My.otf#//@variationpoint.4/@variant.0"/>
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
<ownedStyle xmi:type="diagram:WorkspaceImage" xmi:id="_2PGFkZvQEeiogrvkLeKesA" labelSize="10" showIcon="false" labelPosition="node" workspacePath="/org.upb.sfb.secoarc.tool/icons/Rating.png">
<ownedStyle xmi:type="diagram:WorkspaceImage" xmi:id="_kmLzwMJUEeiIUoydHFM9OA" labelSize="10" showIcon="false" labelPosition="node" workspacePath="/org.upb.sfb.secoarc.tool/icons/Rating.png">
<labelFormat>bold</labelFormat>
<description xmi:type="style:WorkspaceImageDescription" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']/@subNodeMappings[name='FeatureNode']/@style"/>
</ownedStyle>
......@@ -794,6 +813,30 @@
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']/@subNodeMappings[name='FeatureNode']"/>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_wK3t0MImEeiI2qoYK6Z3dw" name="X(Feature)" tooltipText="Feature" width="10" height="10" resizeKind="NSEW">
<target xmi:type="otf:Feature" href="My.otf#//@variationpoint.4/@variant.3"/>
<semanticElements xmi:type="otf:Feature" href="My.otf#//@variationpoint.4/@variant.3"/>
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
<ownedStyle xmi:type="diagram:WorkspaceImage" xmi:id="_wK478MImEeiI2qoYK6Z3dw" labelSize="10" showIcon="false" labelPosition="node" workspacePath="/org.upb.sfb.secoarc.tool/icons/Rating.png">
<labelFormat>bold</labelFormat>
<description xmi:type="style:WorkspaceImageDescription" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']/@subNodeMappings[name='FeatureNode']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']/@subNodeMappings[name='FeatureNode']"/>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_eZZBgMIsEeiI2qoYK6Z3dw" name="Feature(Feature)" tooltipText="Feature" width="10" height="10" resizeKind="NSEW">
<target xmi:type="otf:Feature" href="My.otf#//@variationpoint.4/@variant.4"/>
<semanticElements xmi:type="otf:Feature" href="My.otf#//@variationpoint.4/@variant.4"/>
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
<ownedStyle xmi:type="diagram:WorkspaceImage" xmi:id="_eZaPoMIsEeiI2qoYK6Z3dw" labelSize="10" showIcon="false" labelPosition="node" workspacePath="/org.upb.sfb.secoarc.tool/icons/Rating.png">
<labelFormat>bold</labelFormat>
<description xmi:type="style:WorkspaceImageDescription" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']/@subNodeMappings[name='FeatureNode']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='ElementDiagram']/@defaultLayer/@containerMappings[name='VariationPoint']/@subNodeMappings[name='FeatureNode']"/>
</ownedDiagramElements>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_cPcQ4LgEEeiCfP0nK9jzrw" name="Name">
<target xmi:type="otf:VariationPoint" href="My.otf#//@variationpoint.5"/>
......@@ -933,7 +976,7 @@
<target xmi:type="otf:Rating" href="My.otf#//@variationpoint.3/@rating.0"/>
<semanticElements xmi:type="otf:Rating" href="My.otf#//@variationpoint.3/@rating.0"/>
</cells>
<cells xmi:type="table:DCell" xmi:id="_z3Ql0rf7EeiCfP0nK9jzrw" label="[66.66666666666666]" column="_z3Ql0Lf7EeiCfP0nK9jzrw">
<cells xmi:type="table:DCell" xmi:id="_fm78cMJdEeiIUoydHFM9OA" label="66.66666666666666" column="_O0qjcLgoEei4irQNg4qrgA">
<target xmi:type="otf:Rating" href="My.otf#//@variationpoint.3/@rating.0"/>
<semanticElements xmi:type="otf:Rating" href="My.otf#//@variationpoint.3/@rating.0"/>
</cells>
......@@ -951,7 +994,7 @@
<target xmi:type="otf:Ranking" href="My.otf#//@variationpoint.3/@ranking.0"/>
<semanticElements xmi:type="otf:Ranking" href="My.otf#//@variationpoint.3/@ranking.0"/>
</cells>
<cells xmi:type="table:DCell" xmi:id="_z3U3QLf7EeiCfP0nK9jzrw" label="[33.33333333333333]" column="_z3Ql0Lf7EeiCfP0nK9jzrw">
<cells xmi:type="table:DCell" xmi:id="_hqIKsML2Eeioq_sT5MztFw" label="33.33333333333333" column="_O0qjcLgoEei4irQNg4qrgA">
<target xmi:type="otf:Ranking" href="My.otf#//@variationpoint.3/@ranking.0"/>
<semanticElements xmi:type="otf:Ranking" href="My.otf#//@variationpoint.3/@ranking.0"/>
</cells>
......@@ -960,12 +1003,12 @@
<columns xmi:type="table:DFeatureColumn" xmi:id="_RwVk4LcsEei2is2OEVAeHw" label="Rating" cells="_RwWL8LcsEei2is2OEVAeHw _RwWL8bcsEei2is2OEVAeHw" width="75" featureName="pairedComparison">
<originMapping xmi:type="description_3:FeatureColumnMapping" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='Evaluation%20Table']/@ownedColumnMappings[name='Rating%20Column%20Edition']"/>
</columns>
<columns xmi:type="table:DFeatureColumn" xmi:id="_VQlYgLcsEei2is2OEVAeHw" label="Ranking" cells="_VQlYgbcsEei2is2OEVAeHw _VQlYgrcsEei2is2OEVAeHw" width="96" featureName="pairedComparison">
<columns xmi:type="table:DFeatureColumn" xmi:id="_VQlYgLcsEei2is2OEVAeHw" label="Ranking" cells="_VQlYgbcsEei2is2OEVAeHw _VQlYgrcsEei2is2OEVAeHw" width="30" featureName="pairedComparison">
<originMapping xmi:type="description_3:FeatureColumnMapping" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='Evaluation%20Table']/@ownedColumnMappings[name='Ranking%20Column%20Edition']"/>
</columns>
<columns xmi:type="table:DFeatureColumn" xmi:id="_z3Ql0Lf7EeiCfP0nK9jzrw" label="weight" cells="_z3Ql0rf7EeiCfP0nK9jzrw _z3U3QLf7EeiCfP0nK9jzrw" width="127" featureName="weight">
<columns xmi:type="table:DFeatureColumn" xmi:id="_O0qjcLgoEei4irQNg4qrgA" label="weight" cells="_fm78cMJdEeiIUoydHFM9OA _hqIKsML2Eeioq_sT5MztFw" width="650" featureName="weight">
<originMapping xmi:type="description_3:FeatureColumnMapping" href="platform:/resource/org.upb.sfb.secoarc.tool/description/project.odesign#//@ownedViewpoints[name='Store-oriented%20SECO']/@ownedRepresentations[name='Evaluation%20Table']/@ownedColumnMappings[name='Weight%20Column%20Edition']"/>
<currentStyle xmi:type="table:DTableElementStyle" xmi:id="_z3Ql0bf7EeiCfP0nK9jzrw" labelSize="12" defaultForegroundStyle="true">
<currentStyle xmi:type="table:DTableElementStyle" xmi:id="_O0qjcbgoEei4irQNg4qrgA" labelSize="12" defaultForegroundStyle="true">
<labelFormat>bold</labelFormat>
</currentStyle>
</columns>
......
......@@ -1114,7 +1114,6 @@
<subModelOperations xsi:type="tool:ChangeContext" browseExpression="var:instance">
<subModelOperations xsi:type="tool:CreateInstance" typeName="otf::Feature" referenceName="variant">
<subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="Feature"/>
<subModelOperations xsi:type="tool:SetValue" featureName="weight" valueExpression="service:setFeatureWeight"/>
</subModelOperations>
</subModelOperations>
</subModelOperations>
......@@ -1123,7 +1122,6 @@
<cases conditionExpression="[self.oclIsTypeOf(otf::VariationPoint) = true/]">
<subModelOperations xsi:type="tool:CreateInstance" typeName="otf::Feature" referenceName="variant">
<subModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="Feature"/>
<subModelOperations xsi:type="tool:SetValue" featureName="weight" valueExpression="service:setFeatureWeight"/>
</subModelOperations>
</cases>
</firstModelOperations>
......@@ -1191,15 +1189,7 @@
</ownedLineMappings>
<ownedColumnMappings name="Rating Column Edition" headerLabelExpression="Rating" featureName="pairedComparison" labelExpression="[self.pairedComparison->at(1)/]"/>
<ownedColumnMappings name="Ranking Column Edition" headerLabelExpression="Ranking" featureName="pairedComparison" labelExpression="[self.pairedComparison->at(2)/]"/>
<ownedColumnMappings name="Weight Column Edition" headerLabelExpression="weight" featureName="weight" labelExpression="aql:Sequence{((self.pairedComparison->at(1)/(Sequence{self.siblings().eGet('pairedComparison')->at(1),self.pairedComparison->at(1)}->sum())+(self.pairedComparison->at(2)/(Sequence{self.siblings().eGet('pairedComparison')->at(2),self.pairedComparison->at(2)}->sum())}->sum()*50.0">
<directEdit>
<variables name="weight" documentation="The semantic currently edited element."/>
<variables name="table" documentation="The current DTable."/>
<variables name="line" documentation="The DLine of the current DCell."/>
<variables name="lineSemantic" documentation="The semantic element corresponding to the line."/>
<variables name="root" documentation="The semantic root element of the table."/>
<mask mask="{0}"/>
</directEdit>
<ownedColumnMappings name="Weight Column Edition" headerLabelExpression="weight" featureName="weight" labelExpression="service: setRatingWeight()">
<defaultForeground>
<labelFormat>bold</labelFormat>
<foreGroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
......
package my.otf.project.design;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.sirius.description.contribution.EObjectReference;
import org.upb.sfb.otf.BusinessRelation;
import org.upb.sfb.otf.Feature;
import org.upb.sfb.otf.IndependentDeveloper;
import org.upb.sfb.otf.PlatformUsageFee;
import org.upb.sfb.otf.Ranking;
import org.upb.sfb.otf.Rating;
import org.upb.sfb.otf.StoreOrientedSoftwareEcosystem;
import org.upb.sfb.otf.User;
import org.upb.sfb.otf.impl.PlatformUsageFeeImpl;
......@@ -22,23 +26,39 @@ public class Services {
/**
* See http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Findex.html&cp=24 for documentation on how to write service methods.
*/
double WeightConstant1;
double WeightConstant2;
public EObject myService(EObject self, String arg) {
// TODO Auto-generated code
return self;
}
public IndependentDeveloper getNumber(PlatformUsageFee platformUsageFee) {
//platformUsageFee.setAmount(100);
//User user = OtfFactory.eINSTANCE.createUser();
IndependentDeveloper ind2 = OtfFactory.eINSTANCE.createIndependentDeveloper();
ind2.setName("Independent2");
return ind2;
}
public double setFeatureWeight(Feature feature) {
/*public double setFeatureWeight(Feature feature) {
double WeightConstant = 100.00;
feature.setWeight(WeightConstant);
return WeightConstant;
}*/
public Double setRatingWeight(Feature inputfeature) {
//String str = rating.getClass().toString();
double i = inputfeature.eContainer().eContents().size();
//Get both the features from parent = "Feedbackloopfacilitator" and their paired comparison values
//List<Feature> featurelist = (List<Feature>)(List<?>)inputfeature.eContainer().eContents();
Feature feature1 = (Feature) inputfeature.eContainer().eContents().get(0);
Feature feature2 = (Feature) inputfeature.eContainer().eContents().get(1);
double inputfeatureweight1 = inputfeature.getPairedComparison().get(0);
double inputfeatureweight2 = inputfeature.getPairedComparison().get(1);
double feature1weight1 = feature1.getPairedComparison().get(0);
double feature2weight1 = feature2.getPairedComparison().get(0);
double feature1weight2 = feature1.getPairedComparison().get(1);
double feature2weight2 = feature2.getPairedComparison().get(1);
WeightConstant1 = feature1weight1 + feature2weight1;
WeightConstant2 = feature1weight2 + feature2weight2;
double WeightConstant = ((inputfeatureweight1/WeightConstant1) + (inputfeatureweight2/WeightConstant2)) * (1/i)*100;
inputfeature.setWeight(WeightConstant);
return WeightConstant;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment