TinkeCell API  1.0.0
C/Python/Octave/Ruby API
Functions
Modeling

get/set parameters, equations, and so on More...

Functions

BEGIN_C_DECLS TCAPIEXPORT tc_matrix tc_getParameters (tc_items a)
 get all the parameters for the given items. use tc_allItems() as argument to get all parameters
TCAPIEXPORT tc_matrix tc_getInitialValues (tc_items a)
 get initial values of the given items. Fixed varianbles are included. use tc_allItems() for all items in the model.
TCAPIEXPORT void tc_setInitialValues (tc_items items, tc_matrix values)
 set initial values of the given items.
TCAPIEXPORT tc_matrix tc_getFixedVariables (tc_items a)
 get all fixed variables
TCAPIEXPORT tc_matrix tc_getParametersAndFixedVariables (tc_items a)
 get all the parameters and fixed variables
TCAPIEXPORT double tc_getParameter (long item, const char *attribute)
 get the parameter with the given name for the given item
TCAPIEXPORT tc_matrix tc_getParametersNamed (tc_items a, tc_strings attibutes)
 get all numerical Modeling with the given names for the given items
TCAPIEXPORT tc_matrix tc_getParametersExcept (tc_items a, tc_strings attributes)
 get all numerical Modeling EXCEPT the given names
TCAPIEXPORT void tc_setParameter (long item, const char *attribute, double value)
 set a parameter value for the given item
TCAPIEXPORT void tc_setParameterByName (const char *attribute, double value)
 set a parameter value
TCAPIEXPORT void tc_setParameters (tc_matrix parameters, int permanentOrTemporary)
 set parameter for multiple items
BEGIN_C_DECLS TCAPIEXPORT
tc_strings 
tc_getEventTriggers ()
 get the event triggers for a set of items
TCAPIEXPORT tc_strings tc_getEventResponses ()
 get the event responses for a set of items
TCAPIEXPORT void tc_addEvent (const char *trigger, const char *event)
 set the event trigger and response
TCAPIEXPORT tc_strings tc_getForcingFunctionNames (tc_items a)
 get the forcing function names for a set of items
TCAPIEXPORT tc_strings tc_getForcingFunctionAssignments (tc_items a)
 get the forcing function definitions for a set of items
TCAPIEXPORT void tc_addForcingFunction (long item, const char *variable, const char *formula)
 set the forcing function for an item
BEGIN_C_DECLS TCAPIEXPORT tc_matrix tc_getStoichiometry (tc_items A)
 get Modeling for the given items
TCAPIEXPORT void tc_setStoichiometry (tc_items A, tc_matrix N)
 set Modeling for the given items (must be labeled)
TCAPIEXPORT tc_strings tc_getRates (tc_items A)
 get rates for the given items
TCAPIEXPORT void tc_setRates (tc_items A, tc_strings rates)
 set rates for the given items (same order as N)
TCAPIEXPORT tc_matrix tc_getStoichiometryFor (long x)
 get Modeling for the given items
TCAPIEXPORT const char * tc_getRate (long x)
 get rate for the given items
TCAPIEXPORT void tc_setRate (long x, const char *r)
 set rate for the given items
TCAPIEXPORT void tc_setStoichiometryFor (long x, tc_matrix N)
 set Modeling for the given items
TCAPIEXPORT void tc_StoichiometryTool_api (tc_matrix(*getStoichiometry)(tc_items), void(*setStoichiometry)(tc_items, tc_matrix), tc_strings(*getRates)(tc_items), void(*setRates)(tc_items, tc_strings))
 initialize stiochiometry plug-in

Detailed Description

get/set parameters, equations, and so on


Function Documentation

TCAPIEXPORT void tc_addEvent ( const char *  trigger,
const char *  event 
)

set the event trigger and response

Parameters:
stringtrigger, e.g. a > 2
stringresponse to trigger, e.g. x = 5
TCAPIEXPORT void tc_addForcingFunction ( long  item,
const char *  variable,
const char *  formula 
)

set the forcing function for an item

Parameters:
intaddress of an item, e.g. obtained from tc_find
stringname of existing variable or new variable
stringformula for the variable
TCAPIEXPORT tc_strings tc_getEventResponses ( )

get the event responses for a set of items

Returns:
tc_strings all event trigger responses, e.g. A = 10; B = 2
BEGIN_C_DECLS TCAPIEXPORT tc_strings tc_getEventTriggers ( )

get the event triggers for a set of items

Returns:
tc_strings all event trigger equations, e.g. A > 10
TCAPIEXPORT tc_matrix tc_getFixedVariables ( tc_items  a)

get all fixed variables

Parameters:
tc_itemslist of items for which fixed attribute are set
tc_matrixmatrix with 1 (fixed) or 0 (floating) in the same order as the list of items
TCAPIEXPORT tc_strings tc_getForcingFunctionAssignments ( tc_items  a)

get the forcing function definitions for a set of items

Parameters:
tc_itemslist of items. use tc_allItems() to get all forcing functions
Returns:
tc_strings list of assignment equations
TCAPIEXPORT tc_strings tc_getForcingFunctionNames ( tc_items  a)

get the forcing function names for a set of items

Parameters:
tc_itemslist of items. use tc_allItems() to get all forcing functions
Returns:
tc_strings list of variable names
TCAPIEXPORT tc_matrix tc_getInitialValues ( tc_items  a)

get initial values of the given items. Fixed varianbles are included. use tc_allItems() for all items in the model.

Parameters:
tc_itemslist of items for which the initial values are returned
Returns:
tc_matrix initial values in the same order as the input list
TCAPIEXPORT double tc_getParameter ( long  item,
const char *  attribute 
)

get the parameter with the given name for the given item

Parameters:
intitem in the model, e.g. something returned from tc_find
stringname of the parameter
Returns:
double value
BEGIN_C_DECLS TCAPIEXPORT tc_matrix tc_getParameters ( tc_items  a)

get all the parameters for the given items. use tc_allItems() as argument to get all parameters

Parameters:
tc_itemslist of items for which the parameters are returned
Returns:
tc_matrix parameter values in the same order as the input list
TCAPIEXPORT tc_matrix tc_getParametersAndFixedVariables ( tc_items  a)

get all the parameters and fixed variables

Parameters:
tc_itemslist of items. use tc_allItems() to get all items in the model
Returns:
tc_matrix list of parameters and fixed variables. order is not preserved from the input
TCAPIEXPORT tc_matrix tc_getParametersExcept ( tc_items  a,
tc_strings  attributes 
)

get all numerical Modeling EXCEPT the given names

Parameters:
tc_itemsa list of items
tc_stringsa list of parameter names that exist in one or more of the given items
Returns:
tc_matrix the set of parameters with rownames as parameter names
TCAPIEXPORT tc_matrix tc_getParametersNamed ( tc_items  a,
tc_strings  attibutes 
)

get all numerical Modeling with the given names for the given items

Parameters:
tc_itemsa list of items
tc_stringsa list of parameter names that exist in one or more of the given items
Returns:
tc_matrix the set of parameters with rownames as parameter names
TCAPIEXPORT const char* tc_getRate ( long  x)

get rate for the given items

Parameters:
intaddress of a connection item
Returns:
tc_matrix reaction rate equations for given item
TCAPIEXPORT tc_strings tc_getRates ( tc_items  A)

get rates for the given items

Parameters:
tc_itemslist of items to get reaction rate equations from. use tc_allItems() for whole model.
Returns:
tc_strings reaction rate equations for given items
BEGIN_C_DECLS TCAPIEXPORT tc_matrix tc_getStoichiometry ( tc_items  A)

get Modeling for the given items

Parameters:
tc_itemslist of items to get stoichiometry matrix from. use tc_allItems() for whole model.
Returns:
tc_matrix stoichiometry matrix with rownames (molecules) and column names (reactions)
TCAPIEXPORT tc_matrix tc_getStoichiometryFor ( long  x)

get Modeling for the given items

Parameters:
intaddress of a connection item
Returns:
tc_matrix stoichiometry matrix for the item
TCAPIEXPORT void tc_setInitialValues ( tc_items  items,
tc_matrix  values 
)

set initial values of the given items.

Parameters:
tc_itemslist of items for which initial values are set
tc_matrixthe initial values in the same order as the list of items
TCAPIEXPORT void tc_setParameter ( long  item,
const char *  attribute,
double  value 
)

set a parameter value for the given item

Parameters:
intitem in model
stringname of parameter
TCAPIEXPORT void tc_setParameterByName ( const char *  attribute,
double  value 
)

set a parameter value

Parameters:
stringfull name of parameter, e.g. A.k0 or A_k0
doublevalue
TCAPIEXPORT void tc_setParameters ( tc_matrix  parameters,
int  permanentOrTemporary 
)

set parameter for multiple items

Parameters:
tc_tabletable with rownames as the parameter full names
int0=temporarily (just for simulation, fast), 1 = permanent (slower)
TCAPIEXPORT void tc_setRate ( long  x,
const char *  r 
)

set rate for the given items

Parameters:
intaddress of a connection item
tc_matrixreaction rate equations for given item
TCAPIEXPORT void tc_setRates ( tc_items  A,
tc_strings  rates 
)

set rates for the given items (same order as N)

Parameters:
tc_itemslist of items to set reaction rate equations for. use tc_allItems() for whole model.
Returns:
tc_strings reaction rate equations for given items
TCAPIEXPORT void tc_setStoichiometry ( tc_items  A,
tc_matrix  N 
)

set Modeling for the given items (must be labeled)

Parameters:
tc_itemslist of items to set stoichiometry matrix for. use tc_allItems() for whole model.
tc_matrixnew stoichiometry matrix with rownames (molecules) and column names (reactions) \
TCAPIEXPORT void tc_setStoichiometryFor ( long  x,
tc_matrix  N 
)

set Modeling for the given items

Parameters:
intaddress of a connection item
tc_matrixstoichiometry matrix for given item
 All Data Structures