matsim-org / matsim-code-examples

A repository containing code examples around MATSim
GNU General Public License v3.0
79 stars 177 forks source link

scoring the route manually in matsim #337

Open Ranah2020 opened 4 years ago

Ranah2020 commented 4 years ago

i made network file and population fie and config file, Now i try to give specific route score to make this route more congested. 1- is this available for config file in matsim? 2- can i know all the possible routes for specific travel and their time?

Ranah2020 commented 4 years ago

Any help please!

Janekdererste commented 4 years ago

I guess what you are trying to achieve is to make a certain route more attractive than it actually is. You could achieve this by reducing the cost of travelling on a certain route artificially. Though I've never done this myself I guess you would have to alter, or provide a custom RoutingModule.

The userguide has a part on routing in chapter 45.

kt86 commented 4 years ago

You may also work with NetworkChangeEvents. They allow you to modify some network parameters as you like. e.g. the free speed travel time.

Please have a look to chapter 6.1 (Time-Dependent Network) of the user guide.

whizkid-25 commented 4 years ago

@kt86 Hi, I am trying to modify number of lanes and flow capacity by coding them in NetworkChangeEvents but using 'flowcapacity' or permlanes in the xml files is showing errors. Do you know how to apply the correct script to determine this? Capture Attached is the example file that I have created. <?xml version="1.0" encoding="UTF-8"?>

kt86 commented 4 years ago

@whizkid-25 Hi, I think, you forgot to attach your file. There is only the screenshot of your error. Neverthenless here some more general hint: Please have a look to the validation file http://matsim.org/files/dtd/networkChangeEvents.xsd to see, which elements are allowed, which are necessary and so on.

An example for networkChangeEvents can be found here: https://github.com/matsim-org/matsim-code-examples/blob/11.x/scenarios/equil-extended/networkChangeEvents.xml

In your case, you have to replace <freespeed type="absolute" value="1.0"/> to something like <flowCapacity type="absolute" value="1.0"/>. Please replace the value "1.0" by the value you want to have. You also can use "scaleFactor" instead of "absolute"if you would like to scale it (down) instead setting the explicit value.

whizkid-25 commented 4 years ago

Hi @kt86, Sorry for the inconvenience. Please see the file below.

<?xml version="1.0" encoding="UTF-8"?>

Can I have multiple attributes for a specific route for e.g. freespeed and flowcapacity?

kt86 commented 4 years ago

Once again, the file is missing. I'm not an expert in using the NetworkChangeEvents, but I think changing more than one attribute should be possible.

whizkid-25 commented 4 years ago

networkChangeEvents.txt

Can you please check if the file has been attached? Capture

kt86 commented 4 years ago

Thanks, please try to change freespeed and flowCapacity. in the validation file there is a sequence. It might be, that it is important to follow that sequence. grafik This would also explain, why the error says that lanes is expected.