You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a tiny part of a model that constructs a set Valid (intended to be all prefixes of sequences in Subs).
Is the issue that you might have int(0..-1) for the length-0 prefixes?
language ESSENCE 1.3.0
$ Number of subscribers
given nSubs : int(1..)
letting Digit be domain int(0..9)
given Subs : matrix [ int(1..nSubs) ] of sequence of Digit
$ Shame there is no set comprehension. Needs toSet here.
letting Valid be toSet([ [ s(j) | j : int(0..i) ] | s <- Subs, i : int(-1..|s|) ])
And this is what happens if you put it into Conjure:
conjure: This should never happen, sorry!
However, it did happen, so it must be a bug. Please report it to us!
Conjure is actively maintained, we will get back to you as soon as possible.
You can help us by providing a minimal failing example.
Also include the repository version for this build: 008667d6a (2023-06-01 09:38:43 +0100)
Issue tracker: http://github.com/conjure-cp/conjure/issues
BUGFAIL at rule_ChooseReprForLocals
domainSizeOf infinite range: 1..
CallStack (from HasCallStack):
error, called at src/Conjure/Bug.hs:17:15 in conjure-cp-2.5.0-J7nVvZRONHz6Zg6XNQCcrd:Conjure.Bug
bug, called at src/Conjure/Bug.hs:39:21 in conjure-cp-2.5.0-J7nVvZRONHz6Zg6XNQCcrd:Conjure.Bug
The text was updated successfully, but these errors were encountered:
Hi Pete. Hard to know. As far as I can see for the toSet at the top level Conjure tries to create a top level decision variable which is unlikely to be what you want. How do you plan to use Valid in the rest of the model? If you send me a fuller model I can take another look.
The constraint that uses Valid just says something like "s in Valid -> ...." where s is a sequence decision variable. imagine s is the sequence of digits that someone dialled so far, and if that sequence is not in Valid then they are not going to be able to complete dialling a valid number.
Hi Oz,
Here's a tiny part of a model that constructs a set Valid (intended to be all prefixes of sequences in Subs).
Is the issue that you might have int(0..-1) for the length-0 prefixes?
And this is what happens if you put it into Conjure:
The text was updated successfully, but these errors were encountered: