-
Notifications
You must be signed in to change notification settings - Fork 1
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
On computing temporal functions for a time-dependent networks using trajectory data (IDEAS) #21
base: master
Are you sure you want to change the base?
Changes from all commits
e006ad0
4d3822c
928b0c2
beb8b0c
d1d7038
c3e3539
3cea3f2
43fd192
a5272fd
1f66faf
da10bc5
5d83a61
2906f3e
7c08382
6f2840f
468a363
760435f
4cf936a
02d7d36
6b464e8
8f54628
d701d35
a458dd4
24ec194
9d44e92
a134c34
4ac9faf
d881d65
a554c7f
8f4a07d
19989af
3fb8eeb
3241e53
00fd97c
8e3d433
e3e64fd
4cdb87e
dfca468
68a79d8
caaaecf
867bc19
fca678f
70568cb
218c576
17c8691
ec13841
8e2dcdb
bed2d54
041635b
34ed185
3979ce1
cdc71ad
3a630c3
bce4f3d
26695f9
ca60561
fb5d3f7
c131407
7b3b4f2
ed12bed
4754268
c7b2edb
a48704c
137615b
7c2201b
a422468
72549b3
ecb98da
d3effc0
bdbf4ee
d59a922
5ecda12
d736dca
0d37048
e0318a0
8694d97
569b9f3
e259917
30caf61
d226e52
f037ac9
a3e723a
09bf2fa
31da478
f64919b
240ff52
26da704
294e609
c4c5538
fbe8d5d
e1a1ebb
51514db
74dc51a
874503a
b19fff5
532458c
2f4346a
a8d5e44
a0d6797
8468c22
72fc90b
f148dd2
ddfc960
c7c0db6
b31d876
46f5b7a
a35b0dc
ffb79cb
082d7b3
e88ffe2
04ea7f2
8311e09
00286d5
e064987
f152694
91521da
6386ba7
40ec305
d391ad8
f15f99f
b78a0a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ null | |
*.aux | ||
*.synctex* | ||
bin | ||
core/.RData |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# remoto - nuvem arida | ||
driver=org.postgresql.Driver | ||
host=jdbc:postgresql://177.130.199.157:8080/fortaleza | ||
user=postgres | ||
password=aridapostgres12 | ||
|
||
#local | ||
#driver=org.postgresql.Driver | ||
#host=jdbc:postgresql://localhost:5432/fortaleza_novo | ||
#user=postgres | ||
#password=postgres |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,29 +15,29 @@ | |
<url>http://arida.github.io/maven-repo/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<licenses> | ||
<license> | ||
<name>GNU Lesser General Public License (LGPL), Version 2.1</name> | ||
<url>http://www.fsf.org/licensing/licenses/lgpl.txt</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<license> | ||
<name>GNU Lesser General Public License (LGPL), Version 2.1</name> | ||
<url>http://www.fsf.org/licensing/licenses/lgpl.txt</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<scm> | ||
<connection>scm:git:git://github.com/ARiDa/graphast.git</connection> | ||
<url>https://github.com/ARiDa/graphast.git</url> | ||
<developerConnection>https://github.com/ARiDa/graphast.git</developerConnection> | ||
<connection>scm:git:git://github.com/ARiDa/graphast.git</connection> | ||
<url>https://github.com/ARiDa/graphast.git</url> | ||
<developerConnection>https://github.com/ARiDa/graphast.git</developerConnection> | ||
</scm> | ||
|
||
<developers> | ||
<developer> | ||
<id>graphast</id> | ||
<name>Graphast</name> | ||
</developer> | ||
</developer> | ||
</developers> | ||
<properties> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
|
@@ -71,15 +71,57 @@ | |
<artifactId>osmpoispbf</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.github.davidmoten</groupId> | ||
<artifactId>rtree</artifactId> | ||
<version>0.7.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependency> | ||
<groupId>com.github.jbytecode</groupId> | ||
<artifactId>RCaller</artifactId> | ||
<version>2.8</version> | ||
</dependency> | ||
|
||
<dependency> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dependencia RCaller aparece 2 vezes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. API necessária para executar comandos do R no Java. |
||
<groupId>com.github.jbytecode</groupId> | ||
<artifactId>RCaller</artifactId> | ||
<version>2.8</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>postgresql</groupId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. evitar a dependencia do postgres |
||
<artifactId>postgresql</artifactId> | ||
<version>9.1-901-1.jdbc4</version> | ||
</dependency> | ||
|
||
<dependency> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. evitar a dependencia do postgres |
||
<groupId>org.postgis</groupId> | ||
<artifactId>postgis-jdbc</artifactId> | ||
<version>1.3.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>3.4</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20160212</version> | ||
</dependency> | ||
|
||
<!-- http://mvnrepository.com/artifact/com.github.jbytecode/RCaller --> | ||
<dependency> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Novamente o RCaller. |
||
<groupId>com.github.jbytecode</groupId> | ||
<artifactId>RCaller</artifactId> | ||
<version>2.8</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
|
@@ -126,21 +168,28 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- | ||
<plugin> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
--> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>2.4.2</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>org.graphast.query.rnn.CompareRNNSearchsMethodsAnalysis</mainClass> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. qual a finalidade do shade? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isso foi necessário para executar a Classe Main através do Maven. Uma vez a classe de analise ficando no Core devemos utilizar essa configuração para executa-la. |
||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,116 @@ | ||
package org.graphast.importer; | ||
|
||
import java.util.Random; | ||
|
||
import org.graphast.model.Graph; | ||
|
||
public class CostGenerator { | ||
|
||
public static int[] generateSyntheticEdgesCosts(int distance) { | ||
|
||
Random random = new Random(); | ||
|
||
int minSpeed, maxSpeed; | ||
int[] syntheticCosts = new int[96]; | ||
|
||
for(int i=0; i<24; i++) { | ||
minSpeed = 14; | ||
maxSpeed = 17; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=24; i<28; i++) { | ||
minSpeed = 6; | ||
maxSpeed = 9; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=28; i<36; i++) { | ||
minSpeed = 1; | ||
maxSpeed = 4; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=36; i<44; i++) { | ||
minSpeed = 6; | ||
maxSpeed = 9; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=44; i<56; i++) { | ||
minSpeed = 1; | ||
maxSpeed = 4; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=56; i<64; i++) { | ||
minSpeed = 14; | ||
maxSpeed = 17; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=64; i<68; i++) { | ||
minSpeed = 6; | ||
maxSpeed = 9; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=68; i<80; i++) { | ||
minSpeed = 1; | ||
maxSpeed = 4; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=80; i<88; i++) { | ||
minSpeed = 6; | ||
maxSpeed = 9; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
for(int i=88; i<96; i++) { | ||
minSpeed = 14; | ||
maxSpeed = 17; | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
return syntheticCosts; | ||
} | ||
|
||
public static void generateAllSyntheticEdgesCosts(Graph graph) { | ||
for (int i = 0; i < graph.getNumberOfEdges(); i++) { | ||
graph.setEdgeCosts(i, CostGenerator.generateSyntheticEdgesCosts(graph.getEdge(i).getDistance())); | ||
} | ||
} | ||
|
||
package org.graphast.importer; | ||
|
||
import java.util.Random; | ||
|
||
import org.graphast.model.Graph; | ||
|
||
|
||
public class CostGenerator { | ||
|
||
public static int[] generateSyntheticEdgesCosts(int distance) { | ||
|
||
Random random = new Random(); | ||
|
||
int minSpeed, maxSpeed; //Millimeters Per Millisecond (mm/ms) | ||
int[] syntheticCosts = new int[96]; | ||
|
||
//1:00h to 6:00h | ||
for(int i=0; i<24; i++) { | ||
minSpeed = 14; // 50km/h | ||
maxSpeed = 17; // 60km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//6:00h to 7:00h | ||
for(int i=24; i<28; i++) { | ||
minSpeed = 6; //21km/h | ||
maxSpeed = 9; //32km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//7:00h to 9:00h | ||
for(int i=28; i<36; i++) { | ||
minSpeed = 1; //3km/h | ||
maxSpeed = 4; //14km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//9:00h to 11:00h | ||
for(int i=36; i<44; i++) { | ||
minSpeed = 6; //21km/h | ||
maxSpeed = 9; //32km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//11:00h to 14:00h | ||
for(int i=44; i<56; i++) { | ||
minSpeed = 1; //3km/h | ||
maxSpeed = 4; //14km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//14:00h to 16:00h | ||
for(int i=56; i<64; i++) { | ||
minSpeed = 14; //50km/h | ||
maxSpeed = 17; //60km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//16:00h to 17:00h | ||
for(int i=64; i<68; i++) { | ||
minSpeed = 6; //21km/h | ||
maxSpeed = 9; //30/km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//17:00h to 20:00h | ||
for(int i=68; i<80; i++) { | ||
minSpeed = 1; //3km/h | ||
maxSpeed = 4; //14km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//20:00h to 22:00h | ||
for(int i=80; i<88; i++) { | ||
minSpeed = 6; //21km/h | ||
maxSpeed = 9; //30/km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
//22:00h to 00:00h | ||
for(int i=88; i<96; i++) { | ||
minSpeed = 14; //50km/h | ||
maxSpeed = 17; //60km/h | ||
|
||
syntheticCosts[i] = distance/(random.nextInt(maxSpeed-minSpeed)+minSpeed); | ||
|
||
} | ||
|
||
return syntheticCosts; | ||
} | ||
|
||
public static void generateAllSyntheticEdgesCosts(Graph graph) { | ||
for (int i = 0; i < graph.getNumberOfEdges(); i++) { | ||
graph.setEdgeCosts(i, CostGenerator.generateSyntheticEdgesCosts(graph.getEdge(i).getDistance())); | ||
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mirla, acho que este arquivo não deveria ser enviado por ter dados sensíveis e bem específicos do banco.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concordo. Arquivo removido.