Closed WPettersson closed 5 months ago
Hi William,
I made a fix in 16-file-format-descriptions-seem-off branch . Could you tell me if it works. I have to check with @jeremyomer how to merge this in the master branch because for now, it breaks the original behaviour.
PS: I'm one of the maintainer but I did not develop this package.
Sorry for the delay, but yes, that change does work for me, thank you :)
Sorry, but I noticed another potential issue. You are pulling the name of the dat file from the wmd file, but if the path to the wmd file is something like path/to/instance.wmd
then the wmd file will probably just reference instance.dat
but without the path.
Or in other words, if the wmd and dat file are both not in the current directory, then the .dat file won't be opened correctly.
I tested this with
julia KEPTestBPPICEF.jl data/preflib/00036-00000001 3 2
where the current working directory is the base of this git repo, and I have downloaded the relevant preflib instance to data/preflib
You are absolutely right about the related files .dat, I have to prepend the path.
As mentioned in README, the files must be in data directory but you don't have to put it in the path.
It is not obvious though.
julia KEPTestBPPICEF.jl preflib/00036-00000001 3 2
I'm trying to test KidneyExchange.jl on some instances I have that are not from PrefLib. I read https://jeremyomer.github.io/KidneyExchange.jl/dev/functions/#KidneyExchange.read_kep_file-Tuple%7BAbstractString,%20AbstractString%7D to understand the file formats (which agrees with what I would expect from PrefLib), but then reading https://github.com/jeremyomer/KidneyExchange.jl/blob/a7ccc09a86b83d98ef0fed572a6f9c00395c10a3/src/instance/io_kep_file.jl#L74 would imply the first line of the WMD file should have number of vertices and edges separated by a comma. This doesn't agree with the earlier documentation. Indeed, checking https://github.com/jeremyomer/KidneyExchange.jl/blob/master/data/tests_chains/MD-00001-00000015.wmd shows me that the wmd files in this repository seem to have a slightly different format (no comment lines, first line shows number of vertices and edges, followed by names of vertices, then list of edges).
Afterwards, I just tried running an actual PrefLib instance, and received the following
Is there a particular trick to reading instances from .wmd/.dat files? The stack trace would seem to imply the correct function is called but I'm not sure.