Esempio n. 1
0
 def __init__(self, obj, connection, subsystem_from, subsystem_to):
     Coupling.__init__(self, obj, connection, subsystem_from, subsystem_to)
    
     obj.addProperty("App::PropertyFloat", "Area", "Surface", "Area of the connecting surface.")
     obj.setEditorMode("Area", 1)
     
     obj.addProperty("App::PropertyFloat", "CriticalFrequency", "Coupling", "Critical frequency.")
     obj.setEditorMode("CriticalFrequency", 1)
     
     obj.addProperty("App::PropertyFloatList", "RadiationEfficiency", "Coupling", "Radiation effiency.")
     obj.setEditorMode("RadiationEfficiency", 1)
     self.calc_area(obj)
Esempio n. 2
0
 def execute(self, obj):
     Coupling.execute(self, obj)
Esempio n. 3
0
 def onChanged(self, obj, prop):
     Coupling.onChanged(self, obj, prop)
Esempio n. 4
0
 def __init__(self, obj, connection, subsystem_from, subsystem_to):
     Coupling.__init__(self, obj, connection, subsystem_from, subsystem_to)
Esempio n. 5
0
 def add_coupling(self, source_port, source, target_port, target):
     # Both input and output ports are appended to the coupling list
     self.coupling_list.append(
         Coupling(source_port, source, target_port, target))
Esempio n. 6
0
 def execute(self, obj):
     Coupling.execute(self, obj)
     self.calc_area(obj)
Esempio n. 7
0
 def onChanged(self, obj, prop):
     Coupling.onChanged(self, obj, prop)
     
     if prop == 'Area':
         obj.Proxy.area = obj.Area
Esempio n. 8
0
 def execute(self, obj):
     Coupling.execute(self, obj)
Esempio n. 9
0
 def onChanged(self, obj, prop):
     Coupling.onChanged(self, obj, prop)
Esempio n. 10
0
 def __init__(self, obj, connection, subsystem_from, subsystem_to):
     Coupling.__init__(self, obj, connection, subsystem_from, subsystem_to)
Esempio n. 11
0
# Step 1: Extract Model
from Stability import Stability

fact_extractor = FactExtractor("Test_Classes/")
# fact_extractor = FactExtractor("source_files/")
model = fact_extractor.make_model()

# Step 2: Classify

# Test step for fitness calculation
ipc = 0
rfc = 0
tcc = 0
ich = 0
lcom5 = 0
wmc = 0
nom = 0
instability = 0
for c in model:
    rfc += Coupling.get_RFC(c)
    ipc += Coupling.get_ICP(c)
    tcc += Cohesion.get_TCC(c)
    ich += Cohesion.get_ICH(c)
    lcom5 += Cohesion.get_LCOM5(c)
    # wmc += Complexity.get_WMC(c)
    nom += Complexity.get_NOM(c)
    instability += Stability.get_instability(c, model)
print(model)