Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions

frepple::OperationFixedTime Class Reference

Models an operation that takes a fixed amount of time, independent of the quantity. More...

#include <model.h>

Inheritance diagram for frepple::OperationFixedTime:
frepple::Operation frepple::utils::HasName< Operation > frepple::HasLevel frepple::Plannable frepple::utils::HasDescription frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::utils::Object frepple::HasProblems frepple::Solvable frepple::utils::PythonExtensionBase

List of all members.

Public Member Functions

void endElement (XMLInput &, const Attribute &, const DataElement &)
virtual PyObject * getattro (const Attribute &)
const TimePeriod getDuration () const
virtual size_t getSize () const
virtual const MetaClassgetType () const
 OperationFixedTime (const string &s)
virtual int setattro (const Attribute &, const PythonObject &)
void setDuration (TimePeriod t)
OperationPlanState setOperationPlanParameters (OperationPlan *, double, Date, Date, bool=true, bool=true) const
virtual void solve (Solver &s, void *v=NULL) const
void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const

Static Public Member Functions

static int initialize ()

Static Public Attributes

static const MetaClassmetadata

Protected Member Functions

virtual bool extraInstantiate (OperationPlan *o)

Detailed Description

Models an operation that takes a fixed amount of time, independent of the quantity.

Definition at line 2373 of file model.h.


Constructor & Destructor Documentation

frepple::OperationFixedTime::OperationFixedTime ( const string &  s  )  [inline, explicit]

Constructor.

Definition at line 2377 of file model.h.


Member Function Documentation

void frepple::OperationFixedTime::endElement ( XMLInput pIn,
const Attribute pAttr,
const DataElement pElement 
)

Reimplemented from frepple::Operation.

Definition at line 707 of file operation.cpp.

bool frepple::OperationFixedTime::extraInstantiate ( OperationPlan o  )  [protected, virtual]

Extra logic called when instantiating an operationplan.
When the function returns false the creation of the operationplan is denied and it is deleted.

Reimplemented from frepple::Operation.

Definition at line 621 of file operation.cpp.

PyObject * frepple::OperationFixedTime::getattro ( const Attribute attr  )  [virtual]

Reimplemented from frepple::Operation.

Definition at line 1477 of file operation.cpp.

const TimePeriod frepple::OperationFixedTime::getDuration (  )  const [inline]

Returns the length of the operation.

Definition at line 2380 of file model.h.

virtual size_t frepple::OperationFixedTime::getSize (  )  const [inline, virtual]

Definition at line 2401 of file model.h.

virtual const MetaClass& frepple::OperationFixedTime::getType (  )  const [inline, virtual]

Definition at line 2399 of file model.h.

int frepple::OperationFixedTime::initialize (  )  [static]

Reimplemented from frepple::Operation.

Definition at line 55 of file operation.cpp.

int frepple::OperationFixedTime::setattro ( const Attribute attr,
const PythonObject field 
) [virtual]

Reimplemented from frepple::Operation.

Definition at line 1485 of file operation.cpp.

void frepple::OperationFixedTime::setDuration ( TimePeriod  t  )  [inline]

Updates the duration of the operation. Existing operation plans of this operation are not automatically refreshed to reflect the change.

Definition at line 2384 of file model.h.

OperationPlanState frepple::OperationFixedTime::setOperationPlanParameters ( OperationPlan opplan,
double  q,
Date  s,
Date  e,
bool  preferEnd = true,
bool  execute = true 
) const [virtual]

A operation of this type enforces the following rules on its operationplans:

  • The duration is always constant.
  • If the end date is specified, we use that and ignore the start date that could have been passed.
  • If no end date but only a start date are specified, we'll use that date.
  • If no dates are specified, we don't update the dates of the operationplan.
  • The quantity can be any positive number.
  • Locked operationplans can't be updated.
    See also:
    Operation::setOperationPlanParameters

Implements frepple::Operation.

Definition at line 583 of file operation.cpp.

virtual void frepple::OperationFixedTime::solve ( Solver s,
void *  v = NULL 
) const [inline, virtual]

Reimplemented from frepple::Operation.

Definition at line 2397 of file model.h.

void frepple::OperationFixedTime::writeElement ( XMLOutput o,
const Keyword tag,
mode  m = DEFAULT 
) const [virtual]

Reimplemented from frepple::Operation.

Definition at line 686 of file operation.cpp.


Member Data Documentation

Reimplemented from frepple::Operation.

Definition at line 2400 of file model.h.


The documentation for this class was generated from the following files: