Skip to content

faq 100761609

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

link network.xml inductive chargeable street

by oussama smiai on 2016-12-13 10:58:10


Hi everybody,

I would like to ask how to set a specefic link (street) in a network.xml file to become inductively chargeable ? The examples in the transEnergySim could not help me to figure it.

Thank you


Comments: 1


Re: link network.xml inductive chargeable street

by Johan W. Joubert on 2016-12-20 07:53:22

I am not that familiar with transEnergySim , let me say that first  

To my knowledge the network attributes applies to the network as a whole, and you cannot set link-specific attributes. So I would suggest that you use/create an ObjectAttributes class for the network. That allows you to set any attributes that you would like for a particular link. Here is an example:

Scenario sc = getFromSomewhere();
 ObjectAttributes networkAttributes = new ObjectAttributes();
 Id<Link> id = Id.createLinkId("someId");
 networkAttributes.putAttribute(id.toString(), "chargeType", "inductive");

And whenever you have a link's Id, you'd be able to look up in the networkAttributes object whether it has `inductive' as charge type. Will that work for you?

Clone this wiki locally