diff --git a/flamapy/metamodels/pysat_metamodel/operations/pysat_satisfiable_configuration.py b/flamapy/metamodels/pysat_metamodel/operations/pysat_satisfiable_configuration.py index fc550a0..3763f54 100644 --- a/flamapy/metamodels/pysat_metamodel/operations/pysat_satisfiable_configuration.py +++ b/flamapy/metamodels/pysat_metamodel/operations/pysat_satisfiable_configuration.py @@ -36,22 +36,23 @@ def execute(self, model: VariabilityModel) -> 'PySATSatisfiableConfiguration': assumptions = [] for feature, selected in self.configuration.elements.items(): if selected: - assumptions.append(sat_model.variables[feature.name]) + assumptions.append(sat_model.variables[feature]) else: - assumptions.append(-sat_model.variables[feature.name]) + assumptions.append(-sat_model.variables[feature]) else: - missing_features = [feature for feature in self.configuration.elements.keys() if feature.name not in sat_model.variables.keys()] + missing_features = [feature for feature in self.configuration.elements.keys() if feature not in sat_model.variables.keys()] if missing_features: - print("The features that are missing are:", [feature.name for feature in missing_features]) + print("The features that are missing are:", [feature for feature in missing_features]) print("The feature model contains the following features:", list(sat_model.variables.keys())) self.result = False return self - - print(self.configuration.elements.items()) + + assumptions = [] for feature in sat_model.features.values(): - if self.configuration.has(feature): + + if feature in self.configuration.elements.keys(): assumptions.append(sat_model.variables[feature]) else: assumptions.append(-sat_model.variables[feature]) diff --git a/setup.py b/setup.py index c1259c2..199d2b1 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name="flamapy-sat", - version="2.0.0.dev0", + version="2.0.0.dev1", author="Flamapy", author_email="flamapy@us.es", description="flamapy-sat is a plugin to flamapy module", @@ -22,9 +22,9 @@ ], python_requires='>=3.9', install_requires=[ - 'flamapy-fw~=2.0.0.dev0', - 'flamapy-fm~=2.0.0.dev0', - 'python-sat>=0.1.7.dev6' + 'flamapy-fw~=2.0.0.dev1', + 'flamapy-fm~=2.0.0.dev1', + 'python-sat>=0.1.7.dev1' ], extras_require={ 'dev': [ @@ -36,6 +36,6 @@ ] }, dependency_links=[ - 'flamapy~=1.6.0.dev0', + 'flamapy~=2.0.0.dev1', ] )