use of gov.sandia.n2a.parms.ParameterDomain in project n2a by frothga.
the class XyceBackend method getSimulatorParameters.
@Override
public ParameterDomain getSimulatorParameters() {
ParameterDomain inputs = new ParameterDomain();
// TODO: add real integration options, etc. - also need code to make sure they get in netlist!
inputs.addParameter(new Parameter("duration", 1.0));
inputs.addParameter(new Parameter("seed", 0));
inputs.addParameter(new Parameter("xyce.integrator", "trapezoid"));
return inputs;
}
use of gov.sandia.n2a.parms.ParameterDomain in project n2a by frothga.
the class InternalBackend method getSimulatorParameters.
@Override
public ParameterDomain getSimulatorParameters() {
ParameterDomain result = new ParameterDomain();
// default is 1 second
result.addParameter(new Parameter("duration", "1.0"));
// alt is "RungeKutta"
result.addParameter(new Parameter("internal.integrator", "Euler"));
return result;
}
use of gov.sandia.n2a.parms.ParameterDomain in project n2a by frothga.
the class BackendC method getSimulatorParameters.
@Override
public ParameterDomain getSimulatorParameters() {
ParameterDomain result = new ParameterDomain();
// default is 1 second
result.addParameter(new Parameter("duration", "1.0"));
// alt is "RungeKutta"
result.addParameter(new Parameter("c.integrator", "Euler"));
return result;
}
use of gov.sandia.n2a.parms.ParameterDomain in project n2a by frothga.
the class FixedParameterSpacePanel method getSelectedParamsAsBundles.
private List<ParameterBundle> getSelectedParamsAsBundles(TreePath[] paths) {
List<ParameterBundle> bundles = new ArrayList<ParameterBundle>();
for (TreePath path : paths) {
List<ParameterDomain> domains = new ArrayList<ParameterDomain>();
if (tabParamDomains.getSelectedIndex() == 0) {
domains.add(new ParameterDomain("Model"));
} else {
domains.add(new ParameterDomain("Simulator"));
}
for (int p = 0; p < path.getPathCount(); p++) {
Object u = ((TNode) path.getPathComponent(p)).getObject();
if (u instanceof NodeSubdomain) {
domains.add(((NodeSubdomain) u).getSubdomain());
}
}
NodeBase uLeaf = ((TNode) path.getLastPathComponent()).getObject();
if (uLeaf instanceof NodeParameter) {
NodeParameter p = (NodeParameter) uLeaf;
bundles.add(new ParameterBundle(domains, p.getParameter()));
} else {
// TODO: add all children?
return null;
}
}
return bundles;
}
use of gov.sandia.n2a.parms.ParameterDomain 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));
}
}
Aggregations