brenobeirigo / darp Goto Github PK
View Code? Open in Web Editor NEWPackage for solving dial-a-ride problems.
License: MIT License
Package for solving dial-a-ride problems.
License: MIT License
Thank you for the helpful scripts and surveys for DARP. The current implementation seems not to include get_data() function, which generates information for the Darp solver from Instance objects.
Is it possible to access some documents or codes to implement the function? The following is what I tried to recover the function (but it does not work correctly).
def get_data(self):
K = self.vehicles # self.config_dict["n_vehicles"]
P = []
D = []
T = self.config_dict["time_horizon_min"]
Q = {vehicle: vehicle.capacity for vehicle in K}
el = {}
d = {}
q = {}
origin_depot = "O"
destination_depot = "D"
for r in self.requests:
P.append(r.pickup_node.id)
D.append(r.dropoff_node.id)
el[r.pickup_node.id] = (r.pickup_tw.earliest, r.pickup_tw.latest)
el[r.dropoff_node.id] = (r.dropoff_tw.earliest, r.dropoff_tw.latest)
d[r.pickup_node.id] = r.pickup_delay
d[r.dropoff_node.id] = r.dropoff_delay
q[r.pickup_node.id] = r.load
q[r.dropoff_node.id] = -r.load
el[origin_depot] = (0, T)
el[destination_depot] = (0, T)
q[origin_depot] = q[destination_depot] = 0
d[origin_depot] = d[destination_depot] = 0
L = {p: self.config_dict["maximum_ride_time_min"] for p in P}
mapping = {
"origin_depot": origin_depot,
"K": K,
"Q": Q,
"P": P,
"D": D,
"L": L,
"el": el,
"d": d,
"q": q,
"dist_matrix": self.dist_matrix,
"total_horizon": T,
"destination_depot": destination_depot,
}
return mapping
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.