alternative(name = "NewAlternative", ...)
Create a data frame containing data of one decision alternative.
name
, character(1), represents the alternative's name. The arguments ...
define the alternative's values to be put in the data frame.
Please see set_alternative
for the syntax of ...
.
as_character(alt, transpose = FALSE, structure = FALSE, round = NULL)
The argument alt
is assumed to be a data frame containing data of one or more decision alternatives
with values represented by numeric vectors. as_character(alt)
transforms the values of
alt
into a more human-readable form using character strings.
Additionally, transpose = TRUE
transposes the data frame,
so that rows correspod to attributes and columns to alternatives.
structure = TRUE
additionally displays the tree structure of attributes;
the latter works only with transpose = TRUE
.
round
denotes the number of decimal digits for printing numeric values.
att_index(atts, use_id = TRUE)
Find the indices of attributes.
atts
is a character vector of attribute IDs (when use_id = TRUE
) or original DEXi attribute
names (when use_id = FALSE
). Result: a numeric vector containing the set of indices.
Example: Car$att_index(c("PRICE", "TECH.CHAR."))
att_stat()
Count the number of all attributes (including the virtual root),
as well as the number of basic, aggregate and linked attributes in the model.
Result: a list of the form list(all=..., basic=..., aggregate=..., link=...).
attrib(atts)
A general function for finding attributes in the model. atts
is a vector or list of
DexiAttribute
s, attribute indices (integer) or attribute IDs (character).
Result: a list of found DexiAttribute
s (or NA
s if not found).
Example: Car$attrib(list(5, "PRICE", "TECH.CHAR."))
compare_alternatives(...)
Calls compare_alternatives(.self, ...)
to carry out Comparison of Alternatives.
Please see compare_alternatives
for the description of ...
arguments.
convert(...)
Calls convert_alternatives(.self, ...)
to convert decision alternatives' data.
Please see convert_alternatives
for the description of ...
arguments.
evaluate(...)
Calls evaluate(.self, ...)
to evaluate decision alternatives.
Please see evaluate
for the description of ...
arguments.
first()
Return first non-virtual model attribute, i.e., first descendant of model$root.
initialize(name = "", description = "", root = NULL, linking = FALSE, ...)
Initialize a DexiModel
object.
link_attributes()
Carries out the linking of attributes.
DEXi attributes that have the same names and value scales,
and satisfy some other constraints to prevent making cycles in the model,
are linked together so that they logically represent a single attribute.
In this way, a tree of attributes is conceptually turned in a hierarchy (directed acyclic graph).
If linking = TRUE
, link_attributes
is called by setup()
after reading the model.
plus_minus(...)
Calls plus_minus(.self, ...)
to carry out Plus-Minus Analysis.
Please see plus_minus
for the description of ...
arguments.
scale(atts)
Find attribute scales. atts
is a vector of DexiAttribute
s.
Result: a vector of the corresponding DexiScale
s (or NA
s).
selective_explanation(...)
Calls selective_explanation(.self, ...)
to carry out Selective Explanation.
Please see selective_explanation
for the description of ...
arguments.
setup()
Called by initialize()
as the last step that establishes consistent internal data structures by
making unique attribute IDs, linking attributes (if required), making lists of attributes and their IDs,
and creating a data frame of alternatives.
verify()
Check the correctnes of a DexiModel
object and its fields. Result: error()
or TRUE
.