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 spn_orig.hpp created by Benoit Barbot on 03/09/15. *
24 : *******************************************************************************
25 : */
26 :
27 : #ifndef __Cosmos__spn_orig__
28 : #define __Cosmos__spn_orig__
29 :
30 :
31 : #include "spn.hpp"
32 : #include "timeGen.hpp"
33 : #include "timeGenBis.hpp"
34 : #include "Event.hpp"
35 :
36 : #include "EventsQueue.hpp"
37 : #include "EventsQueueSet.hpp"
38 :
39 : template<class S, class EQT>
40 21 : class SPNBase : public SPN{
41 : public:
42 22 : SPNBase(size_t s):shift(s){};
43 : const size_t shift;
44 :
45 : void update(double ctime,size_t tr, const abstractBinding& b,EventsQueue & EQ,timeGen &TG);
46 : void update(double ctime,size_t tr, const abstractBinding& b,EventsQueueSet & EQ,timeGen &TG);
47 :
48 : void initialEventsQueue(EventsQueue &EQ,timeGen &TG);
49 : void initialEventsQueue(EventsQueueSet &EQ,timeGen &TG);
50 :
51 26 : void printHeader(std::ostream &os)const{ Marking.printHeader(os); }
52 0 : void printSedCmd(std::ostream &os)const{ Marking.printSedCmd(os); }
53 272 : void printState(std::ostream &os, double eTime)const { Marking.print(os,eTime); }
54 :
55 : const std::vector<size_t> getNbTransition()const;
56 : const std::vector<std::string> getTransitionLabels()const;
57 : const std::string getTransitionLabel(size_t i)const;
58 :
59 : protected:
60 : //! a Temporary event
61 : Event F;
62 : private:
63 : void cleanNewlyDisabled(size_t tr, EventsQueueSet & EQ);
64 :
65 : };
66 :
67 : template <class EQT>
68 21 : class SPN_orig:public SPNBase<SPN_orig<EQT>, EQT>{
69 : public:
70 21 : SPN_orig(size_t shift):SPNBase<SPN_orig,EQT>(shift){};
71 : };
72 :
73 : #endif /* defined(__Cosmos__spn_orig__) */
|