conjure-cp / conjure

Conjure: The Automated Constraint Modelling Tool
Other
94 stars 20 forks source link

Change in JSON output -- possibly #638

Closed pwn1 closed 6 months ago

pwn1 commented 6 months ago

For the PPP problem, Athanor now complains that it can't parse this:

{"Op":{"MkOpImage":[{"Reference":[{"Name":"crew"},null]},{"Reference":[{"Name":"b"},null]}]}}

I think the issue must be coming from the problem class file, looks like "crew(b)". Not sure if the issue should be filed with Athanor or Conjure. I guess the JSON output of Conjure changed slightly and Athanor didn't catch up.

Here's the PPP spec we're using:

language Essence 1.3
$ prob013.essence: Progressive Party Problem
$ Problem details available at http://www.csplib.org/Problems/prob013/

given n_boats, n_periods : int(1..)

letting Boat be domain int(1..n_boats)

given capacity, crew : function (total) Boat --> int(1..)

find hosts : set (minSize 1) of Boat,
     sched : set (size n_periods) of partition from Boat
minimising |hosts|
$hosts stay on their own boat
such that forAll p in sched . |parts(p)| = |hosts| /\
    forAll part in parts(p) . |part intersect hosts| = 1
$    allDiff([party(h,p) | h <- hosts])

$ Hosts have the capacity to support the visiting crews
such that forAll p in sched . forAll h in hosts .
    (sum b in party(h,p) . crew(b)) <= capacity(h)

such that
allDiff([(i,j) | p <- sched, part <- p,i,j <- part, i < j])

@SaadAttieh this could be an Athanor issue.

pwn1 commented 6 months ago

Never mind, I fixed this with a small change to athanor's parser.