Browse Source

minor label edits

Rolf Egert 2 years ago
parent
commit
04d8c7d04b

+ 11 - 11
src/addOns/InformationPanel.java

@@ -131,23 +131,23 @@ public class InformationPanel implements AddOn {
 		
 		
 
-		entryList.add(new Entry(() -> Integer.toString(amountHolonObjects), "HolonObjects", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountHolonObjects), "Holon Objects", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountConsumer) + addPercentage(amountConsumer, amountHolonObjects), "\tConsumer", middle));
-		entryList.add(new Entry(() -> Integer.toString(amountUnderSupplied) + addPercentage(amountUnderSupplied, amountConsumer), "\t\tUnderSupplied", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountUnderSupplied) + addPercentage(amountUnderSupplied, amountConsumer), "\t\tUnsupplied", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountPatiallySupplied) + addPercentage(amountPatiallySupplied, amountConsumer), "\t\tPatiallySupplied", middle));
 		entryList.add(new StatEntry(() -> StatToFancyString(partiallySuppliedStats), middle));		
 		entryList.add(new Entry(() -> Integer.toString(amountFullySupplied) + addPercentage(amountFullySupplied, amountConsumer), "\t\tFullySupplied", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountOversupllied) + addPercentage(amountOversupllied, amountConsumer), "\t\tOversupllied", middle));
 		entryList.add(new StatEntry(() -> StatToFancyString(overSuppliedStats), middle));
-		entryList.add(new Entry(() -> Integer.toString(amountSupplier) + addPercentage(amountSupplier, amountHolonObjects), "\tSupplier", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountSupplier) + addPercentage(amountSupplier, amountHolonObjects), "\tProducers", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountPassiv) + addPercentage(amountPassiv, amountHolonObjects), "\tPassiv", middle));
 		addSeperator(middle);
-		entryList.add(new Entry(() -> Integer.toString(amountSwitch), "Switch (not a HolonObject)", middle));
-		entryList.add(new Entry(() -> Integer.toString(amountActiveSwitch) + addPercentage(amountActiveSwitch, amountSwitch), "\t[Active] Switch", middle));
-		entryList.add(new Entry(() -> Integer.toString(amountInactiveSwitch) + addPercentage(amountInactiveSwitch, amountSwitch), "\t[Inactive] Switch", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountSwitch), "Switches", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountActiveSwitch) + addPercentage(amountActiveSwitch, amountSwitch), "\tClosed Switches", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountInactiveSwitch) + addPercentage(amountInactiveSwitch, amountSwitch), "\tOpen Switches", middle));
 		
 		addSeperator(middle);
-		entryList.add(new Entry(() -> Integer.toString(amountHolonElements), "HolonElements", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountHolonElements), "Holon Elements", middle));
 		entryList.add(new Entry(() -> Integer.toString(this.amountElementLow) + addPercentage(amountElementLow, amountHolonElements), "\tLow", middle));
 		entryList.add(new Entry(() -> Integer.toString(this.amountElementMedium) + addPercentage(amountElementMedium, amountHolonElements), "\tMedium", middle));
 		entryList.add(new Entry(() -> Integer.toString(this.amountElementHigh) + addPercentage(amountElementHigh, amountHolonElements), "\tHigh", middle));
@@ -167,8 +167,8 @@ public class InformationPanel implements AddOn {
 		
 		addSeperator(middle);
 		entryList.add(new Entry(() -> Integer.toString(amountFlexibilities), "Flexibilities", middle));
-		entryList.add(new Entry(() -> Integer.toString(amountConsumingFlexibilities) + addPercentage(amountConsumingFlexibilities, amountFlexibilities), "\tConsumingFlexibilities", middle));
-		entryList.add(new Entry(() -> Integer.toString(amountProducingFlexibilities) + addPercentage(amountProducingFlexibilities, amountFlexibilities), "\tProducingFlexibilities", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountConsumingFlexibilities) + addPercentage(amountConsumingFlexibilities, amountFlexibilities), "\tConsuming Flexibilities", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountProducingFlexibilities) + addPercentage(amountProducingFlexibilities, amountFlexibilities), "\tProducing Flexibilities", middle));
 		addSeperator(middle);
 		entryList.add(new Entry(() -> Integer.toString(amountFlexibilities), "Flexibilities", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountLow) + addPercentage(amountLow, amountFlexibilities), "\tLow", middle));
@@ -176,13 +176,13 @@ public class InformationPanel implements AddOn {
 		entryList.add(new Entry(() -> Integer.toString(amountHigh) + addPercentage(amountHigh, amountFlexibilities), "\tHigh", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountEssential) + addPercentage(amountEssential, amountFlexibilities), "\tEssential", middle));
 		addSeperator(middle);
-		entryList.add(new Entry(() -> Integer.toString(amountActiveFlexibilities), "ActiveFlexibilities", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountActiveFlexibilities), "Active Flexibilities", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountActiveLow) + addPercentage(amountActiveLow, amountActiveFlexibilities), "\tLow", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountActiveMedium) + addPercentage(amountActiveMedium, amountActiveFlexibilities), "\tMedium", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountActiveHigh) + addPercentage(amountActiveHigh, amountActiveFlexibilities), "\tHigh", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountActiveEssential) + addPercentage(amountActiveEssential, amountActiveFlexibilities), "\tEssential", middle));
 		addSeperator(middle);
-		entryList.add(new Entry(() -> Integer.toString(amountGroupNodes), "GroupNodes", middle));
+		entryList.add(new Entry(() -> Integer.toString(amountGroupNodes), "Group Nodes", middle));
 		entryList.add(new Entry(() -> Integer.toString(amountHolons), "Holons", middle));
 		
 		return middle;

+ 5 - 5
src/algorithm/binary/AcoAlgorithm.java

@@ -27,11 +27,11 @@ public class AcoAlgorithm extends AlgorithmFrameworkFlex{
 	
 	public AcoAlgorithm() {
 		super();
-		addIntParameter("Population", popsize, intValue -> popsize = intValue, () -> popsize, 1);
-		addIntParameter("maxGenerations", maxGenerations, intValue -> maxGenerations = intValue, () -> maxGenerations, 1);
-		addDoubleParameter("Vaporization", p, doubleValue -> p = doubleValue, () -> p, 0.0, 1.0);
-		addDoubleParameter("FactorReset", convergenceFactorReset, doubleValue -> convergenceFactorReset = doubleValue, () -> convergenceFactorReset, 0.0, 1.0);
-		addBooleanParameter("moreInformation", moreInformation, booleanValue -> moreInformation = booleanValue);
+		addIntParameter("Population size", popsize, intValue -> popsize = intValue, () -> popsize, 1);
+		addIntParameter("Generations", maxGenerations, intValue -> maxGenerations = intValue, () -> maxGenerations, 1);
+		addDoubleParameter("Vaporization rate", p, doubleValue -> p = doubleValue, () -> p, 0.0, 1.0);
+		addDoubleParameter("Convergence factor threshold", convergenceFactorReset, doubleValue -> convergenceFactorReset = doubleValue, () -> convergenceFactorReset, 0.0, 1.0);
+		addBooleanParameter("Detailed information", moreInformation, booleanValue -> moreInformation = booleanValue);
 	}
 	
 	

+ 13 - 13
src/algorithm/binary/GaAlgorithm.java

@@ -19,22 +19,22 @@ public class GaAlgorithm extends AlgorithmFrameworkFlex{
 	private double swapProbability = 0.02;
 	private double mutateProbability = 0.02;
 	private boolean useIntervalMutation = false;
-	private double mutateProbabilityInterval = 0.01;
+	//private double mutateProbabilityInterval = 0.01;
 	private double maxMutationPercent = 0.01;
 	private boolean moreInformation = false;
 	
 	
 	public GaAlgorithm() {
 		super();
-		addIntParameter("popsize", popsize, intValue -> popsize = intValue, () -> popsize, 1);
-		addIntParameter("maxGenerations", maxGenerations, intValue -> maxGenerations = intValue, () -> maxGenerations, 1);
-		addDoubleParameter("tournamentSize", tournamentSize, doubleValue -> tournamentSize = doubleValue, () -> tournamentSize, 1.0);
-		addDoubleParameter("SwapProbability", swapProbability, doubleValue -> swapProbability = doubleValue, () -> swapProbability, 0.0, 1.0);
-		addDoubleParameter("MutateProbability", mutateProbability, doubleValue -> mutateProbability = doubleValue, () -> mutateProbability, 0.0, 1.0);
-		addBooleanParameter("useIntervalMutation", useIntervalMutation, booleanValue -> useIntervalMutation = booleanValue);
-		addDoubleParameter("mutateProbabilityInterval", mutateProbabilityInterval, doubleValue -> mutateProbabilityInterval = doubleValue, () -> mutateProbabilityInterval, 0.0, 1.0);
-		addDoubleParameter("maxMutationPercent", maxMutationPercent, doubleValue -> maxMutationPercent = doubleValue, () -> maxMutationPercent, 0.0, 1.0);
-		addBooleanParameter("moreInformation", moreInformation, booleanValue -> moreInformation = booleanValue);
+		addIntParameter("Population size", popsize, intValue -> popsize = intValue, () -> popsize, 1);
+		addIntParameter("Generations", maxGenerations, intValue -> maxGenerations = intValue, () -> maxGenerations, 1);
+		addDoubleParameter("Tournament size", tournamentSize, doubleValue -> tournamentSize = doubleValue, () -> tournamentSize, 1.0);
+		addDoubleParameter("Swap probability", swapProbability, doubleValue -> swapProbability = doubleValue, () -> swapProbability, 0.0, 1.0);
+		addDoubleParameter("Mutation probability", mutateProbability, doubleValue -> mutateProbability = doubleValue, () -> mutateProbability, 0.0, 1.0);
+		addBooleanParameter("Interval-based mutation", useIntervalMutation, booleanValue -> useIntervalMutation = booleanValue);
+		//addDoubleParameter("mutateProbabilityInterval", mutateProbabilityInterval, doubleValue -> mutateProbabilityInterval = doubleValue, () -> mutateProbabilityInterval, 0.0, 1.0);
+		addDoubleParameter("Mutation severity (% of problem size)", maxMutationPercent, doubleValue -> maxMutationPercent = doubleValue, () -> maxMutationPercent, 0.0, 1.0);
+		addBooleanParameter("Detailed Information", moreInformation, booleanValue -> moreInformation = booleanValue);
 	}
 	
 	public static void main(String[] args)
@@ -117,7 +117,7 @@ public class GaAlgorithm extends AlgorithmFrameworkFlex{
 	 */
 	private void mutateInterval(Individual child, int problemSize) {
 		//If not mutate skip
-		if(Random.nextDouble() >  this.mutateProbabilityInterval) {
+		if(Random.nextDouble() >  this.mutateProbability) {
 			return;
 		}
 		//println("problemSize:" + problemSize + "    maxMutationPercent:" + maxMutationPercent);
@@ -238,8 +238,8 @@ public class GaAlgorithm extends AlgorithmFrameworkFlex{
 				+ " TournamentSize: " +  tournamentSize
 				+ " SwapProbability: " +  swapProbability
 				+ (useIntervalMutation? 
-						(" MutateProbabilityInterval: " +  mutateProbabilityInterval
-						+ " MaxMutationPercent: " +  maxMutationPercent)
+						(//" MutateProbabilityInterval: " +  mutateProbabilityInterval
+						" MaxMutationPercent: " +  maxMutationPercent)
 						: 
 						(" MutateProbability: " +  mutateProbability));
 	}