Skip to content

Commit c520f0b

Browse files
authored
Merge pull request #114 from moia-oss/update-matsim-02-09
Update matsim 02 09
2 parents c5002ce + be69aef commit c520f0b

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

.github/workflows/deploy-dtds.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: deploy-dtds-on-website
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- matsim/src/main/resources/dtd
9+
10+
jobs:
11+
rsync-dtds:
12+
name: sync DTDs to website
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: rsync dtds
17+
uses: burnett01/[email protected]
18+
with:
19+
switches: -avz
20+
path: matsim/src/main/resources/dtd/
21+
remote_path: ~/httpdocs/files/dtd/
22+
remote_host: ${{ secrets.WEBSITE_DEPLOY_HOST }}
23+
remote_user: ${{ secrets.WEBSITE_DEPLOY_USER }}
24+
remote_key: ${{ secrets.WEBSITE_SSH_PRIVATE_KEY }}

contribs/drt/src/main/java/org/matsim/contrib/drt/prebooking/PrebookingManager.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
import org.matsim.api.core.v01.events.handler.PersonStuckEventHandler;
1010
import org.matsim.api.core.v01.network.Link;
1111
import org.matsim.api.core.v01.network.Network;
12-
import org.matsim.api.core.v01.population.Activity;
13-
import org.matsim.api.core.v01.population.Leg;
14-
import org.matsim.api.core.v01.population.Person;
15-
import org.matsim.api.core.v01.population.Plan;
12+
import org.matsim.api.core.v01.population.*;
1613
import org.matsim.contrib.drt.passenger.AcceptedDrtRequest;
1714
import org.matsim.contrib.drt.prebooking.unscheduler.RequestUnscheduler;
1815
import org.matsim.contrib.dvrp.fleet.DvrpVehicle;
@@ -398,10 +395,9 @@ private void processRejections(double now) {
398395
if(abortRejectedPrebookings) {
399396
for (Id<Person> passengerId : item.request.getPassengerIds()) {
400397
MobsimAgent agent = internalInterface.getMobsim().getAgents().get(passengerId);
401-
((Activity) WithinDayAgentUtils.getCurrentPlanElement(agent)).setEndTime(Double.POSITIVE_INFINITY);
402-
((Activity) WithinDayAgentUtils.getCurrentPlanElement(agent)).setMaximumDurationUndefined();
403398
((HasModifiablePlan) agent).resetCaches();
404-
internalInterface.getMobsim().rescheduleActivityEnd(agent);
399+
agent.setStateToAbort(mobsimTimer.getTimeOfDay());
400+
internalInterface.arrangeNextAgentState(agent);
405401
eventsManager.processEvent(new PersonStuckEvent(now, agent.getId(), agent.getCurrentLinkId(),
406402
this.mode));
407403
internalInterface.getMobsim().getAgentCounter().incLost();

0 commit comments

Comments
 (0)