use of cbit.vcell.modeldb.VCDatabaseVisitor in project vcell by virtualcell.
the class RuleBasedTest method main.
public static void main(String[] args) {
try {
PropertyLoader.loadProperties();
} catch (Exception e) {
e.printStackTrace();
}
final int numTrials = 40;
VCDatabaseVisitor vcDatabaseVisitor = new VCDatabaseVisitor() {
@Override
public void visitMathModel(MathModel mathModel, PrintStream logFilePrintStream) {
throw new IllegalArgumentException("Not Implemented");
}
@Override
public void visitGeometry(Geometry geometry, PrintStream logFilePrintStream) {
throw new IllegalArgumentException("Not Implemented");
}
@Override
public void visitBioModel(BioModel bioModel, PrintStream logFilePrintStream) {
SimulationContext[] simulationContexts = bioModel.getSimulationContexts();
for (SimulationContext simContext : simulationContexts) {
if ((simContext.getApplicationType() == Application.NETWORK_STOCHASTIC) && simContext.getGeometry().getDimension() == 0) {
File baseDirectory = createDirFile(simContext);
try {
checkNonspatialStochasticSimContext(simContext, baseDirectory, numTrials);
} catch (Exception e) {
e.printStackTrace();
if (!e.getMessage().contains("Only Mass Action Kinetics supported ")) {
writeMessageTofile(baseDirectory, e.getMessage());
}
}
}
}
}
@Override
public boolean filterMathModel(MathModelInfo mathModelInfo) {
return false;
}
@Override
public boolean filterGeometry(GeometryInfo geometryInfo) {
return false;
}
@Override
public boolean filterBioModel(BioModelInfo bioModelInfo) {
return // bioModelInfo.getVersion().getName().equals("model");
bioModelInfo.getVersion().getName().equals("simpleModel_Network_orig");
}
};
String currentUserID = "schaff";
String[] allUsers = new String[] { /*-all*/
currentUserID, "-" };
VCDatabaseScanner.scanBioModels(allUsers, vcDatabaseVisitor, false);
}
use of cbit.vcell.modeldb.VCDatabaseVisitor in project vcell by virtualcell.
the class StandaloneRuleBasedTest method main.
public static void main(String[] args) {
try {
PropertyLoader.loadProperties();
} catch (Exception e) {
e.printStackTrace();
}
final int numTrials = 40;
// 30 seconds
final long bngTimeoutDurationMS = 30000;
VCDatabaseVisitor vcDatabaseVisitor = new VCDatabaseVisitor() {
@Override
public void visitMathModel(MathModel mathModel, PrintStream logFilePrintStream) {
throw new IllegalArgumentException("Not Implemented");
}
@Override
public void visitGeometry(Geometry geometry, PrintStream logFilePrintStream) {
throw new IllegalArgumentException("Not Implemented");
}
@Override
public void visitBioModel(BioModel bioModel, PrintStream logFilePrintStream) {
SimulationContext[] simulationContexts = bioModel.getSimulationContexts();
for (SimulationContext simContext : simulationContexts) {
if ((simContext.getApplicationType() == Application.NETWORK_STOCHASTIC) && simContext.getGeometry().getDimension() == 0) {
File baseDirectory = createDirFile(simContext);
try {
checkNonspatialStochasticSimContext(simContext, baseDirectory, numTrials, bngTimeoutDurationMS);
} catch (Exception e) {
e.printStackTrace();
if (!e.getMessage().contains("Only Mass Action Kinetics supported ")) {
StochtestFileUtils.writeMessageTofile(baseDirectory, e.getMessage());
}
}
}
}
}
@Override
public boolean filterMathModel(MathModelInfo mathModelInfo) {
return false;
}
@Override
public boolean filterGeometry(GeometryInfo geometryInfo) {
return false;
}
@Override
public boolean filterBioModel(BioModelInfo bioModelInfo) {
return // bioModelInfo.getVersion().getName().equals("model");
bioModelInfo.getVersion().getName().equals("simpleModel_Network_orig");
}
};
String currentUserID = "schaff";
String[] allUsers = new String[] { /*-all*/
currentUserID, "-" };
VCDatabaseScanner.scanBioModels(allUsers, vcDatabaseVisitor, false);
}
Aggregations