-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scaling #3576
Comments
I strongly support adding a config param scaling in golbal config group. We already have in SimWrapperConfigGroup a param sampleSize, but simwrapper contrib is not used by everyone and we shouldn't depend on it. But it underlines that others saw the need for such a param already. It would be much nicer to have something in global config we can depend on. |
I'm also in favor - and yes, we use internally a parameter like this. |
When we introduce this new factor, should this follow the current logic, where the scaling factors reduce the capacities on the network, or should we interpret the scaling factor the other way round? I would favor a scaling factor of 10 for a 10% sample, since our input material, i.e. the population is already scaled down, and we need to interpret the simulation results as if they were 10 times bigger. |
I would recommend to describe "what is" in the config (e.g., scale=0.1 for a 10% scenario) instead of "what should be done to scale up to 100%". Currently, the two main parameters storage and flow cap also describe what is present in the scenario. Introducing a new way of interpreting parameters might cause confusion. Also, I guess, it might not be guaranteed, that all outputs quantities can be scaled up linearily. |
Mhm, a matter of taste, I'd say. Also a matter of perspective - we tend to use a 100% population and sample it down at the beginning of a simulation 😆 |
I am currently working on this issue in our Matsim Advanced lecture.
This is harder than I thought. I haven't found any example where in config group A we depend on values from config group B. Not sure if this would even work if we cannot depend on having being read in a certain order. We could work around that and replace e.g. all calls of qSimConfigGroup.getFlowCapFactor() with something else, but qSimConfigGroup.getFlowCapFactor() is used all around matsim-libs and certainly also outside. |
@paulheinr Maybe you have some intuition how to solve the QSimConfigGroup depends on GlobalConfigGroup issue? |
While upscaling the simulation results it is not clear how to deal with vehicle volumes. Public transit vehicles usually operate at 100% independent from population sample size. Therefore public transit volumes should not be scaled up. For drt there are different approaches to model sample sizes (less seats per vehicle or smaller fleet size) and upscaling is not necessarily linear. I don't know how scaling is handled in freight traffic. @rewertvsp ? In the mobsim we can reduce the capacity consumption of buses by setting small pcuEquivalents. However, pcuEquivalents can also be used to model that a truck uses more capacity than a passenger car. So this does not seem to be a reliable measure to define which vehicles are to be scaled up and which are not. We can
|
I agree with that. I think the question is, whether the demand or the supply is the reference. When we build models, our input network is fixed and we have a variable population (size). Thus, in my opinion the scale factor should have as reference the adjustments of the network in order to match the given population. |
Good question. We have the interface |
We are currently developing yet another This has the following differences compared to the current implementation:
This does not solve the issue of scaling the passenger capacities of vehicles. We have left this property untouched so far. However, vehicle sources are now free to adjust passenger capacities per vehicle type. |
Just a little remark, that some code on the analysis side already has their own scaling config parameters. |
I just talked to @rewertvsp. For freight there are multiple approaches: keep all freight demand, vehicles and tours at 100% or downsample the number of vehicles and tours. This then intersects with having either no passenger demand at all in the model or various population sample sizes. So we have scenarios with 100% freight demand and 3% population (e.g. RVR) and others with 10% freight demand and 10% population. That means we can have multiple different scaling factors in the same scenario:
I like @Janekdererste 's approach in the new mobsim that each vehicle type should provide their scaling factor for network capacity utilisation, in addition to pce. Talking of scaling in terms of a decimal value representing the sample size is confusing in this case, so I would switch to using an upscaleFactor. This would make for the following example vehicle types:
Then we could eliminate network flowCapacityFactor and storageCapacityFactor, right? However, this also removes the possibility to scale flowCapacity and storageCapacity differently. I think we currently don't use that. Still sooner or later someone might miss it (e.g. to combat scaling artefacts while using a very small population sample). So should we set flowCapacity and storageCapacity separately per vehicle type? It would be nice if networkCapacityScaling and vehicleCapacityScaling could be set via config, so as to use the same vehicle input files no matter which population sample size is used. For the output analisys we would need parameters for population sample size and freight demand sample size anyway. This would need some association between vehicle types and their usages. Currently, only transit vehicles would need vehicleCapacityScaling and they are set in a separate transitVehicles file. But for networkCapacityScaling there is no identifier to tell that vehicle types car and bike are used for passenger transport and should have networkCapacityScaling set according to population sample size and truck40t should not be scaled. My first approach was adding attributes per VehicleType networkCapacityScalingType=upScaleForPopulationSampleSize/upScaleForFreightSampleSize/doNotScale and vehicleCapacityScalingType=downScaleToPopulationSampleSize/downScaleToFreightSampleSize/doNotScale Instead, we might define an interface VehicleScaling and assign one implementation to a vehicle type. E.g.
For analysing outputs we need to differentiate passenger agents and freight agents. This can probably be done using the subpopulations. So the current proposal to cater for everything would be:
PassengerDemandSampleSize could be moved to the plans file itself since we tend to have one plans file per sample size. But this gets confusing if the sample is reduced after reading a plans file or if the population is created in code. All in all this gets much more complicated than I thought. However, the current manual scaling scattered all over matsim is complicated, too and likely less coherent. Opinions? |
Currently all analysis code I found either scales with a single scalingFactor for all trips / vehicles considered or does not scale at all. (single factor each in contribs application, noise and accidents) |
Should include the following:
The text was updated successfully, but these errors were encountered: