Adds well name to config file. Option to startup with external DB
This commit is contained in:
@@ -10,36 +10,25 @@ import java.time.ZonedDateTime;
|
||||
|
||||
public class POC implements Runnable{
|
||||
protected Well thisWell;
|
||||
private int simLoops;
|
||||
private Thread t;
|
||||
|
||||
|
||||
private boolean ioEnabled;
|
||||
|
||||
POC(String wellName, String wellSetupJsonFile, int simLoops){
|
||||
POC(String wellSetupJsonFile, String dbHostname){
|
||||
ioEnabled = true;
|
||||
thisWell = new Well(wellName, 99, 99, 7);
|
||||
thisWell = new Well(dbHostname, 99, 99, 7);
|
||||
thisWell.parseJSONFile(wellSetupJsonFile);
|
||||
// thisWell.printTapers();
|
||||
this.simLoops = simLoops;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
POC(String wellName, String wellSetupJsonFile, String simFileName, boolean ioEnabled, int simLoops){
|
||||
POC(String wellSetupJsonFile, String simFileName, boolean ioEnabled, String dbHostname){
|
||||
this.ioEnabled = ioEnabled;
|
||||
if (this.ioEnabled) {
|
||||
thisWell = new Well(wellName, simFileName,99, 99, 7);
|
||||
|
||||
thisWell = new Well(dbHostname, simFileName,99, 99, 7);
|
||||
} else {
|
||||
thisWell = new Well(wellName, simFileName,99, 99, 99);
|
||||
// IO
|
||||
thisWell = new Well(dbHostname, simFileName,99, 99, 99);
|
||||
}
|
||||
|
||||
thisWell.parseJSONFile(wellSetupJsonFile);
|
||||
// thisWell.printTapers();
|
||||
this.simLoops = simLoops;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +67,11 @@ public class POC implements Runnable{
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
final POC thisPOC = new POC("Barney", args[0], args[1], args[2].equals("true"), 100);
|
||||
String dbHostname = "localhost";
|
||||
if (args.length > 3){
|
||||
dbHostname = args[3];
|
||||
}
|
||||
final POC thisPOC = new POC(args[0], args[1], args[2].equals("true"), dbHostname);
|
||||
thisPOC.start();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user