-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
import requests
from comb_spec_searcher import CombinatorialSpecification
from tilings.tilescope import TileScopePack
uri = "https://api.permpal.com/garpur_run/62bc859f67d0aaf5374f1e69"
data = requests.get(uri).json()
pack = TileScopePack.from_dict(data["pack"])
spec = CombinatorialSpecification.from_dict(data["specification"])
spec.sanity_check(0)In [4]: spec.sanity_check(0)
[W 220629 15:49:37 specification:496] Can't sanity check the rule 855 -> (856,), which is
swapping assumptions in cols 1 and 2
+-+-+-+ +-+-+-+
|\|1|2| = |\|1|2|
+-+-+-+ +-+-+-+
1: Av+(120) 1: Av+(120)
2: Av(120) 2: Av(120)
\: Av(01) \: Av(01)
Crossing obstructions: Crossing obstructions:
120: (0, 0), (1, 0), (1, 0) 120: (0, 0), (1, 0), (1, 0)
120: (0, 0), (1, 0), (2, 0) 120: (0, 0), (1, 0), (2, 0)
120: (0, 0), (2, 0), (2, 0) 120: (0, 0), (2, 0), (2, 0)
120: (1, 0), (1, 0), (2, 0) 120: (1, 0), (1, 0), (2, 0)
120: (1, 0), (2, 0), (2, 0) 120: (1, 0), (2, 0), (2, 0)
Requirement 0: Requirement 0:
0: (1, 0) 0: (1, 0)
Assumption 0: Assumption 0:
can count points in cells (0, 0), (2, 0) can count points in cells (0, 0), (1, 0)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~/Dropbox/Research/Active/2017-44-ATRAP/repos/Tilings/tilings/tiling.py in get_assumption_parameter(self, assumption)
1465 decreasing = set()
-> 1466 for ob in self.obstructions:
1467 if ob.is_single_cell():
ValueError: tuple.index(x): x not in tuple
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last)
<ipython-input-4-efb92228bbdf> in <module>
----> 1 spec.sanity_check(0)
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/specification.py in sanity_check(self, length)
487 try:
488 for n in range(length + 1):
--> 489 if not rule.sanity_check(n):
490 return False
491 except NotImplementedError:
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/strategies/rule.py in sanity_check(self, n)
521 try:
522 return (
--> 523 self._sanity_check_count(n)
524 and self._sanity_check_objects(n)
525 and self._sanity_check_random_sample(n)
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/strategies/rule.py in _sanity_check_count(self, n)
537 temp_subterms = self.subterms
538 self.subterms = tuple(child.get_terms for child in self.children)
--> 539 rule_terms = self.get_terms(n)
540 self.subterms = temp_subterms
541 if actual_terms != rule_terms:
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/strategies/rule.py in get_terms(self, n)
226 Return the terms for the given n.
227 """
--> 228 self._ensure_level(n)
229 return self.terms_cache[n]
230
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/strategies/rule.py in _ensure_level(self, n)
476 raise RuntimeError("set_subrecs must be set first")
477 while n >= len(self.terms_cache):
--> 478 terms = self.constructor.get_terms(
479 self.get_terms, self.subterms, len(self.terms_cache)
480 )
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/strategies/rule.py in constructor(self)
826 }
827 for rule in self.rules:
--> 828 original_constructor = rule.constructor
829 assert isinstance(original_constructor, (DisjointUnion, Complement))
830 rules_parameters = original_constructor.extra_parameters[0]
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/strategies/rule.py in constructor(self)
396 if self._constructor is None:
397 self._constructor = self.strategy.constructor(
--> 398 self.comb_class, self.children
399 )
400 if self._constructor is None:
~/Dropbox/Research/Active/2017-44-ATRAP/repos/comb_spec_searcher/comb_spec_searcher/strategies/strategy.py in constructor(self, comb_class, children)
563 comb_class,
564 children,
--> 565 extra_parameters=self.extra_parameters(comb_class, children),
566 )
567
~/Dropbox/Research/Active/2017-44-ATRAP/repos/Tilings/tilings/strategies/point_jumping.py in extra_parameters(self, comb_class, children)
165 ass
166 ): child.get_assumption_parameter(self._swap_assumption(ass))
--> 167 for ass in comb_class.assumptions
168 },
169 )
~/Dropbox/Research/Active/2017-44-ATRAP/repos/Tilings/tilings/strategies/point_jumping.py in <dictcomp>(.0)
165 ass
166 ): child.get_assumption_parameter(self._swap_assumption(ass))
--> 167 for ass in comb_class.assumptions
168 },
169 )
~/Dropbox/Research/Active/2017-44-ATRAP/repos/Tilings/tilings/tiling.py in get_assumption_parameter(self, assumption)
1468 if ob.patt.is_increasing():
1469 increasing.add(ob.pos[0])
-> 1470 if ob.patt.is_decreasing():
1471 decreasing.add(ob.pos[0])
1472 return all(
ValueError: following assumption not on tiling: 'can count points in cells (0, 0), (1, 0)'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels