MATSIM
vehicles
CostInformation.java
Go to the documentation of this file.
1
/* *********************************************************************** *
2
* project: org.matsim.*
3
* *********************************************************************** *
4
* *
5
* copyright : (C) 2019 by the members listed in the COPYING, *
6
* LICENSE and WARRANTY file. *
7
* email : info at matsim dot org *
8
* *
9
* *********************************************************************** *
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* See also COPYING, LICENSE and WARRANTY file *
16
* *
17
* *********************************************************************** */
18
19
package
org.matsim.vehicles;
20
21
import
org
.
matsim
.
utils
.
objectattributes
.
attributable
.
Attributable
;
22
import
org
.
matsim
.
utils
.
objectattributes
.
attributable
.
Attributes
;
23
import
org
.
matsim
.
utils
.
objectattributes
.
attributable
.
AttributesImpl
;
24
25
public
final
class
CostInformation
implements
Attributable
{
26
27
// maybe at least these subtypes should be immutable? kai, aug'19
28
// No, the decision is to rather have the typical matsim data model where this is an object-oriented database in memory, and everything is settable.
29
// kai, sep'19
30
31
private
Double
fixed
;
32
private
Double
perMeter
;
33
private
Double
perSecond
;
34
private
Attributes
attributes
=
new
AttributesImpl
() ;
35
36
/* package-private */
CostInformation
() { }
37
public
Double
getFixedCosts
() {
38
return
fixed
;
39
}
40
public
Double
getCostsPerMeter
() {
41
return
perMeter
;
42
}
43
public
Double
getCostsPerSecond
() {
44
return
perSecond
;
45
}
46
@Override
public
Attributes
getAttributes
() {
47
return
attributes
;
48
}
49
public
CostInformation
setFixedCost
( Double fixed ){
50
this.fixed =
fixed
;
51
return
this ;
52
}
53
public
CostInformation
setCostsPerMeter
( Double perMeter ){
54
this.perMeter =
perMeter
;
55
return
this ;
56
}
57
public
CostInformation
setCostsPerSecond
( Double perSecond ){
58
this.perSecond =
perSecond
;
59
return
this ;
60
}
61
@Deprecated
// refactoring device, please inline
62
public
double
getFix
() {
63
return
getFixedCosts
() ;
64
}
65
@Deprecated
// refactoring device, please inline
66
public
double
getPerDistanceUnit
() {
67
return
getCostsPerMeter
() ;
68
}
69
@Deprecated
// refactoring device, please inline
70
public
double
getPerTimeUnit
() {
71
return
getCostsPerSecond
() ;
72
}
73
}
org.matsim.utils.objectattributes.attributable.Attributable
Definition:
Attributable.java:27
org.matsim.vehicles.CostInformation.getCostsPerSecond
Double getCostsPerSecond()
Definition:
CostInformation.java:43
org.matsim.vehicles.CostInformation.perMeter
Double perMeter
Definition:
CostInformation.java:32
org.matsim.vehicles.CostInformation.attributes
Attributes attributes
Definition:
CostInformation.java:34
org
org.matsim.vehicles.CostInformation.perSecond
Double perSecond
Definition:
CostInformation.java:33
org.matsim.utils
org.matsim.utils.objectattributes
org.matsim.vehicles.CostInformation.setCostsPerSecond
CostInformation setCostsPerSecond(Double perSecond)
Definition:
CostInformation.java:57
org.matsim.vehicles.CostInformation
Definition:
CostInformation.java:25
org.matsim.vehicles.CostInformation.getPerDistanceUnit
double getPerDistanceUnit()
Definition:
CostInformation.java:66
org.matsim.vehicles.CostInformation.getAttributes
Attributes getAttributes()
Definition:
CostInformation.java:46
org.matsim.vehicles.CostInformation.getCostsPerMeter
Double getCostsPerMeter()
Definition:
CostInformation.java:40
org.matsim.utils.objectattributes.attributable
Definition:
Attributable.java:22
org.matsim.vehicles.CostInformation.fixed
Double fixed
Definition:
CostInformation.java:31
org.matsim.utils.objectattributes.attributable.Attributes
Definition:
Attributes.java:29
org.matsim.utils.objectattributes.attributable.AttributesImpl
Definition:
AttributesImpl.java:31
org.matsim
org.matsim.vehicles.CostInformation.getFixedCosts
Double getFixedCosts()
Definition:
CostInformation.java:37
org.matsim.vehicles.CostInformation.setCostsPerMeter
CostInformation setCostsPerMeter(Double perMeter)
Definition:
CostInformation.java:53
org.matsim.vehicles.CostInformation.getFix
double getFix()
Definition:
CostInformation.java:62
org.matsim.vehicles.CostInformation.setFixedCost
CostInformation setFixedCost(Double fixed)
Definition:
CostInformation.java:49
org.matsim.vehicles.CostInformation.getPerTimeUnit
double getPerTimeUnit()
Definition:
CostInformation.java:70
Generated by
1.8.13