Search in sources :

Example 1 with ConstantParameterSpecGroup

use of gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup in project n2a by frothga.

the class ParameterSpecGroupSet method main.

// ////////
// TEST //
// ////////
public static void main(String[] rgs) {
    // monteCarloGroup();
    // latinHyperCube();
    // multiple();
    // consts();
    ParameterSpecGroupSet groups = new ParameterSpecGroupSet();
    groups.setDefaultValueGroup(new ConstantParameterSpecGroup("hi", 123, "alpha", 123.3123));
    System.out.println(groups.getRunCount(false));
}
Also used : ConstantParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup)

Example 2 with ConstantParameterSpecGroup

use of gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup in project n2a by frothga.

the class ParameterSpecGroupSet method consts.

private static void consts() {
    ConstantParameterSpecGroup group = new ConstantParameterSpecGroup();
    group.addConstParameter("A", 43.2);
    group.addConstParameter("B", 32.4);
    group.addConstParameter("C", 87.2);
    group.addConstParameter("D", 111.2);
    ParameterSpecGroup group2 = new ParameterSpecGroup(4);
    group2.add("Z", new ListParameterSpecification(true, false, false, true));
    ParameterSpecGroupSet groups = new ParameterSpecGroupSet();
    groups.add(group);
    groups.add(group2);
    groups.printParameterSets();
}
Also used : ListParameterSpecification(gov.sandia.umf.platform.ensemble.params.specs.ListParameterSpecification) ConstantParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup) LatinHypercubeParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.LatinHypercubeParameterSpecGroup) MonteCarloParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.MonteCarloParameterSpecGroup) ParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ParameterSpecGroup) ConstantParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup)

Example 3 with ConstantParameterSpecGroup

use of gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup in project n2a by frothga.

the class ParameterSpecGroupSet method multiple.

private static void multiple() {
    RandomManager.setRandomSeed("Ensemble/UniformParameterSpecification", 123);
    ParameterSpecGroup knGrp = new ParameterSpecGroup(3);
    knGrp.put("Knowledge", new ListParameterSpecification(new Object[] { 0.2, 0.5, 0.8 }));
    ParameterSpecGroup gravGrp = new ParameterSpecGroup(6);
    gravGrp.put("Gravity", new EvenSpacingParameterSpecification(10, 20));
    ParameterSpecGroup uniGrp = new ParameterSpecGroup(3);
    uniGrp.put("UNIFORM", new UniformParameterSpecification(0, 10.0), true);
    ParameterSpecGroupSet groups = new ParameterSpecGroupSet();
    groups.add(knGrp);
    groups.add(gravGrp);
    groups.add(uniGrp);
    // ConstantParameterSpecGroup cgroup = new ConstantParameterSpecGroup();
    // cgroup.addConstParameter("Gravity", 2222);
    // cgroup.addConstParameter("Gravityx", 2222);
    // groups.setDefaultValueGroup(cgroup);
    groups.setDefaultValueGroup(new ConstantParameterSpecGroup("Gravity", 22, "xyz", "what", "pisquared", 10.237, "asdf"));
    // groups.printParameterSets(false);
    groups.printParameterSets(true);
}
Also used : ListParameterSpecification(gov.sandia.umf.platform.ensemble.params.specs.ListParameterSpecification) EvenSpacingParameterSpecification(gov.sandia.umf.platform.ensemble.params.specs.EvenSpacingParameterSpecification) UniformParameterSpecification(gov.sandia.umf.platform.ensemble.params.specs.UniformParameterSpecification) ConstantParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup) LatinHypercubeParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.LatinHypercubeParameterSpecGroup) MonteCarloParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.MonteCarloParameterSpecGroup) ParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ParameterSpecGroup) ConstantParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup)

Example 4 with ConstantParameterSpecGroup

use of gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup in project n2a by frothga.

the class ParameterSpecGroupSet method removeDefaultValueGroup.

public ConstantParameterSpecGroup removeDefaultValueGroup() {
    ConstantParameterSpecGroup prevGroup = defaultValueGroup;
    remove(defaultValueGroup);
    defaultValueGroup = null;
    return prevGroup;
}
Also used : ConstantParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup)

Example 5 with ConstantParameterSpecGroup

use of gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup in project n2a by frothga.

the class FixedParameterSpacePanel method constructDVGroup.

private void constructDVGroup() {
    allDomains = new ParameterDomain();
    if (modelDomain != null) {
        allDomains.addSubdomain(modelDomain);
    }
    if (simDomain != null) {
        allDomains.addSubdomain(simDomain);
    }
    defaultValueGroup = new ConstantParameterSpecGroup();
    Map<Object, Object> flat = ParameterDomain.flattenDomains(allDomains);
    for (Object paramKey : flat.keySet()) {
        defaultValueGroup.addConstParameter(paramKey, flat.get(paramKey));
    }
}
Also used : ParameterDomain(gov.sandia.n2a.parms.ParameterDomain) ConstantParameterSpecGroup(gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup)

Aggregations

ConstantParameterSpecGroup (gov.sandia.umf.platform.ensemble.params.groups.ConstantParameterSpecGroup)5 LatinHypercubeParameterSpecGroup (gov.sandia.umf.platform.ensemble.params.groups.LatinHypercubeParameterSpecGroup)2 MonteCarloParameterSpecGroup (gov.sandia.umf.platform.ensemble.params.groups.MonteCarloParameterSpecGroup)2 ParameterSpecGroup (gov.sandia.umf.platform.ensemble.params.groups.ParameterSpecGroup)2 ListParameterSpecification (gov.sandia.umf.platform.ensemble.params.specs.ListParameterSpecification)2 ParameterDomain (gov.sandia.n2a.parms.ParameterDomain)1 EvenSpacingParameterSpecification (gov.sandia.umf.platform.ensemble.params.specs.EvenSpacingParameterSpecification)1 UniformParameterSpecification (gov.sandia.umf.platform.ensemble.params.specs.UniformParameterSpecification)1