MATSIM
core
router
InitialNode.java
Go to the documentation of this file.
1
/* *********************************************************************** *
2
* project: org.matsim.*
3
* InitialNode.java
4
* *
5
* *********************************************************************** *
6
* *
7
* copyright : (C) 2013 by the members listed in the COPYING, *
8
* LICENSE and WARRANTY file. *
9
* email : info at matsim dot org *
10
* *
11
* *********************************************************************** *
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* See also COPYING, LICENSE and WARRANTY file *
18
* *
19
* *********************************************************************** */
20
21
package
org.matsim.core.router;
22
23
import
org
.
matsim
.
api
.
core
.
v01
.
network
.
Node
;
24
31
public
class
InitialNode
{
32
//cant make final, extended by OneToManyPathSearch.ToNode
33
//need a decision. Amit Sep'17
34
35
public
Node
node
;
36
// additional travel disutility related to visiting this node
37
public
final
double
initialCost
;
38
// additional travel time related to visiting this node
39
public
final
double
initialTime
;
40
41
public
InitialNode
(
final
Node
node,
final
double
initialCost,
final
double
initialTime) {
42
this.node =
node
;
43
this.initialCost =
initialCost
;
44
this.initialTime =
initialTime
;
45
}
46
47
// allowing node as null; many duplicates of InitialNode does not require node thus removing such duplicate classes by setting node as null. Amit Sep'17
48
public
InitialNode
(
final
double
initialCost,
final
double
initialTime) {
49
this
(null,
initialCost
,
initialTime
);
50
}
51
52
@Override
53
public
String
toString
() {
54
if
(node == null) {
55
return
"[id="
+
" null "
+
"]"
+
56
"[initialCost="
+ this.initialCost +
"]"
+
57
"[initialTime="
+ this.initialTime +
"]"
;
58
}
else
{
59
return
"[id="
+ this.node.
getId
() +
"]"
+
60
"[initialCost="
+ this.initialCost +
"]"
+
61
"[initialTime="
+ this.initialTime +
"]"
;
62
}
63
64
}
65
}
org.matsim.api.core.v01.network
Definition:
Link.java:20
org.matsim.core.router.InitialNode.initialCost
final double initialCost
Definition:
InitialNode.java:37
org.matsim.api.core.v01.Identifiable.getId
Id< T > getId()
org.matsim.core.router.InitialNode
Definition:
InitialNode.java:31
org
org.matsim.core.router.InitialNode.toString
String toString()
Definition:
InitialNode.java:53
org.matsim.core.router.InitialNode.InitialNode
InitialNode(final Node node, final double initialCost, final double initialTime)
Definition:
InitialNode.java:41
org.matsim.api
org.matsim.core.router.InitialNode.InitialNode
InitialNode(final double initialCost, final double initialTime)
Definition:
InitialNode.java:48
org.matsim.core.router.InitialNode.initialTime
final double initialTime
Definition:
InitialNode.java:39
org.matsim.api.core
org.matsim
org.matsim.api.core.v01
Definition:
BasicLocation.java:20
org.matsim.core.router.InitialNode.node
Node node
Definition:
InitialNode.java:35
org.matsim.api.core.v01.network.Node
Definition:
Node.java:39
Generated by
1.8.13