Package org.emftrace.metamodel.QUARCModel.Query

Examples of org.emftrace.metamodel.QUARCModel.Query.PrioritizedDecomposition


  @Test
  public void testGetPriorizedElement() {
    Goal goal = createGoal(gss, 1);
    Goal subgoal = createGoal(gss, 2);
    Decomposition decomposition = createDecomposition(gss, subgoal, goal);
    PrioritizedDecomposition priorizedDecomposition = createPriorizedDecomposition(gssQuery, decomposition, 100);
   
    PrioritizedElement selectedGoal = createSelectedGoal(gssQuery, goal, 100);
    createSelectedGoal(gssQuery, subgoal, 100);

    executeRequiredPhases();
View Full Code Here


  @Test
  public void testGetElement() {
    Goal goal = createGoal(gss, 1);
    Goal subgoal = createGoal(gss, 2);
    Decomposition decomposition = createDecomposition(gss, subgoal, goal);
    PrioritizedDecomposition priorizedDecomposition = createPriorizedDecomposition(gssQuery, decomposition, 100);
   
    PrioritizedElement selectedGoal = createSelectedGoal(gssQuery, goal, 100);
    createSelectedGoal(gssQuery, subgoal, 100);

    executeRequiredPhases();
View Full Code Here

   
    Goal subgoal2 = createGoal(gss, 21);
   
    Decomposition decomposition1 = createDecomposition(gss, subgoal1, goal1);
    Decomposition decomposition2 = createDecomposition(gss, subgoal2, goal1);
    PrioritizedDecomposition priorizedDecomposition1 = createPriorizedDecomposition(gssQuery, decomposition1, 50);
    PrioritizedDecomposition priorizedDecomposition2 = createPriorizedDecomposition(gssQuery, decomposition2, 50);
   
    PrioritizedElement selectedGoal = createSelectedGoal(gssQuery, goal1, 100);
    createSelectedGoal(gssQuery, subgoal1, 50);
    createSelectedGoal(gssQuery, subgoal2, 50);

    executeRequiredPhases();
   
    priorizedElementsCache.setWeight(subgoal1, goal1, 60);
    priorizedElementsCache.setWeight(subgoal2, goal1, 40);
   
    assertEquals("50", priorizedDecomposition1.getWeight()); //must be unchanged until flush() is called
    assertEquals("50", priorizedDecomposition2.getWeight());
   
    assertEquals(new Integer(60) , priorizedElementsCache.getWeight(subgoal1, goal1));
    assertEquals(new Integer(40) , priorizedElementsCache.getWeight(subgoal2, goal1));
  }
View Full Code Here

   
    Goal subgoal2 = createGoal(gss, 21);
   
    Decomposition decomposition1 = createDecomposition(gss, subgoal1, goal1);
    Decomposition decomposition2 = createDecomposition(gss, subgoal2, goal1);
    PrioritizedDecomposition priorizedDecomposition1 = createPriorizedDecomposition(gssQuery, decomposition1, 50);
    PrioritizedDecomposition priorizedDecomposition2 = createPriorizedDecomposition(gssQuery, decomposition2, 50);
   
    PrioritizedElement selectedGoal = createSelectedGoal(gssQuery, goal1, 100);
    createSelectedGoal(gssQuery, subgoal1, 50);
    createSelectedGoal(gssQuery, subgoal2, 50);
View Full Code Here

    Decomposition decomposition1 = createDecomposition(gss, subgoal1, goal1);
    Decomposition decomposition2 = createDecomposition(gss, subgoal2, goal1);
   
   
   
    PrioritizedDecomposition priorizedDecomposition1 = createPriorizedDecomposition(gssQuery, decomposition1, 50);
    PrioritizedDecomposition priorizedDecomposition2 = createPriorizedDecomposition(gssQuery, decomposition2, 50);
   
    Decomposition decomposition3 = createDecomposition(gss, subgoal3, goal2);
    Decomposition decomposition4 = createDecomposition(gss, subgoal4, goal2);
    PrioritizedDecomposition priorizedDecomposition3 = createPriorizedDecomposition(gssQuery, decomposition3, 50);
    PrioritizedDecomposition priorizedDecomposition4 = createPriorizedDecomposition(gssQuery, decomposition4, 50);
   
    PrioritizedElement selectedGoal1 = createSelectedGoal(gssQuery, goal1, 50);
    PrioritizedElement selectedGoal2 = createSelectedGoal(gssQuery, goal2, 50);
   
    Decomposition decomposition5 = createDecomposition(gss, subgoal5, subgoal3);
    Decomposition decomposition6 = createDecomposition(gss, subgoal6, subgoal3);
   
   
    PrioritizedDecomposition priorizedDecomposition5 = createPriorizedDecomposition(gssQuery, decomposition5, 40);
    PrioritizedDecomposition priorizedDecomposition6 = createPriorizedDecomposition(gssQuery, decomposition6, 60);
   
    createSelectedGoal(gssQuery, subgoal1, 25);
    createSelectedGoal(gssQuery, subgoal2, 25);
   
View Full Code Here

  @Test
  public void testGetTarget() {
    Goal goal = createGoal(gss, 1);
    Goal subgoal = createGoal(gss, 2);
    Decomposition decomposition = createDecomposition(gss, subgoal, goal);
    PrioritizedDecomposition priorizedDecomposition = createPriorizedDecomposition(gssQuery, decomposition, 100);
   
    createSelectedGoal(gssQuery, goal, 100);
    createSelectedGoal(gssQuery, subgoal, 100);

    executeRequiredPhases();
View Full Code Here

  @Test
  public void testGetSource() {
    Goal goal = createGoal(gss, 1);
    Goal subgoal = createGoal(gss, 2);
    Decomposition decomposition = createDecomposition(gss, subgoal, goal);
    PrioritizedDecomposition priorizedDecomposition = createPriorizedDecomposition(gssQuery, decomposition, 100);
   
    createSelectedGoal(gssQuery, goal, 100);
    createSelectedGoal(gssQuery, subgoal, 100);

    executeRequiredPhases();
View Full Code Here

  @Test
  public void testGetPriorizedDecompositionWeight() {
    Goal goal = createGoal(gss, 1);
    Goal subgoal = createGoal(gss, 2);
    Decomposition decomposition = createDecomposition(gss, subgoal, goal);
    PrioritizedDecomposition priorizedDecomposition = createPriorizedDecomposition(gssQuery, decomposition, 100);
   
    createSelectedGoal(gssQuery, goal, 100);
    createSelectedGoal(gssQuery, subgoal, 100);

    executeRequiredPhases();
View Full Code Here

    createSelectedGoal(gssQuery, goal1, 100);
    createSelectedGoal(gssQuery, goal2, 100);

    Decomposition decomposition = createDecomposition(gss, goal2, goal1);
    PrioritizedDecomposition priorizedDecomposition = createPriorizedDecomposition(gssQuery, decomposition, 100);


    executeRequiredPhases();

    assertEquals(priorizedDecomposition , priorizedElementsCache.getPrioritizedDecompositionForDecomposition(decomposition));
View Full Code Here

    createSelectedGoal(gssQuery, goal1, 100);
    PrioritizedElement selectedGoal2 = createSelectedGoal(gssQuery, goal2, 100);

    Decomposition decomposition = createDecomposition(gss, goal2, goal1);
    PrioritizedDecomposition priorizedDecomposition = createPriorizedDecomposition(gssQuery, decomposition, 100);


    executeRequiredPhases();

    priorizedElementsCache.markDecompositionAsToRemove(decomposition);
View Full Code Here

TOP

Related Classes of org.emftrace.metamodel.QUARCModel.Query.PrioritizedDecomposition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.