How to add a new solver to minizinc?(using ide)

507 views
Skip to first unread message

3906...@qq.com

unread,
Aug 13, 2017, 6:41:16 PM8/13/17
to MiniZinc
On the configuration page, there's is an option to add a new solver.However I find it difficult fill in the blank in a appriapiate way, since the ide always says "Unrecognized option or bad format :D:\GitHub\jacop\src\main\minizinc\org\jacop\minizinc" when running. May anyone tell me the steps to install the following solver?"https://github.com/radsz/jacop".Thanks a lot.非常感谢!

Krzysztof Kuchcinski

unread,
Aug 14, 2017, 6:49:42 AM8/14/17
to MiniZinc
I will give you na example how it works on an Mac. For more details check http://jacopguide.osolpro.com/guideJaCoP.html#x1-620008

First you need to make sure that you have copied JaCoP library into minizinc compiler library directory. To do it copy JaCoP  minizinc  directory (src/jacop/minizinc/org/jacop/minizinc) into the minizinc directory of your minizinc installation and rename it to jacop. This directory is located, for example on Mac at /usr/local/share/minizinc. You need also to create a command that calls JaCoP. For example, as bash script

#!/bin/bash 
exec java -cp jacop.jar org.jacop.fz.Fz2jacop "$@"

Please, note that you need a correct path to jacop.jar in -cp option.

Then you need to define a new solver in minizinc IDE. Open "preferences" and fill the fields as indicated in the attached screen dump. 



Hope it helps,
/Kris

3906...@qq.com

unread,
Aug 14, 2017, 11:53:12 PM8/14/17
to MiniZinc
A very heplful reply. However, as  a Windows10 user, I still find it difficult to follow. When I download JaCoP from sourceforge, I can only find a .jar file, and I don't know how to deal with it. On github repository, I fail to find a file called 'bin'
 or 'fzn-jacop'. I'm wondering how I can get them. Possibly as a Windows user, I'm unable to understand the bash script. Is that work the same way as 'PATH' in windows? Looking forward for your reply~Thanks a lot.
(Maybe poor in English, for I'm a Chinese college student)
在 2017年8月14日星期一 UTC+8下午6:49:42,Krzysztof Kuchcinski写道:

Krzysztof Kuchcinski

unread,
Aug 15, 2017, 7:02:32 AM8/15/17
to MiniZinc
You can download jacop library from sourceforge. Under Files/JaCoP-4.4 you will find file minizinc_jacop_lib.zip. Unzip it and you have the libarary. For using Windows 10 scripts, etc contact experts in Windows. Sorry.

/Kris

3906...@qq.com

unread,
Aug 15, 2017, 8:39:47 PM8/15/17
to MiniZinc
Maybe I do need to contact experts in Windows. Thanks a lot!

在 2017年8月15日星期二 UTC+8下午7:02:32,Krzysztof Kuchcinski写道:
Reply all
Reply to author
Forward
0 new messages