All pastes #385092 Raw Edit

Something

public text v1 · immutable
·published 2007-03-07 16:20 UTC
rendered paste body

void emet_distributeur( t_distributeur * lui, int attente ) {

	if ( lui->ind_bris){
		return 0;
	}
	
	lui->quantite = normale(lui->moyenne, lui->ecart);
	
	lui->nbr_tot_use+=1;
	
	if ( ( UNIFORME(100) ) < lui->prob_bris ){
		lui->ind_bris = 1;
		lui->rebours = khi_deux_discrete(attente);
		lui->nbr_tot_bris += 1;
	}
	
	else {
		lui->nbr_use_RES=+1;
		lui->prob_bris+= 5*UNIFORME(1);
	}

}