Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
Functions | Variables
stopfct.c File Reference

Contains usef-defined stop functions. More...

#include <stdio.h>
#include "psi.h"

Functions

int stop_when_zero (int *state)
 Function stop condition of the kernel simple forward. More...
 
int stop_when_reach_1000_times_zero (int *state)
 Function stop condition of the kernel simple forward. More...
 

Variables

int cpt_zero = 0
 

Detailed Description

Contains usef-defined stop functions.

Author
Minh Quan HO
Version
1.0
Date
30/07/2012

Function Documentation

int stop_when_reach_1000_times_zero ( int *  state)

Function stop condition of the kernel simple forward.

This function watch the first queue of system and stop simulation when this queue goes empty after 1000 times It's user's responsibility to manage a counter (e.g here cpt_zero)

Parameters
stateState vector of queues
Returns
1 to stop simulation, otherwise return 0 (mean keep going simulation)
int stop_when_zero ( int *  state)

Function stop condition of the kernel simple forward.

This function watch the first queue of system and stop simulation when this queue goes empty for the first time

Parameters
stateState vector of queues
Returns
1 to stop simulation, otherwise return 0 (mean keep going simulation)