A problem in modeling the emissions in SUMO - sumo

Trying to model vehicles' emissions, I used the HBEFA model. There is an issue when the vehicles stop( the first two seconds in my scenario) or decelerate so that no emissions data are recorded during these situations. While I replaced my emission models with PHEMlight, I noticed that getting the license from TU Graz is a must for modeling the buses' emissions which is not possible for me at the moment. Do you have any idea to solve this issue?
regards,
Ali

Essentially this is an open bug in SUMO see https://github.com/eclipse/sumo/issues/2110 and the references therein. There is currently no good workaround except for manually adapting the emission values after the run for those vehicles by using the emissions for a slow moving bus. I will try to resolve this for the next release though

Related

Looking for a base for a constraint solving problem

I am new to OptPlanner but I have a reasonable understanding of constraint solving alebit somewhat dated.
I have a problem I want to model. On the one hand the National Grid have requirements to save electricity between defined time slots on specific days in specific locations (post codes). On the other individuals with static or mobile batteries charge their batteries at some point during a 24 hour cycle and have a need to get a specific amount of charge into those batteries. I need to model a set of constraints at the top (the grid) and the constraints at the bottom (the individuals) to ensure the individuals get what they need and the grid saves what it requires.
What model should I pick and why?
I am just starting this so I have not tried anything yet. I would prefer a Java/SpringBoot solution.
Many thanks for any help.
Steve T
First read the domain modeling guide in the docs to understand my answer below.
https://www.optaplanner.org/docs/optaplanner/latest/design-patterns/design-patterns.html#domainModelingGuide
I think the maintenance scheduling quickstart might be a good start. Code is here:
https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/maintenance-scheduling
Motivation: it sounds like there could be gaps between charging at the charging stations, so a chained through time model does not fit. You're not solving a VRP anyway. So I suspect a timegrain model it is, which is what the maintenance scheduling quickstart actually uses.

Hybrid Vehicle Simulation with State of Charge Information

My fellow researchers and I have been using SUMO for a bit of time now, and have been helped greatly by the informative posts here in the past - so I just wanted to share some appreciation ahead of time :)
My question is: Is it possible to append a Hybrid Vehicle model in the PHEM program files seen below?:
https://github.com/planetsumo/sumo/tree/master/sumo/src/utils/emissions
Ideally, this hybrid vehicle would be able to include the State of Charge (SOC) control and include the temporal changes of SOC as the vehicle travels according to the drive cycle, just as there are temporal changes to Fuel Consumption, emissions, etc. If possible, we would hope to create a new column for SOC information in the emissionsDrivingCycle output cited here: http://sumo.dlr.de/wiki/Tools/Emissions#emissionsDrivingCycle
Our team was thinking that it would be great to use the emissionsDrivingCycle tool with this new vehicle type, as we could use the standard vehicle definitions in PHEMLight, and define traffic in the standard ways. Essentially we are wondering: 1) Is it feasible to implement a Hybrid Vehicle energy balance model in the PHEM files, and 2) Could these files then be compiled to form a new version of the existing emissionsDrivingCycle tool?
Before we started to play around too much, we thought it would be best to ask the group first to see what the community might have to say.
Thank you all once again!
Regards,
Van
First of all, there are several PHEMlight emission types available but there is currently no hybrid. The problem with hybrids is, that you need essentially to change the emission model while the vehicle is running from combustion to electric (and vice versa) and there may be very different strategies in place for doing so. I would propose to make this change rather explicit than hiding it in an additional emission model file which can do nothing but average over all the different strategies out there. So you can switch emission models in a running simulation simply by giving a new vehicle type to an existing vehicle using TraCI. In Python this would be
traci.vehicle.setType.

Number of Vehicles in Real-Time

I'm using Optaplanner VRP tool to solve some VRP instances. Is there a way to view the number of vehicles being used in real-time? Also, what algorithm does Optaplanner employ for solving VRP?
Thanks,
Mayank
When you're listening to new best solution events in real time (Solver.addSolverListener), it's straightforward to determine the number of vehicles used, by iterating all Vehicle instances and checking if nextVisit isn't null.
Note that if you want to minimize the number of vehicle used, you'll need to add a hard or softt constraint for that, which is simple: when Vehicle(nextVisit != null) then addHard(-1); end
As for the algorithm used to solve VRP: check the solver config XML. We support many algo's, in the vrp benchmark config XML we let them battle against each other to determine the best algo for production.

Getting started with Finite Elements methods

There is a cubic block of fractured rock; the question is:
how to simulate fluid flow from top-side to down-side or left-side to right-side?
Is FEA (FEM,...) the only practical solution?
If so for the question above in its simplest conditions, that is, flow can happen only through fractures; no interaction between matrix and the fluid; etc etc how to have a quick simulation with FEA?
Is this practical someone with professionality in FEA could do this in a few minutes? Suppose there is already a suitable mesh generated.
If not what would you recommend to get started rapidly to be able to solve such simple cases?
Is there anybody having experience with similar problem (flow modeling); if so what did you use and how did you fulfilled the job?
Note that we are aware of availability of many FEM packages e.g., FEniCS, OpenFoam, ....
Your question refers to simulation of the fluid in the porous medium, e.g. the rock.
I highly recommend using LBM instead of FEM-based methods. LBM simulates the flow in porous media by nature. Phys Review E contains publications about that approach. What is even more attractive, LBM can be also easily parallelized on GPU.
There are a number of numerical techniques that could be used to solve this problem, finite elements being probably the most common. If you have a mesh of the fluid flow domain already (presumably the voids/cracks in the rock) it would be very straightforward to set up and run the flow model with pretty much any CFD package (finite element based or not) and most people with any exposure to FEA should be able to do it. I am assuming that you want to understand the fluid flow within the rock in some detail, rather than just evaluate the effects of the rock on the flow in some larger flow domain. In the latter case, there are other approaches which might be more computationally efficient.
You could use the one-dimensional form of Darcy's Law.

Does anyone have any idea how to create a 2D skeleton with the Kinect depthmap?

I'm currently using a Processing Kinect library which supplies a depth map. I was wondering how I could take that and use it to create a 2D skeleton, if possible. Not looking for any code here, just a general process I could use to achieve those results.
Also, given that we've seen this in several of the Kinect games so far, would it be difficult to have multiple skeletons running at once?
Disclaimer: the reason why you still didn't get an answer for this question is probably because that's a current research problem. So I can't give you a direct answer but will try to help with some information and useful resources for this topic.
There are mainly 2 different approaches to create a skeleton from a depth map. The first one is to use machine learning, the second is purely algorithmic.
For the machine learning one, you'd need many samples of people doing a predetermined move, and use those samples to train your favorite learning algorithm. That's the approach that was taken and implemented by Microsoft in the XBox (source), it works really well BUT you need millions of samples to make it reliable... quite a drawback.
The "algorithmic" approach (understand without using a training set) can be done in many different ways and is a research problem. It's often based on modeling the possible body postures and trying to match that with the depth image received. That's the approach that was chosen by PrimeSense (the guys behind the kinect depth camera technology) for their skeleton tracking tool NITE.
The OpenKinect community maintains a wiki where they list some interesting research material about this topic. You might also be interested in this thread on the OpenNI mailing list.
If you're looking for an implementation of a skeleton tracking tool, PrimeSense released NITE (closed source), the one they made: it's part of the OpenNI framework. That's what's used in most of the videos you might have seen that involve skeleton tracking. I think it's able to handle up to 2 skeletons at the same time, but that requires confirmation.
The best solution is to use FAAST (http://projects.ict.usc.edu/mxr/faast/) which requires OpenNI. I have struggled to get OpenNI to work on my computer. I have not seen an approach yet using Code Laboratories' CL NUI.
An algorithmic approach is http://code.google.com/p/skeletonization/ but you may have a problem because your depthmap only represents surfaces and no closed objects.