com.azalient.api.b.demand
Interface IProfile

All Superinterfaces:
IRecord, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW

public interface IProfile
extends StoreRecordRW

A time-varying scaling function, used to modulate another variable value over a time span. The span is divided into one or more intervals, all of equal duration. It is assumed that the average weight over the entire span is 1.0.


Field Summary
static String NAME_PREFIX
          A name prefix used as a pattern for new profiles
static IProfile[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Fields inherited from interface com.azalient.api.a.tables.IRecord
DELETED, KEY_SEP, KEY_SEP_CHAR
 
Method Summary
 UTime end()
          The end of the term to which this profile applies
 void end(UTime t)
          Set the end of the time span to which this profile applies
 int intervals()
          Returns the number of intervals in this profile
 void intervals(int n)
          Sets the number of intervals in this profile, must be one or more.
 void normalize()
          Normalize the values in this profile, so that hey sum to 1.0 (100%)
 UTime start()
          The start of the term to which this profile applies
 void start(UTime t)
          Set the start of the time span to which this profile applies
 ITerm term()
          Returns the term of this profile
 void term(ITerm term)
          Sets the term of this profile
 void weight(int interval, double w, boolean normalizeOthers)
          Set the weight for the given interval, and optionally normalize the other weights.
 double weight(int interval, int nIntervals)
          Return the weight associated with the given interval.
 
Methods inherited from interface com.azalient.api.file.StoreRecordRW
canRename, rename, store
 
Methods inherited from interface com.azalient.api.file.RecordR
extraSet, finished, isApplicable, isEditable, set
 
Methods inherited from interface com.azalient.api.a.tables.IRecord
name
 
Methods inherited from interface com.azalient.api.file.RecordW
extraCols, extraGet, extraGetB, extraGetD, extraGetI, extraGetS, extraGetT, get, isVolatile
 

Field Detail

ZERO

static final IProfile[] ZERO
A static zero-length array, created for convenience, and to save memory


NAME_PREFIX

static final String NAME_PREFIX
A name prefix used as a pattern for new profiles

See Also:
Constant Field Values
Method Detail

term

ITerm term()
Returns the term of this profile


term

void term(ITerm term)
Sets the term of this profile


start

UTime start()
The start of the term to which this profile applies


end

UTime end()
The end of the term to which this profile applies


start

void start(UTime t)
Set the start of the time span to which this profile applies


end

void end(UTime t)
Set the end of the time span to which this profile applies


weight

double weight(int interval,
              int nIntervals)
Return the weight associated with the given interval. The number of intervals is passed in so that the default "flat" interval can return a fraction of the total if more than one interval is being used


weight

void weight(int interval,
            double w,
            boolean normalizeOthers)
Set the weight for the given interval, and optionally normalize the other weights. If multiple weights are to be set, it is better to set normalizeOthers to false and then call normalize() after all weights have been set


intervals

int intervals()
Returns the number of intervals in this profile


intervals

void intervals(int n)
Sets the number of intervals in this profile, must be one or more.


normalize

void normalize()
Normalize the values in this profile, so that hey sum to 1.0 (100%)

Internal - Not recommended for use. Public as a side-effect of implementation method