Coder Social home page Coder Social logo

matsim-python-tools's People

Contributors

billyc avatar davibicudo avatar gabrpt avatar janekdererste avatar ksauzz avatar neuma avatar nitnelav avatar rakow avatar simei94 avatar tnoud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

matsim-python-tools's Issues

Protobuf import error

Fresh installation of matsim-tools throws this error:

Traceback (most recent call last):
 File "~/calibrate_MT_100.py", line 12, in <module>
  from matsim import calibration
 File "~/.local/lib/python3.9/site-packages/matsim/init.py", line 1, in <module>
  from . import Events, Network, Plans, TripEventHandler, writers
 File "~/.local/lib/python3.9/site-packages/matsim/[Events.py](https://events.py/)", line 10, in <module>
  from .pb.Ids_pb2 import ProtoId
 File "~/.local/lib/python3.9/site-packages/matsim/pb/Ids_pb2.py", line 31, in <module>
  _descriptor.EnumValueDescriptor(
 File "~/.local/lib/python3.9/site-packages/google/protobuf/[descriptor.py](https://descriptor.py/)", line 755, in new
  _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

We might want to update the generated protobuf files.

A question about analysising for the output files.

Hello,

Now, I have a project, in which I need to analyze the output files and obtain some useful data.

I hope to obtain the map data and the state of each edge in the map at every time. More detailly, I want to obtain the data that for each time point, how long a vehicle will take to traverse a route (edge).

May I ask if it is possible to implement by using this python-tools.

Thanks!!!

Best,
Hao

how to you get to the free form person attributes?

In xml, we have

	<person id="01067005_518">
		<attributes>
			<attribute name="age" class="java.lang.Integer">45</attribute>
			<attribute name="district" class="java.lang.String">Dresden</attribute>
			...
		</attributes>
	</person>

How to you get to, say, age?

About the plan reader

Hi!

I'm using the plan reader to analyze the plan file. But I have met some problems here. I can't filter the plan file after I got the matsim.plan_reader generator. For example, I want to get all legs with mode= pt in the plan file and no matter what trip type it was. And I use the code as follows:

for person, plan in plans: pt_activities = filter( lambda e: e.tag == 'leg' and e.leg['mode'] == 'pt', plan)

It seems that I didn't filter the activities I want.

How should I work with that? I attached the plan file that I am using now.

~P0OVU$VX5SCTL 2SK 6ANG

Thanks a lot for the help!

A question about analysising for the output files.

Hello,

Now, I have a project, in which I need to analyze the output files and obtain some useful data.

I hope to obtain the map data and the state of each edge in the map at every time. More detailly, I want to obtain the data that for each time point, how long a vehicle will take to traverse a route (edge).

May I ask if it is possible to implement by using this python-tools.

Thanks!!!

Best,
Hao

Invalid projection

Hello, I'm trying to run geo = net.as_geo() but I get this error:

CRSError: Invalid projection: Atlantis: (Internal Proj Error: proj_create: unrecognized format / unknown name)

could you please let me know how can I solve it?

Thanks

not reading persons when there are no plans

I just tried reading the episim input plans ... that uses up time (so it is going through the file) ... but it does not return any material.

Reason, as far as I can tell, is that persons without plans are not read.

In this case, however, we need persons without plans, since we store the person attributes in those persons.

Could you please change that? Thanks.

A question about analysising for the output files.

Hello,

Now, I have a project, in which I need to analyze the output files and obtain some useful data.

I hope to obtain the map data and the state of each edge in the map at every time. More detailly, I want to obtain the data that for each time point, how long a vehicle will take to traverse a route (edge).

May I ask if it is possible to implement by using this python-tools.

Thanks!!!

Best,
Hao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.