core/loadshape.c File Reference


Detailed Description

$Id$ Copyright (C) 2008 Battelle Memorial Institute

Definition in file loadshape.c.

Go to the source code of this file.

Functions

int convert_from_loadshape (char *string, int size, void *data, PROPERTY *prop)
 convert from a loadshape to a string
int convert_to_loadshape (char *string, void *data, PROPERTY *prop)
 convert from a string to a loadshape
int loadshape_create (loadshape *data)
 Create a loadshape.
int loadshape_init (loadshape *ls)
int sample_from_diversity (double *param, char *value)
 Convert a truncated normal distribution description string (min<mean~stdev<max) to a sample.
unsigned char schedule_string_to_weekday (char *days)
 Convert a string representing weekdays (UMTWRFSH) to a scheduled loadshape parameter.


Function Documentation

int loadshape_create ( loadshape *  data  ) 

Create a loadshape.

Returns:
1 on success, 0 on failure

Definition at line 481 of file loadshape.c.

int loadshape_init ( loadshape *  ls  ) 

Parameters:
ls  load shape

Definition at line 540 of file loadshape.c.

References MPT_POWER, MPT_TIME, MT_ANALOG, MT_MODULATED, MT_PULSED, MT_QUEUED, MT_SCHEDULED, output_error(), and random_uniform().

Referenced by convert_to_loadshape().

int sample_from_diversity ( double *  param,
char *  value 
)

Convert a truncated normal distribution description string (min<mean~stdev<max) to a sample.

Returns:
1 on success, 0 on failure.

Definition at line 438 of file loadshape.c.

References max, min, and random_normal().

Referenced by convert_to_loadshape().

unsigned char schedule_string_to_weekday ( char *  days  ) 

Convert a string representing weekdays (UMTWRFSH) to a scheduled loadshape parameter.

Returns:
the days found in the string as a bitfield (U=0, M=1, T=2, W=3, R=4, F=5, S=6, H=7)

Definition at line 424 of file loadshape.c.

Referenced by convert_to_loadshape().


GridLAB-DTM Version 2.0
An open-source project initiated by the US Department of Energy