Description Details Slots Slots (from Node) Creating objects of type Warehouse Methods Derived Classes To be used for Note Author(s) See Also Examples
This class is part of the HNUORTools. It represents the base class for every locateable class in an Operations-Research (OR)-context.
Find here the defined slots for this class.
supply
: Object of class
"numeric"
, containing the amount for the supply.
The default value cannot be negative.
fixcosts
: Object of class
"numeric"
, containing the amount for the fixcosts
The default value cannot be negative.
open
: Object of class "logical"
,
indicating if a Warehouse is used within a WLP.
vrp
: Object of class "list"
, a List
of Tours genereated for a VRP.
isDummy
:Object of class "logical"
, indicating if a
Warehouse was added in an algorithm (e.g.
TPP-Column-Minimum-Method) in order to avoid degenerated
soulutions.
Node
)id
: Object of class
"character"
, containing data from id.
Should be unique. The default value will be
caluclated randomly.
label
: Object of
class "character"
, containing the label of the
Warehouse
. The default value will be
caluclated randomly.
x
: Object of class
"numeric"
, containing the x-coordinate of the
Warehouse
. The default value will be
caluclated randomly.
y
: Object of class
"numeric"
, containing the y-coordinate of the
Warehouse
. The default value will be
caluclated randomly.
Warehouse
S4-Object
new("Warehouse", ...)
data.frame
as.Warehouse{<data.frame>}
See also below in the
Methods-Section.
list
as.Warehouse{<list>}
See also
below in the Methods-Section.
as.list(Warehouse, ...)
Converts a Warehouse
into a
list
. ...
are user-defined (not
used) parameters.
as.data.frame(Warehouse,
...)
Converts a Warehouse
into a
data.frame
. as.data.frame
accepts
the optional parameter withrownames
of class
"logical"
(default is TRUE
). If
withrownames == TRUE
the returned
data.frame
will recieve the id
as
rowname. ...
are user-defined (not used)
parameters.
as.Warehouse(obj)
Converts
an object of class data.frame
or of class
list
into a Warehouse
.
is.Warehouse(obj)
Checks if the object
obj
is of type Warehouse
.
getDistance
Calculating the
distance between two Nodes
(As the classes
Customer
and Warehouse
depend
on Node
, distances can be calculated
between any of these objects).
getpolar
Calculating the
polar-angle to the x-Axis of a link, connecting two
Nodes
(As the classes
Customer
and Warehouse
depend
on Node
, polar-angles can be calculated
between any of these objects).
None.
Warehouse-Location-Problem
Transportation Problem
Vehicle Routing Problem
for citing use: Felix Lindemann (2014). HNUORTools: Operations Research Tools. R package version 1.1-0. http://felixlindemann.github.io/HNUORTools/.
Dipl. Kfm. Felix Lindemann felix.lindemann@hs-neu-ulm.de
Wissenschaftlicher Mitarbeiter Kompetenzzentrum Logistik Buro ZWEI, 17
Hochschule fur angewandte Wissenschaften Fachhochschule Neu-Ulm | Neu-Ulm University Wileystr. 1
D-89231 Neu-Ulm
Phone +49(0)731-9762-1437 Web www.hs-neu-ulm.de/felix-lindemann/ http://felixlindemann.blogspot.de
The classes are derived from this class and the following Methods can be used with this class.:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # create a new Warehouse with specific values
x<- new("Warehouse", x= 10, y=20, id="myid", label = "mylabel", supply = 20)
x
# create from data.frame
df<- data.frame(x=10,y=20, supply = 30)
new("Warehouse", df)
as(df, "Warehouse")
as.Warehouse(df)
#create some Warehouses
n1 <- new("Warehouse",x=10,y=20, supply = 30, id ="n1")
n2 <- new("Warehouse",x=13,y=24, supply = 40, id ="n2")
# calculate Beeline distance
#getDistance(n1,n2) # should result 5
#getDistance(n1,n2, costs = 2) # should result 10
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.