Skip to content

Commit

Permalink
Merge pull request #1676 from GRIDAPPSD/releases/2022.10.0
Browse files Browse the repository at this point in the history
Release of version 2022.10.0
  • Loading branch information
tonya1 authored Nov 10, 2022
2 parents a0e168c + f1e0c39 commit 433542c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ public class GLDAllConfigurationHandler extends BaseConfigurationHandler impleme
public static final String SIMULATOR = "simulator";
public static final String SEPARATED_LOADS_FILE = "separated_loads_file";
public static final int TIMEFILTER_YEAR = 2013;
public static final String RUN_REALTIME = "run_realtime";
public static final String TIMESTEP = "timestep";

// public static final String CONFIGTARGET = "glm";
public static final String CONFIGTARGET = "both"; //will build files for both glm and dss
Expand Down Expand Up @@ -387,7 +389,9 @@ protected void generateStartupFile(Properties parameters, String tempDataPath, P
throw new Exception("Missing parameter "+SIMULATIONID);
}
String scheduleName = GridAppsDConstants.getStringProperty(parameters, SCHEDULENAME, null);


boolean run_realtime = GridAppsDConstants.getBooleanProperty(parameters, RUN_REALTIME, true);

double nominalv = 0;

try{
Expand Down Expand Up @@ -460,7 +464,10 @@ protected void generateStartupFile(Properties parameters, String tempDataPath, P
startupFileWriter.println(" name "+simulationID+";");
if(simulator.equalsIgnoreCase("gridlab-d"))
startupFileWriter.println(" message_type JSON;");
startupFileWriter.println(" publish_period 3;");
if(run_realtime)
startupFileWriter.println(" publish_period 3;");
else
startupFileWriter.println(" publish_period 60;");
startupFileWriter.println(" configure model_outputs.json;");
startupFileWriter.println("}");

Expand All @@ -477,7 +484,10 @@ protected void generateStartupFile(Properties parameters, String tempDataPath, P
startupFileWriter.println(" parent "+simulationID+";");
startupFileWriter.println(" property message_type;");
startupFileWriter.println(" file "+simulationID+".csv;");
startupFileWriter.println(" interval 1;");
if(run_realtime)
startupFileWriter.println(" interval 1;");
else
startupFileWriter.println(" interval 60;");
startupFileWriter.println("}");
/*startupFileWriter.println("object multi_recorder {");
startupFileWriter.println(" parent "+simulationName+";");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ Properties generateSimulationParameters(RequestSimulation requestSimulation){
}

params.put(GLDAllConfigurationHandler.SIMULATOR, requestSimulation.getSimulation_config().getSimulator());
params.put(GLDAllConfigurationHandler.RUN_REALTIME, requestSimulation.getSimulation_config().run_realtime);

if(modelConfig.separated_loads_file!=null){
params.put(GLDAllConfigurationHandler.SEPARATED_LOADS_FILE, modelConfig.separated_loads_file);
} else {
Expand Down

0 comments on commit 433542c

Please sign in to comment.