Line data Source code
1 : /*******************************************************************************
2 : * *
3 : * Cosmos:(C)oncept et (O)utils (S)tatistique pour les (Mo)deles *
4 : * (S)tochastiques *
5 : * *
6 : * Copyright (C) 2009-2012 LSV & LACL *
7 : * Authors: Paolo Ballarini BenoƮt Barbot & Hilal Djafri *
8 : * Website: http://www.lsv.ens-cachan.fr/Software/cosmos *
9 : * *
10 : * This program is free software; you can redistribute it and/or modify *
11 : * it under the terms of the GNU General Public License as published by *
12 : * the Free Software Foundation; either version 3 of the License, or *
13 : * (at your option) any later version. *
14 : * *
15 : * This program is distributed in the hope that it will be useful, *
16 : * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 : * GNU General Public License for more details. *
19 : * *
20 : * You should have received a copy of the GNU General Public License along *
21 : * with this program; if not, write to the Free Software Foundation, Inc., *
22 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
23 : * file clientsim.cpp created by Benoit Barbot. *
24 : *******************************************************************************
25 : */
26 :
27 : #include <sys/types.h>
28 : #include <unistd.h>
29 : #include <signal.h>
30 : #include <stdlib.h>
31 :
32 : #include "../ModelGenerator/SimpleSerializer.hpp"
33 : #include "BatchR.hpp"
34 : #include "Simulator.hpp"
35 : #include "RareEvents/SimulatorRE.hpp"
36 : #include "RareEvents/SimulatorBoundedRE.hpp"
37 : #include "RareEvents/SimulatorContinuousBounded.hpp"
38 : #include "Polynome.hpp"
39 : #include "MarkovChain.hpp"
40 : #include "clientsim.hpp"
41 :
42 :
43 :
44 : //#include "Polynome.hpp"
45 :
46 : /**
47 : * The parameters level global
48 : */
49 29 : parameters P;
50 :
51 26 : void signalHandler( int s)
52 : {
53 26 : if(P.graceFullEnding > 0){
54 26 : P.graceFullEnding=2;
55 : } else {
56 0 : abort();
57 : }
58 :
59 26 : }
60 :
61 29 : void readParameters(std::ifstream& ifs){
62 : // create and open an archive for input
63 29 : Unserializer uns(ifs);
64 29 : P.serialize(uns);
65 116 : }
66 :
|