Estimated number of configurations
Description: Provides an estimate of the total number of different configurations that can be produced from a feature model by considering all possible combinations of features.
Application: Useful for assessing the variability and potential complexity of the product line.
Example: A feature model with numerous optional and alternative features will have a high estimated number of configurations.
Code Examples
Command line usage
flamapy estimated_number_of_configurations "path/to/feature/model"
Python easy to use facade usage
from flamapy.interfaces.python.flamapy_feature_model import FLAMAFeatureModel
# Load the feature model
fm = FLAMAFeatureModel("path/to/feature/model")
# Identify atomic sets
operation = fm.estimated_number_of_configurations()
print(operation)
Python flamapy framework usage
from flamapy.core.discover import DiscoverMetamodels
# Initiallize the dicover metamodel
dm = DiscoverMetamodels()
# Call the operation. Transformations will be automatically executed
result = dm.use_operation_from_file("FMEstimatedConfigurationsNumber","path/to/feature/model")
print(result)
Python flamapy framework ADVANCED usage
from flamapy.core.discover import DiscoverMetamodels
# Initiallize the dicover metamodel
dm = DiscoverMetamodels()
# Get the fm metamodel representation using the transformation
# required to get to the fm metamodel
feature_model = dm.use_transformation_t2m("path/to/feature/model",'fm')
# Call the operation, no automatic transformations will be needed
result = dm.use_operation(feature_model,'FMEstimatedConfigurationsNumber').get_result()
print(result)