Skip to contents

The function prepare_calendar_simple() creates a Calendar from project, action, and horizon informations. It used to construct simple Calendar objects, either for Case objects without event slots, or to declined as probabilistic Calendar objects.

Usage

prepare_calendar_simple(project, action, horizon)

Arguments

project

data.frame describing a single project

action

data.frame describing a set of actions

horizon

integer vector giving the time horizon (in years)

Value

The result will always be a simple Calendar object, i.e. a Calendar with only one branch in slot tree and no prob slot. The cost slot will be present as this information is given in action.

Details

project shoudl be a data.frame with a format consistent with the one of slot poject of Case objects. The function can be called with a project with only an unique project. This is how it is expected to work when called from calendar() function. It can also be called with a project with several projects. In this case, project is first split by project and the function is recursively called.

action is a data.frame of actions. There may be too much actions, i.e. actions that are not used by the given project but not too few.

horizon is necessary as this information is missing in project and action.

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org