aibicom.h File Reference

A C subroutine library for the develpment of binary control applications (header file). More...

#include <stdio.h>

Include dependency graph for aibicom.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define PI   3.14159265

Functions

void SS_Init (void)
 Initializes the interpreter.
int SS_IfExecute (void)
 Obtains the index of a real-time estimate of the next behavior.
int SS_Execute (void)
 Executes the binary interface logic and obtains the index of the updated device behavior.
double SS_GetD1 (int)
 Obtain the i-th member of the 1st dimension of the control domain (SS_DOMAIN).
double SS_GetD2 (int)
 Obtain the i-th member of the 2nd dimension of the control domain (SS_DOMAIN).
void SS_Clear (void)
 Clear memory used by aibicom.

Variables

int SS_C
int SS_RES
double SS_MAXD1
double SS_MIND1
double SS_MAXD2
double SS_MIND2
int SS_2D
int SS_MTYPE
double SS_MWIDTH
double SS_K


Detailed Description

A C subroutine library for the develpment of binary control applications (header file).

Author:
Jorge Silva
Version:
0.13.0

Definition in file aibicom.h.


Define Documentation

#define PI   3.14159265

Definition at line 30 of file aibicom.h.


Function Documentation

void SS_Clear ( void   ) 

Clear memory used by aibicom.

Definition at line 321 of file aibicom.c.

References ESTIMATE, SS_DOMAIN, SS_ESTIMATE, and SS_MASK.

int SS_Execute ( void   ) 

Executes the binary interface logic and obtains the index of the updated device behavior.

This function executes the binary interface logic modifying the intention estimate accordingly. You must call this procedure only once per binary activation regardless of the number of dimensions in the control domain. The returned value should be used as a parameter in SS_GetD1() and/or SS_GetD2() to obtain the updated behavior from the control domain.

Returns:
the index of the updated behavior.

Definition at line 238 of file aibicom.c.

References SS_ApplyDecay(), SS_ESTIMATE, SS_FindMin(), SS_K, SS_MASK, SS_OUTI, SS_RES, and SS_UpdateMask().

double SS_GetD1 ( int  i  ) 

Obtain the i-th member of the 1st dimension of the control domain (SS_DOMAIN).

Parameters:
[in] i required member index.
Returns:
the component in the 1st dimension of the i-th member of SS_DOMAIN

Definition at line 47 of file aibicom.c.

References SS_DOMAIN.

Referenced by SS_Init(), and SS_UpdateMask().

double SS_GetD2 ( int  i  ) 

Obtain the i-th member of the 2nd dimension of the control domain (SS_DOMAIN).

Parameters:
[in] i required member index.
Returns:
the component in the 2nd dimension of the i-th member of SS_DOMAIN

Definition at line 52 of file aibicom.c.

References SS_C, SS_DOMAIN, SS_MAXD1, SS_MIND1, SS_MIND2, SS_RD1, and SS_RD2.

Referenced by SS_Init(), and SS_UpdateMask().

int SS_IfExecute ( void   ) 

Obtains the index of a real-time estimate of the next behavior.

This function executes the binary interface logic without actually modifying the estimate, thus, it can be used to obtain the index of an estimate of the next behavior, in advance. To recover the actual behavior (not just the index) use SS_GetD1(SS_IfExecute()) and/or SS_GetD2(SS_IfExecute()) for 2D domains.

Returns:
the index of an estimate of the next behavior.

Definition at line 219 of file aibicom.c.

References ESTIMATE, SS_ApplyDecay(), SS_ESTIMATE, SS_FindMin(), SS_K, SS_MASK, and SS_RES.

void SS_Init ( void   ) 

Initializes the interpreter.

The following parameters must be set before a call to this function:

Definition at line 180 of file aibicom.c.

References ESTIMATE, SS_DOMAIN, SS_ESTIMATE, SS_GetD1(), SS_GetD2(), SS_LinSpace(), SS_MASK, SS_MAXD1, SS_MAXD2, SS_MIND1, SS_MIND2, SS_MTYPE, SS_RD1, SS_RD2, and SS_RES.


Variable Documentation

int SS_2D

2D domain flag. Clear (0) when the domain is 1D. Set (1) when the domain is 2D.

Definition at line 45 of file aibicom.h.

Referenced by SS_UpdateMask().

int SS_C

Number of times the domain is wrapped around the 2nd dimension of the control domain. In order to simplify processing, 2D domains are mapped with a single vector (instead of a matrix). Thus, if SS_2D is set, it is recommended to define SS_C first, and then make SS_RES = SS_C * SS_C to obtain evenly distributed elements on both dimensions.

Definition at line 39 of file aibicom.h.

Referenced by SS_GetD2().

double SS_K

Recursive decay constant. Must be lower than 1.0 and higher than 0.0

Definition at line 50 of file aibicom.h.

Referenced by SS_Execute(), and SS_IfExecute().

double SS_MAXD1

Maximum value (last element) in the 1st dimension of the control domain.

Definition at line 41 of file aibicom.h.

Referenced by SS_GetD2(), and SS_Init().

double SS_MAXD2

Maximum value (last element) in the 2nd dimension of the control domain.

Definition at line 43 of file aibicom.h.

Referenced by SS_Init().

double SS_MIND1

Minimum value (first element) in the 1st dimension of the control domain.

Definition at line 42 of file aibicom.h.

Referenced by SS_GetD2(), SS_Init(), and SS_LinSpace().

double SS_MIND2

Minimum value (first element) in the 2nd dimension of the control domain.

Definition at line 44 of file aibicom.h.

Referenced by SS_GetD2(), and SS_Init().

int SS_MTYPE

The intention kernel/mask to be used. Custom intention masks can be added to the function SS_UpdateMask() in aibicom.c

Definition at line 47 of file aibicom.h.

Referenced by SS_Init(), and SS_UpdateMask().

double SS_MWIDTH

Width of intention kernel / mask. 1.0 is equivalent to the full range on each dimension.

Definition at line 48 of file aibicom.h.

Referenced by SS_UpdateMask().

int SS_RES

Resolution / number of elements in the control domain.

Definition at line 40 of file aibicom.h.

Referenced by SS_ApplyDecay(), SS_Execute(), SS_FindMin(), SS_IfExecute(), SS_Init(), SS_LinSpace(), and SS_UpdateMask().


Generated on Fri Jan 11 11:11:02 2008 for Aibicom by  doxygen 1.5.1