mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2025-12-13 04:50:25 +00:00
Skip model sizes 2-5 and 7 when conjunction, disjunction, and negation are defined
This commit is contained in:
parent
ea0b487528
commit
f799a1ff5d
3 changed files with 18 additions and 13 deletions
6
vsp.py
6
vsp.py
|
|
@ -28,7 +28,7 @@ Subalgebra 2: {set_to_str(self.subalgebra2)}
|
|||
"""
|
||||
|
||||
def has_vsp(model: Model, impfunction: ModelFunction,
|
||||
negation_defined: bool) -> VSP_Result:
|
||||
negation_defined: bool, conjunction_disjunction_defined: bool) -> VSP_Result:
|
||||
"""
|
||||
Checks whether a model has the variable
|
||||
sharing property.
|
||||
|
|
@ -38,6 +38,10 @@ def has_vsp(model: Model, impfunction: ModelFunction,
|
|||
if len(model.designated_values) == 1:
|
||||
return VSP_Result(False, model.name)
|
||||
|
||||
if len(model.carrier_set) in [2,3,4,5,7] \
|
||||
and conjunction_disjunction_defined and negation_defined:
|
||||
return VSP_Result(False, model.name)
|
||||
|
||||
assert model.ordering is not None, "Expected ordering table in model"
|
||||
|
||||
top = model.ordering.top()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue