Skip to content

Commit

Permalink
Merge pull request #1250 from GRIDAPPSD/releases/2020.03.0
Browse files Browse the repository at this point in the history
Release of version 2020.03.0
  • Loading branch information
poorva1209 authored Apr 6, 2020
2 parents 627b01e + 8baa6dd commit 000f4c7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
double loadScale = GridAppsDConstants.getDoubleProperty(parameters, LOADSCALINGFACTOR, 1);

String scheduleName = GridAppsDConstants.getStringProperty(parameters, SCHEDULENAME, null);
if(scheduleName!=null){
if(scheduleName!=null && scheduleName.trim().length()>0){
bWantSched = true;
}
String directory = GridAppsDConstants.getStringProperty(parameters, DIRECTORY, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
double loadScale = GridAppsDConstants.getDoubleProperty(parameters, LOADSCALINGFACTOR, 0);

String scheduleName = GridAppsDConstants.getStringProperty(parameters, SCHEDULENAME, null);
if(scheduleName!=null){
if(scheduleName!=null && scheduleName.trim().length()>0){
bWantSched = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
double loadScale = GridAppsDConstants.getDoubleProperty(parameters, LOADSCALINGFACTOR, 1);

String scheduleName = GridAppsDConstants.getStringProperty(parameters, SCHEDULENAME, null);
if(scheduleName!=null){
if(scheduleName!=null && scheduleName.trim().length()>0){
bWantSched = true;
}
String directory = GridAppsDConstants.getStringProperty(parameters, DIRECTORY, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
double loadScale = GridAppsDConstants.getDoubleProperty(parameters, LOADSCALINGFACTOR, 1);

String scheduleName = GridAppsDConstants.getStringProperty(parameters, SCHEDULENAME, null);
if(scheduleName!=null){
if(scheduleName!=null && scheduleName.trim().length()>0){
bWantSched = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,11 @@ Properties generateSimulationParameters(RequestSimulation requestSimulation){
params.put(GLDAllConfigurationHandler.RANDOMIZEFRACTIONS, modelConfig.randomize_zipload_fractions);
params.put(GLDAllConfigurationHandler.USEHOUSES, modelConfig.use_houses);

params.put(GLDAllConfigurationHandler.SCHEDULENAME, modelConfig.schedule_name);
if(modelConfig.schedule_name!=null){
params.put(GLDAllConfigurationHandler.SCHEDULENAME, modelConfig.schedule_name);
} else {
params.put(GLDAllConfigurationHandler.SCHEDULENAME, "");
}
params.put(GLDAllConfigurationHandler.SIMULATIONNAME, requestSimulation.getSimulation_config().simulation_name);
params.put(GLDAllConfigurationHandler.SOLVERMETHOD, requestSimulation.getSimulation_config().power_flow_solver_method);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,21 @@ public void run() {
SimulationTracker isFinished = new SimulationTracker();
try{

File simulationFile = new File(simContext.getStartupFile());

if(simulationConfig!=null && simulationConfig.model_creation_config!=null && simulationConfig.model_creation_config.schedule_name!=null && simulationConfig.model_creation_config.schedule_name.trim().length()>0){
File serviceDir = serviceManager.getServiceConfigDirectory();
/*try{
RunCommandLine.runCommand("cp "+serviceDir.getAbsolutePath()+File.separator+"etc"+File.separator+"zipload_schedule.player "+simulationFile.getParentFile().getAbsolutePath()+File.separator+simulationConfig.model_creation_config.schedule_name+".player");
}catch(Exception e){
log.warn("Could not copy player file to working directory");
}*/
try{
RunCommandLine.runCommand("cp "+serviceDir.getAbsolutePath()+File.separator+"etc"+File.separator+"appliance_schedules.glm "+simulationFile.getParentFile().getAbsolutePath()+File.separator+GLDAllConfigurationHandler.SCHEDULES_FILENAME);
}catch(Exception e){
log.warn("Could not copy schedules file to working directory");
}
File simulationFile = new File(simContext.getStartupFile());

//if(simulationConfig!=null && simulationConfig.model_creation_config!=null && simulationConfig.model_creation_config.schedule_name!=null && simulationConfig.model_creation_config.schedule_name.trim().length()>0){
File serviceDir = serviceManager.getServiceConfigDirectory();
/*try{
RunCommandLine.runCommand("cp "+serviceDir.getAbsolutePath()+File.separator+"etc"+File.separator+"zipload_schedule.player "+simulationFile.getParentFile().getAbsolutePath()+File.separator+simulationConfig.model_creation_config.schedule_name+".player");
}catch(Exception e){
log.warn("Could not copy player file to working directory");
}*/
try{
RunCommandLine.runCommand("cp "+serviceDir.getAbsolutePath()+File.separator+"etc"+File.separator+"appliance_schedules.glm "+simulationFile.getParentFile().getAbsolutePath()+File.separator+GLDAllConfigurationHandler.SCHEDULES_FILENAME);
}catch(Exception e){
log.warn("Could not copy schedules file to working directory");
}
//}

//Start GridLAB-D
logManager.log(new LogMessage(this.getClass().getSimpleName(),
Expand Down

0 comments on commit 000f4c7

Please sign in to comment.