conjure-cp / conjure

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

solution not being copied if parameter file path contains '/' #578

Closed ott2 closed 1 year ago

ott2 commented 1 year ago

Related to issue #570 the solution is not copied if the path to the parameter file contains a '/'. Expanding on my post-closing comment on that issue:

Current head has a solution copying problem if one specifies a pathname for a parameter file that includes a directory separator.

conjure solve tmp/test.essence tmp/test.param fails to copy the solution file, whereas conjure solve tmp/test1.essence works fine, with an unparameterised spec.

Specifically, with:

given a : int(1..)
find b : bool
such that b = (a < 100)

and a parameter file

letting a be 50

we get

conjure solve essence/tmp.essence essence/tmp.param
Generating models for essence/tmp.essence
Generated models: model000001.eprime
Saved under: conjure-output
Savile Row: model000001.eprime essence/tmp.param
Running minion for domain filtering.
Running solver: minion

while with

letting a be 50
find b : bool
such that b = (a < 100)

we get

conjure solve essence/tmp1.essence
Generating models for essence/tmp1.essence
Generated models: model000001.eprime
Saved under: conjure-output
Savile Row: model000001.eprime
Running minion for domain filtering.
Running solver: minion
Copying solution to: essence/tmp1.solution
ozgurakgun commented 1 year ago

Let me know if this works please @ott2