-
Notifications
You must be signed in to change notification settings - Fork 179
faq 100761609
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
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?
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq