File: StateWithStocks.py

package info (click to toggle)
stopt 5.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,772 kB
  • sloc: cpp: 70,373; python: 5,942; makefile: 67; sh: 57
file content (44 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright (C) 2016 EDF
# All Rights Reserved
# This code is published under the GNU Lesser General Public License (GNU LGPL)

# Permits to define a state containing
#   - a stock positipon
#   - a realisation of the non controled stochastic state


# State class dealing with regime, stock and uncertainty
class StateWithStocks :
    
    # constructor
    def __init__(self, p_regime, p_ptStock, p_stochasticRealisation) :
        
        self.m_ptStock = p_ptStock
        self.m_stochasticRealisation = p_stochasticRealisation
        self.m_regime = p_regime
        
    # accessor

    def getPtStock(self) :
        
        return self.m_ptStock
    
    def getStochasticRealization(self) :
        
        return self.m_stochasticRealisation
    
    def getRegime(self) :
        
        return self.m_regime
    
    def setPtStock(self, p_ptStock) :
        
        self.m_ptStock = p_ptStock
        
    def setStochasticRealization(self, p_stochasticRealisation) :
        
        self.m_stochasticRealisation = p_stochasticRealisation
        
    def setRegime(self, p_regime) :
        
        self.m_regime = p_regime