pads:gaia-apis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
pads:gaia-apis [2010/11/10 13:02] – gdangelo | pads:gaia-apis [2010/11/10 13:15] – gdangelo | ||
---|---|---|---|
Line 27: | Line 27: | ||
</ | </ | ||
- | ==== GAIA_Initialize() | + | |
+ | ==== Simulation Management ==== | ||
+ | |||
+ | |||
+ | === GAIA_Initialize() | ||
<code java> | <code java> | ||
int | int | ||
Line 53: | Line 57: | ||
- | ==== GAIA_Finalize() | + | === GAIA_Finalize() |
<code java> | <code java> | ||
void GAIA_Finalize ( ); | void GAIA_Finalize ( ); | ||
Line 75: | Line 79: | ||
- | ==== GAIA_SetFstID() | + | === GAIA_SetFstID() |
<code java> | <code java> | ||
void GAIA_SetFstID (int first_id); | void GAIA_SetFstID (int first_id); | ||
Line 97: | Line 101: | ||
- | ==== | + | === |
+ | <code java> | ||
+ | double | ||
+ | </ | ||
+ | |||
+ | **Parameters**: | ||
+ | |||
+ | //none// | ||
+ | |||
+ | **Description**: | ||
+ | |||
+ | Returns the length of the time-step used in the simulation. This parameter is initialized using the **GLOBAL_LA** parameters as defined in the file " | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | //none// | ||
+ | |||
+ | **Return value:** | ||
+ | |||
+ | The time-step length (double). | ||
+ | |||
+ | |||
+ | === GAIA_Register() === | ||
+ | <code java> | ||
+ | int | ||
+ | </ | ||
+ | |||
+ | **Parameters**: | ||
+ | |||
+ | * int **migrable**: | ||
+ | |||
+ | **Description**: | ||
+ | |||
+ | This API is used to register a SE, the runtime returns a descriptor that will be used to identify the SE. The registration of a SE is required to extend the scope of the SE outside the local LP (to the whole simulation). Only after the registration the SE will be able to send and receive messages, furthermore it could be involved in the migration and load balancing mechanisms. | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | The registration of a SE is an event that has to be propagated to the whole simulator. Therefore, if the registration of a SE happens at timestep **t**, only starting from timestep **t+1** will be possible to send or receive messages regarding such SE. For example, it is NOT possible to register a new SE at timestep **t** and to immediately send a message from this SE in the same timestep. | ||
+ | |||
+ | **Return value:** | ||
+ | |||
+ | The descriptor (integer) of the SE. | ||
+ | |||
+ | |||
+ | === GAIA_TimeAdvance() | ||
+ | <code java> | ||
+ | double | ||
+ | </ | ||
+ | |||
+ | **Parameters**: | ||
+ | |||
+ | //none// | ||
+ | |||
+ | **Description**: | ||
+ | |||
+ | It is used by the LP to notify to the runtime that the current timestep is ended, and therefore, the local LP is ready to start the next timestep. The LP will remain blocked until the runtime will enable the transition to the next timestep. | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | //none// | ||
+ | |||
+ | **Return value:** | ||
+ | |||
+ | Returns the next timestep value (double). | ||
+ | |||
+ | |||
+ | ==== Migration ==== | ||
+ | |||
+ | === GAIA_SetCountDown() | ||
<code java> | <code java> | ||
void GAIA_SetCountDown (int events); | void GAIA_SetCountDown (int events); | ||
Line 119: | Line 191: | ||
- | ==== GAIA_SetMT() | + | === GAIA_SetMT() |
<code java> | <code java> | ||
void GAIA_SetMT (int new_size); | void GAIA_SetMT (int new_size); | ||
Line 129: | Line 201: | ||
**Description**: | **Description**: | ||
- | The Migration Threshold (MT) is a value used to limit the migration rate of SEs. Each SE can evaluate the migration heuristic only if its counter has a value that is bigger than MT. At bootstrap and at each migration the counter is re-initialized. The detailed semantic of the counter depends on what migration heuristic is used. | + | The Migration Threshold (MT) is a value used to limit the migration rate of SEs (default value = 10). Each SE can evaluate the migration heuristic only if its counter has a value that is bigger than MT. At bootstrap and at each migration the counter is re-initialized. The detailed semantic of the counter depends on what migration heuristic is used. |
Line 149: | Line 221: | ||
- | ==== GAIA_SetMF() | + | === GAIA_SetMF() |
<code java> | <code java> | ||
void GAIA_SetMF (float migr_factor); | void GAIA_SetMF (float migr_factor); | ||
Line 159: | Line 231: | ||
**Description**: | **Description**: | ||
- | All the implemented migration heuristics are based on the evaluation of the outbound UNICAST traffic generated by each Simulated Entity. The migration factor is a tuning parameters of the heuristics: a low value would increase the number of migrations, conversely a higher value would reduce the number of migrations. | + | All the implemented migration heuristics are based on the evaluation of the outbound UNICAST traffic generated by each Simulated Entity. The migration factor is a tuning parameters of the heuristics: a low value would increase the number of migrations, conversely a higher value would reduce the number of migrations |
**Notes**: | **Notes**: | ||
Line 170: | Line 242: | ||
- | ==== GAIA_SetHistorySlots() | + | === GAIA_SetHistorySlots() |
<code java> | <code java> | ||
void GAIA_SetHistorySlots (int history_slots); | void GAIA_SetHistorySlots (int history_slots); | ||
Line 191: | Line 263: | ||
- | ==== GAIA_SetEventHistorySize() | + | === GAIA_SetEventHistorySize() |
<code java> | <code java> | ||
void GAIA_SetEventHistorySize (int size); | void GAIA_SetEventHistorySize (int size); | ||
Line 211: | Line 283: | ||
//none// | //none// | ||
- | ==== GAIA_SetMigration() | + | === GAIA_SetMigration() |
<code java> | <code java> | ||
void GAIA_SetMigration (int state); | void GAIA_SetMigration (int state); | ||
Line 245: | Line 317: | ||
//none// | //none// | ||
- | ==== GAIA_SetLoadBalancing() | + | ==== Load Balancing ==== |
+ | |||
+ | === GAIA_SetLoadBalancing() | ||
<code java> | <code java> | ||
void GAIA_SetLoadBalancing (int state); | void GAIA_SetLoadBalancing (int state); | ||
Line 264: | Line 338: | ||
//none// | //none// | ||
- | |||
- | |||
- | ==== GAIA_GetStep() | ||
- | <code java> | ||
- | double | ||
- | </ | ||
- | |||
- | **Parameters**: | ||
- | |||
- | //none// | ||
- | |||
- | **Description**: | ||
- | |||
- | Returns the length of the time-step used in the simulation. This parameter is initialized using the **GLOBAL_LA** parameters as defined in the file " | ||
- | |||
- | **Notes**: | ||
- | |||
- | //none// | ||
- | |||
- | **Return value:** | ||
- | |||
- | The time-step length (double). | ||
- | |||
- | |||
- | ==== GAIA_Register() | ||
- | <code java> | ||
- | int | ||
- | </ | ||
- | |||
- | **Parameters**: | ||
- | |||
- | * int **migrable**: | ||
- | |||
- | **Description**: | ||
- | |||
- | This API is used to register a SE, the runtime returns a descriptor that will be used to identify the SE. The registration of a SE is required to extend the scope of the SE outside the local LP (to the whole simulation). Only after the registration the SE will be able to send and receive messages, furthermore it could be involved in the migration and load balancing mechanisms. | ||
- | |||
- | **Notes**: | ||
- | |||
- | The registration of a SE is an event that has to be propagated to the whole simulator. Therefore, if the registration of a SE happens at timestep **t**, only starting from timestep **t+1** will be possible to send or receive messages regarding such SE. For example, it is NOT possible to register a new SE at timestep **t** and to immediately send a message from this SE in the same timestep. | ||
- | |||
- | **Return value:** | ||
- | |||
- | The descriptor (integer) of the SE. | ||
- | |||
- | |||
- | ==== GAIA_TimeAdvance() | ||
- | <code java> | ||
- | double | ||
- | </ | ||
- | |||
- | **Parameters**: | ||
- | |||
- | //none// | ||
- | |||
- | **Description**: | ||
- | |||
- | It is used by the LP to notify to the runtime that the current timestep is ended, and therefore, the local LP is ready to start the next timestep. The LP will remain blocked until the runtime will enable the transition to the next timestep. | ||
- | |||
- | **Notes**: | ||
- | |||
- | //none// | ||
- | |||
- | **Return value:** | ||
- | |||
- | Returns the next timestep value (double). | ||
pads/gaia-apis.txt · Last modified: 2017/12/20 07:48 by gdangelo