v0.3.5.20-01-2014
A backend for ClaferMooViz that uses ChocoSolver to solve single-objective optimization problems. This project is a wrapper that invokes ChocoSolver in a proper way and produces the output in the same format as ClaferMoo does.
- Alexandr Murashkin, MMath Candidate. Main developer.
- Jimmy Liang, MSc. Candidate. Ports to Java 1.7 and Choco3.
Binary distributions of the release 0.3.5 of Clafer Tools for Windows, Mac, and Linux, can be downloaded from Clafer Tools - Binary Distributions.
The binary for this project is called claferchocosoo-0.3.5-jar-with-dependencies.jar
.
In case this binary does not work on your particular machine configuration, it can be built from source code, as described further.
- Java 6+.
- Clafer Compiler. Required for compiling Clafer files (
.cfr
) into the Clafer Choco Javascript format (.js
), so that they can be run using the tool.
First, use Clafer Compiler:
clafer --mode=choco <file-name.cfr>
This will convert the Clafer file (.cfr
) into the Clafer Choco Javascript file (.js
).
Next, run the optimization:
java -jar claferchocosoo-0.3.5-jar-with-dependencies.jar <file-name.js>
This will run the solver and produce optimal instances in a textual form. Only Clafer files with single objective can be processed at this time.
To get the tool version:
java -jar claferchocosoo-0.3.5-jar-with-dependencies.jar --version
- Install ClaferMooVisualizer.
- Copy the binary
claferchocosoo-0.3.5-jar-with-dependencies.jar
to theBackends
folder. If you built the project from the source code, the binary can be found in thetarget
subfolder. - Put (if exists, just make sure all paths match) the following configuration in the
Server/Backends/backends.json
:
{
"backends": [
....
,
{
"id": "choco_single",
"label": "Choco (single objective only)",
"tooltip": "A new Choco solver, for single objective optimization only",
"accepted_format": "choco",
"tool": "java",
"tool_args": ["-jar", "$dirname$/claferchocosoo-0.3.5-jar-with-dependencies.jar", "$filepath$"],
"tool_version_args": ["-jar", "$dirname$/claferchocosoo-0.3.5-jar-with-dependencies.jar", "--version"] },
....
]
}
$dirname$
means the full path to the Server/Backends folder, $filepath$
is the full path to the input JS file being processed.
- If you made any changes to the
backends.json
, then restart ClaferMooVisualizer. - Now the backend should be accessible in ClaferMooVisualizer and listed in the
Backends
dropdown list.
- Maven 2+. Required for building the projects and linking all dependencies
- ChocoSolver. This is a Maven dependency for the project, so it should be installed (
mvn install
) as well.
- Using Maven, run:
mvn install
over the project. - Two binaries will appear in the
target
subfolder:claferchocosoo-0.3.5-jar-with-dependencies.jar
that is standalone and contains all the required dependencies, andclaferchocosoo-0.3.5.jar
that is not.
All related projects are following the simultaneous release model.
The branch master
contains releases, whereas the branch develop
contains code under development.
When building the tools, the branches should match.
Releases from branches master
are guaranteed to work well together.
Development versions from branches develop
should work well together but this might not always be the case.
- See language's website for news, technical reports and more
- Check out a Clafer tutorial
- Try a live instance of ClaferWiki
- Try a live instance of ClaferIDE
- Try a live instance of ClaferConfigurator
- Try a live instance of ClaferMooVisualizer
- Take a look at (incomplete) Clafer wiki
- Browse example models in the test suite and MOO examples
- Post questions, report bugs, suggest improvements GSD Lab Bug Tracker. Tag your entries with
claferchocosoo
(so that we know what they are related to) and withalexander-murashkin
ormichal
(so that Alex or Michał gets a notification).