Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes modelling function as a relation #664

Open
N-J-Martin opened this issue Aug 24, 2024 · 2 comments
Open

Crashes modelling function as a relation #664

N-J-Martin opened this issue Aug 24, 2024 · 2 comments

Comments

@N-J-Martin
Copy link
Contributor

I tried to run conjure modelling --portfolio=10 essenceDir/modellingTest.essence
with modellingTest.essence containing

find y:function int(1..10) --> int(10..20)
find z:set of int(1..5) 

The program crashed, producing the output in errormessage.txt

This might be related to when conjure ide --dump-representations is run, y has 3 options:

{"name": "y",
  "representations":
      [{"answer": 1, "description": "function {Function1DPartial} int(1..10) --> int(10..20)"},
       {"answer": 2, "description": "function {FunctionNDPartialDummy} int(1..10) --> int(10..20)"},
       {"answer": 3, "description": "function {FunctionAsRelation[RelationAsMatrix]} int(1..10) --> int(10..20)"}]}

but whenconjure modelling is run, only 2 options are permitted:

 Answer 1: choose-repr: Choosing representation for y:
                            function {Function1DPartial} int(1..10) -->
                                int(10..20)
 Answer 2: choose-repr: Choosing representation for y:
                            function {FunctionNDPartialDummy} int(1..10) -->
                                int(10..20)
@ozgurakgun
Copy link
Collaborator

I suspect this is to do with --representation-levels=on/off. There are probably two different (and conflicting) defaults.

Thanks for the report though, it's a big nevertheless, of course.

@N-J-Martin
Copy link
Contributor Author

You're right! I tried conjure modelling with representation-levels off, and was presented with the 3rd option for y. It crashed as above when I tried to use the option.
Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants