InterPSS-Project / ipss-plugin

InterPSS plugin projects
8 stars 11 forks source link

Editing Network Data #18

Closed nuskumar closed 9 years ago

nuskumar commented 9 years ago

Hello All, I am trying to modify the system data imported from a CDF file before commencing the loadflow, but it was not accepting the update. The following is the code I have used:

IpssCorePlugin.init(); AclfNetwork mynet = CorePluginObjFactory .getFileAdapter(IpssFileAdapter.FileFormat.IEEECDF) .load("testData/ieee/IEEE14Bus.dat") .getAclfNet(); System.out.println(Before : "+mynet.getBus("Bus12").getLoadPQ()); AclfBus tbus= mynet.getBus("Bus12"); tbus.setLoadPQ(new Complex(0.8,0.65)); mynet.setBus("Bus12", tbus); System.out.println("After: "+mynet.getBus("Bus12").getLoadPQ());

Output: Both print statements giving same output and the powerflow results are same as the standard case. Before : (0.061, 0.016) After : (0.061, 0.016) Can somebody suggest a suitable fix to this issue?

jinjingfarm commented 9 years ago

The issue has been duplicated, see the following test file:

https://github.com/InterPSS-Project/ipss-plugin/blob/master/ipss.sample/src/org/interpss/support/Ipss_plugin_issue_18.java

We will investigate the issue and resolve it soon.

thuang commented 9 years ago

Please take a look at this example:

https://github.com/InterPSS-Project/ipss-common/blob/698c2a4eb67727713de5de8313ea8bb3a207285f/ipss.tutorial/src/org/interpss/tutorial/ch2_intro/ThreeBasicObjects.java

jinjingfarm commented 9 years ago

The InterPSS API will be adjusted to avoid the confusion.