Skip to content

Commit

Permalink
Merge pull request #1291 from GRIDAPPSD/releases/2020.05.0
Browse files Browse the repository at this point in the history
Release of version 2020.05.0
  • Loading branch information
poorva1209 authored Jun 9, 2020
2 parents 239c77a + e8f16a1 commit 3433baf
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 149 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ dist: trusty

language: java

#sources:
#- google-chrome

packages:
- realpath
- python
- python-pip
- docker-ce

jdk:
- oraclejdk8

Expand Down
4 changes: 0 additions & 4 deletions .travis/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ setup_dependencies() {
Setting up dependencies.
"

sudo apt update -y
sudo apt install realpath python python-pip -y
sudo apt install --only-upgrade docker-ce -y

docker info

sudo rm /usr/local/bin/docker-compose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
if(bgHost==null || bgHost.trim().length()==0){
bgHost = BlazegraphQueryHandler.DEFAULT_ENDPOINT;
}
String simulationID = GridAppsDConstants.getStringProperty(parameters, SIMULATIONID, null);
/*String simulationID = GridAppsDConstants.getStringProperty(parameters, SIMULATIONID, null);
int simId = -1;
if(simulationID==null || simulationID.trim().length()==0){
logError("No "+SIMULATIONID+" parameter provided", processId, username, logManager);
Expand All @@ -189,7 +189,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
simId = new Integer(simulationID);
}catch (Exception e) {
logError("Simulation ID not a valid integer "+simulationID+", defaulting to "+simId, simulationID, username, logManager);
}
}*/

ModelState modelState = new ModelState();
String modelStateStr = GridAppsDConstants.getStringProperty(parameters, MODELSTATE, null);
Expand All @@ -200,7 +200,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
modelState = gson.fromJson(modelStateStr, ModelState.class);
}

long simulationStartTime = GridAppsDConstants.getLongProperty(parameters, SIMULATIONSTARTTIME, -1);
/*long simulationStartTime = GridAppsDConstants.getLongProperty(parameters, SIMULATIONSTARTTIME, -1);
if(simulationStartTime<0){
logError("No "+SIMULATIONSTARTTIME+" parameter provided", processId, username, logManager);
throw new Exception("Missing parameter "+SIMULATIONSTARTTIME);
Expand All @@ -209,7 +209,7 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
if(simulationDuration==0){
logError("No "+SIMULATIONDURATION+" parameter provided", processId, username, logManager);
throw new Exception("Missing parameter "+SIMULATIONDURATION);
}
}*/

QueryHandler queryHandler = new BlazegraphQueryHandler(bgHost, logManager, processId, username);
queryHandler.addFeederSelection(modelId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@ public void generateConfig(Properties parameters, PrintWriter out, String proces
}

//Generate zip load profile player file
GLDZiploadScheduleConfigurationHandler ziploadScheduleConfigurationHandler = new GLDZiploadScheduleConfigurationHandler(logManager, dataManager);
ziploadScheduleConfigurationHandler.generateConfig(parameters, null, processId, username);
if(scheduleName!=null && scheduleName.trim().length()>0) {
GLDZiploadScheduleConfigurationHandler ziploadScheduleConfigurationHandler = new GLDZiploadScheduleConfigurationHandler(logManager, dataManager);
ziploadScheduleConfigurationHandler.generateConfig(parameters, null, processId, username);
}

//Generate startup file
File startupFile = new File(tempDataPath+File.separator+STARTUP_FILENAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public void generateConfig(Properties parameters, PrintWriter out,
String tempDataPath = dir.getAbsolutePath();

String simulationID = GridAppsDConstants.getStringProperty(parameters, SIMULATIONID, null);
String loadprofile = GridAppsDConstants.getStringProperty(parameters, SCHEDULENAME, "ieeezipload");
int simId = -1;
if(simulationID==null || simulationID.trim().length()==0){
logError("No "+SIMULATIONID+" parameter provided", processId, username, logManager);
Expand All @@ -176,7 +177,7 @@ public void generateConfig(Properties parameters, PrintWriter out,
}

RequestTimeseriesData request = new RequestTimeseriesData();
request.setQueryMeasurement("loadprofile");
request.setQueryMeasurement(loadprofile);
request.setResponseFormat(ProvenLoadScheduleToGridlabdLoadScheduleConverter.OUTPUT_FORMAT);
Map<String, Object> queryFilter = new HashMap<String, Object>();

Expand All @@ -189,6 +190,7 @@ public void generateConfig(Properties parameters, PrintWriter out,
queryFilter.put(ENDTIME_FILTER, "" + c.getTimeInMillis());
request.setQueryFilter(queryFilter);
request.setSimulationYear(simulationYear);
request.setOriginalFormat("loadprofile");
DataResponse resp = (DataResponse) dataManager.processDataRequest(
request,
ProvenTimeSeriesDataManagerImpl.DATA_MANAGER_TYPE, simId,
Expand Down
Loading

0 comments on commit 3433baf

Please sign in to comment.