Changeset 51
- Timestamp:
- 12/11/09 06:06:09 (15 years ago)
- Location:
- java/ecj/framsticks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
java/ecj/framsticks/FramsticksUtils.java
r50 r51 13 13 import cecj.interaction.RealValuedResult; 14 14 import cecj.utils.Pair; 15 16 15 import ec.EvolutionState; 17 16 import ec.util.Parameter; … … 21 20 private static final String NEW_CMD = "%s \"getsimplest 1\" -q"; 22 21 private static final String EVAL_CMD = "%s \"ex %s\" \"eval %s %s\" -q"; 23 private static final String MUTATE_CMD = "%s rnd \"mutate %s\" -q";22 private static final String MUTATE_CMD = "%s rnd mut -q < %s"; 24 23 private static final String XOVER_CMD = "%s rnd \"crossover %s %s\" -q"; 25 24 … … 80 79 state.output.fatal("No executable command specified", def.push(P_EXECUTABLE_COMMAND)); 81 80 } 82 81 83 82 debug = state.parameters.getBoolean(null, def.push(P_DEBUG), false); 84 83 } … … 88 87 System.err.println("Executing command : " + command); 89 88 } 90 89 91 90 String result = new String(); 92 91 try { 93 92 File f = new File(directoryPath); 94 Process p = Runtime.getRuntime().exec(directoryPath + command, null, f); 93 Process p = Runtime.getRuntime().exec( 94 new String[] { "cmd.exe", "/C", directoryPath + command }, null, f); 95 95 BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); 96 96 result = readInput(input); … … 126 126 return result; 127 127 } 128 128 129 129 private String readInput(BufferedReader input) { 130 130 StringBuilder result = new StringBuilder(); 131 131 132 132 try { 133 133 String line; … … 140 140 } 141 141 142 // Delete last newline character142 // Delete last newline character 143 143 if (result.length() > 0) { 144 144 return result.substring(0, result.length() - 1); -
java/ecj/framsticks/framsticks.params
r48 r51 53 53 breed.elite.0 = 2 54 54 55 framsticks.debug = true55 framsticks.debug = false 56 56 framsticks.directory-path = C:/Framsticks/ 57 57 framsticks.scripts-output = C:/Framsticks/scripts_output/genosEval.txt
Note: See TracChangeset
for help on using the changeset viewer.