Just a very simple problem for your guys, I am not sure what will happen if I use the command Loadmult first to change all the load value and then I want to change the specific load by directly set a new value. If I do that whether the command Loadmult will be ignored?
Many thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
LOAD elements are modified by the Loadmult when the Solve command is issued. Loadmult is a property of the Circuit object so there is only one for the whole circuit.
Here is the code for setting up the load value the SnapShot mode:
Hi Roger,
Many thanks for you help! I am sure about that the loadmult is applied for all load elements of the circuit, but I am not sure is it possible for OpenDss to manually change one of the load element after the loadmult command? Because in my circuit, I want to test the effect of one specific load on the voltage profiles under different load condition and my idea is using the loadmult to simulate different load scenarios and after that I would like to set a new value for a specific load to look at the voltage profiles. Another approach is to manually change the load elements one by one. The simple code is shown as below:
for i=1:1:length(T_total)
DSSText.Command = ['Set Loadmult=', num2str(P_multi(i))];
DSSText.Command=['Load.611=', num2str(P_perturb(i))];
You need to specify the object's property name, otherwise, it's not going to work.
LoadMult is a parameter in the global context, ergo, it will be applied to all the loads in the model. However, you can set the load value independently as well, is just a matter of being creative.
For example, if the LoadMult is A, and the new value you want to set for a specific load is B, that means that you need to consider the global effect of LoadMult for setting the new load value, this way, if the new value for Load 611 is B, then instead of setting B set B/A, removing the effect of the LoadMult for that specific load. Something like this:
Thanks a lot! The last question is that I don't know if it is possible to change the position of the load to be adjusted in each loop. For example, when i=1, change the kw of Load.611 and when i=2 change the load.612. I think I need to treat the load name as variabls and then it can be change automaticly within the loop writen in Matlab.
Many thanks!
Jiabin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks a lot! The last question is that I don't know if it is possible to change the position of the load to be adjusted in each loop. For example, when i=1, change the kw of Load.611 and when i=2 change the load.612. I think I need to treat the load name as variabls and then it can be change automaticly within the loop writen in Matlab.
Many thanks!
Jiabin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes you can. that's more like a MATLAB related question. You can go to the MATLAB website. For example, for getting the names of all the loads, you can do:
myLoads = DSSLoads.AllNames;
That will place all the load names within the cell array "myLoads". Then, to use a particular load, do:
Hi all,
Just a very simple problem for your guys, I am not sure what will happen if I use the command Loadmult first to change all the load value and then I want to change the specific load by directly set a new value. If I do that whether the command Loadmult will be ignored?
Many thanks
LOAD elements are modified by the Loadmult when the Solve command is issued. Loadmult is a property of the Circuit object so there is only one for the whole circuit.
Here is the code for setting up the load value the SnapShot mode:
Factor := ActiveCircuit[ActorID].LoadMultiplier * GrowthFactor(Year, ActorID);
So the Load kW and kvar are modified by the LoadMultiplier and a GrowthFactor prior to being used.
Hi Roger,
Many thanks for you help! I am sure about that the loadmult is applied for all load elements of the circuit, but I am not sure is it possible for OpenDss to manually change one of the load element after the loadmult command? Because in my circuit, I want to test the effect of one specific load on the voltage profiles under different load condition and my idea is using the loadmult to simulate different load scenarios and after that I would like to set a new value for a specific load to look at the voltage profiles. Another approach is to manually change the load elements one by one. The simple code is shown as below:
for i=1:1:length(T_total)
DSSText.Command = ['Set Loadmult=', num2str(P_multi(i))];
DSSText.Command=['Load.611=', num2str(P_perturb(i))];
DSSText.Command='set mode=snap';
DSSText.Command='solve';
end
Many thanks and kind regards,
jiabin
Hello,
I'm afraid your code is incorrect. The correct command for setting an object's property (kW in this case for example) is as follows:
You need to specify the object's property name, otherwise, it's not going to work.
LoadMult is a parameter in the global context, ergo, it will be applied to all the loads in the model. However, you can set the load value independently as well, is just a matter of being creative.
For example, if the LoadMult is A, and the new value you want to set for a specific load is B, that means that you need to consider the global effect of LoadMult for setting the new load value, this way, if the new value for Load 611 is B, then instead of setting B set B/A, removing the effect of the LoadMult for that specific load. Something like this:
You can try several combinations of this type of solution, again, is just a matter of being creative.
Best regards
Davis
Last edit: Davis Montenegro 2022-10-17
Hi Davis,
Thanks a lot! The last question is that I don't know if it is possible to change the position of the load to be adjusted in each loop. For example, when i=1, change the kw of Load.611 and when i=2 change the load.612. I think I need to treat the load name as variabls and then it can be change automaticly within the loop writen in Matlab.
Many thanks!
Jiabin
Hi Davis,
Thanks a lot! The last question is that I don't know if it is possible to change the position of the load to be adjusted in each loop. For example, when i=1, change the kw of Load.611 and when i=2 change the load.612. I think I need to treat the load name as variabls and then it can be change automaticly within the loop writen in Matlab.
Many thanks!
Jiabin
Hello,
Yes you can. that's more like a MATLAB related question. You can go to the MATLAB website. For example, for getting the names of all the loads, you can do:
That will place all the load names within the cell array "myLoads". Then, to use a particular load, do:
If you have questions about the COM interface, please use the help documentation as shown in the attachment.
Best regards
Davis
Last edit: Davis Montenegro 2022-10-17
Many thanks, that is very useful for me.