Skip to content

Commit

Permalink
fixes #3152
Browse files Browse the repository at this point in the history
before, the parameter set was showed as a label... but not displayed in
the panel. As this result is very important, I put it as a "parameter"
like the best fitness.
  • Loading branch information
ptaillandier committed Jul 31, 2021
1 parent e17b52c commit 2695535
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions msi.gama.core/src/msi/gama/kernel/experiment/BatchAgent.java
Expand Up @@ -312,17 +312,21 @@ public Object value() {

});

params.add(new ParameterAdapter("Best fitness", IExperimentPlan.BATCH_CATEGORY_NAME, "", IType.STRING) {
params.add(new ParameterAdapter("Best parameter set found", IExperimentPlan.BATCH_CATEGORY_NAME, "", IType.STRING) {


@Override
public String getUnitLabel(final IScope scope) {
public String value() {
final IExploration algo = getSpecies().getExplorationAlgorithm();
if (algo == null) return "";
final ParametersSet solutions = algo.getBestSolution();
if (solutions == null) return "";
return "with " + solutions;
return solutions.toString();
}

});
params.add(new ParameterAdapter("Best fitness", IExperimentPlan.BATCH_CATEGORY_NAME, "", IType.STRING) {

@Override
public String value() {
final IExploration algo = getSpecies().getExplorationAlgorithm();
Expand All @@ -333,15 +337,21 @@ public String value() {
}

});


params.add(new ParameterAdapter("Last parameeter set tested", IExperimentPlan.BATCH_CATEGORY_NAME, "", IType.STRING) {

params.add(new ParameterAdapter("Last fitness", IExperimentPlan.BATCH_CATEGORY_NAME, "", IType.STRING) {


@Override
public String getUnitLabel(final IScope scope) {
if (lastSolution == null) return "";
return "with " + lastSolution.toString();
public String value() {
if (lastSolution == null) return "-";
return lastSolution.toString();
}

});

params.add(new ParameterAdapter("Last fitness", IExperimentPlan.BATCH_CATEGORY_NAME, "", IType.STRING) {

@Override
public String value() {
if (lastFitness == null) return "-";
Expand Down

0 comments on commit 2695535

Please sign in to comment.