}
public ManipulationResponse updateSystemParameters(int timestep, boolean isFirstManipulation, String networkOrManipulationId, List<ManipulatingParameter> sysParamList, List<ManipulatingNode> nodes) {
long milliseconds = System.currentTimeMillis();
SimpleManipulationRequest smr = new SimpleManipulationRequest();
smr.setUser(user);
smr.setBeginingTimestepIdx(timestep);
if (isFirstManipulation) {
smr.setNetworkId(networkOrManipulationId);
} else {
smr.setManipulationId(networkOrManipulationId);
}
smr.setTimestepsToRun(Integer.valueOf(propertiesConfig.getProperty("timestepsToRunDefault")));
if(sysParamList != null)
smr.setSysParams(CopySystemParameter(sysParamList));
else {
System.out.println("Error (updateSystemParameters): " + "System parameter is null.");
}
smr.setDescription( "updateSystemParameters");
smr.setSaveLastTimestepOnly(false);
if(nodes != null)
smr.setManipulationModelNodes(nodes.toArray(new ManipulatingNode[]{} ));
ManipulationResponse response = null;
try {
response = (ManipulationResponse) svc.executeManipulationRequest(smr);
//TODO: Write web service call to database