Skip to content

Instantly share code, notes, and snippets.

@jackjackk
Last active August 24, 2018 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackjackk/c4fc2a3e9ab911ca474cafb3468e6fda to your computer and use it in GitHub Desktop.
Save jackjackk/c4fc2a3e9ab911ca474cafb3468e6fda to your computer and use it in GitHub Desktop.
Moeaframework and WFG
org.moeaframework.core.indicator.hypervolume = wfg2 {2}
org.moeaframework.core.indicator.hypervolume_inverted = true
PATH_WFG := "$(HOME)/tools/moea-framework/hypervolume/WFG"
PATH_WFG_CONFIG := "$(PATH_WFG)/global.properties"
PATH_MOEA_JAR := "$(HOME)/tools/moea-framework/dist/MOEAFramework-2.12-Demo.jar"
BIN_JAVA_MOEA := PATH="$(PATH_WFG):$${PATH}"; java -Dorg.moeaframework.configuration=$(PATH_WFG_CONFIG) -classpath "$(PATH_MOEA_JAR)"
MOEA_CMD := org.moeaframework.analysis.sensitivity.ExtractData
MOEA_CMD_ARGS := -e 0.01,0.001,0.001,0.001 -r ref_file.reference -d 4 NFE ElapsedTime SBX DE PCX SPX UNDX UM Improvements Restarts +hypervolume
output.metrics: solutions.set
$(BIN_JAVA_MOEA) $(MOEA_CMD) -i $< -o $@ $(MOEA_CMD_ARGS) | tee $@.log
[ -s $@.log ] || rm -v $@.log
@jackjackk
Copy link
Author

  • make sure WFG is compiled
  • save the global.properties somewhere (e.g. inside WFG path)
  • save the makefile in your working dir
  • update all paths in the makefile to reflect your configuration
  • update the call to moeaframework to your needs (I used ExtractData, it might work different for other commands)
  • assuming a solutions.set and a ref_file.reference are in your working dir, type "make output.metrics"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment