-
Notifications
You must be signed in to change notification settings - Fork 179
faq 238190593
by Gregory Macfarlane on 2018-03-20 16:36:01
It is possible to assign different strategies to different sub-populations? If I am running a simulation with both freight vehicles and with resident passengers, for instance, I want to disable mode innovation for the freight tours but enable it for the passenger daily plans. Where would I start with this?
by Joschka Bischoff on 2018-03-20 16:42:45
Yes, this possible (almost) out of the box: You'll need a population attributes file containing a subpopulation (ObjectAttributesWriter will do this) attribute for every agent and then you can set for each strategy the weight per subpopulation, i.e.,
<parameterset type="strategysettings">
<param name ="subpopulation" value = "freight"/>
<param name="strategyName" value="ReRoute"/>
<param name="weight" value="0.1"/>
</parameterset
The personAttributes file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE objectAttributes SYSTEM "http://matsim.org/files/dtd/objectattributes_v1.dtd">
<object id="agent_007">
<attribute name="subpopulation" class="java.lang.String">superSpyAgent</attribute>
</object>
</objectAttributes>
Joschka
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq