This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "or_tools_route.h" | |
#include "ortools/constraint_solver/routing.h" | |
#include <vector> | |
#include <cstdio> | |
using operations_research::RoutingModel; | |
#define DEPOT_COUNT 4#include "or_tools_route.h" | |
#include "ortools/constraint_solver/routing.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vehicle codes | |
Code,Vehicle | |
C,car | |
T,truck | |
V,"van, ute" | |
M,motorcycle | |
X,taxi or taxi van | |
P,moped | |
B,bus |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<osmChange version="0.6" generator="ugly revert script"> | |
<create> | |
<node id="-673983125" version="3" timestamp="2014-02-13T04:44:04Z" uid="142831" user="Rudy355" changeset="#CHANGESET" lat="-36.8704049" lon="174.7604200"> | |
<tag k="ref" v="8505"/> | |
<tag k="highway" v="bus_stop"/> | |
<tag k="name" v="Kelly Street"/> | |
</node> | |
</create> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sqrt = math.sqrt | |
local huge = math.huge | |
local delta = 1 | |
while delta * delta + 1 ~= 1 do | |
delta = delta * 0.5 | |
end | |
-- vectors ------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sqrt = math.sqrt | |
local huge = math.huge | |
local delta = 1 | |
while delta * delta + 1 ~= 1 do | |
delta = delta * 0.5 | |
end | |
-- vectors ------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Changing TABLE_SIZE didn't seem to change much | |
local TABLE_SIZE = 10000 | |
local ITERATIONS = (jit and 100000000 or 10000000) / TABLE_SIZE | |
local a = {} | |
for i = 1, TABLE_SIZE do | |
a[i] = i * i | |
end | |
local sum, start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Testing map and filter without intermediate tables | |
-- So far it's slower and more complicated than with those 'wasteful' | |
-- intermediate tables | |
-- If you're comparing PUC lua and luajit, note that the tests to 10 times | |
-- more iterations for luajit. | |
local TABLE_SIZE = 100 | |
local ITERATIONS = jit and 1000000 or 100000 |