1 | /* |
---|
2 | Copyright (C) 2014 |
---|
3 | Alejandro Mujica (amujica@cenditel.gob.ve) |
---|
4 | José Ruiz (jruiz@cenditel.gob.ve) |
---|
5 | Julie Vera (jvera@cenditel.gob.ve) |
---|
6 | |
---|
7 | CENDITEL Fundación Centro Nacional de Desarrollo e Investigación en |
---|
8 | Tecnologías Libres |
---|
9 | |
---|
10 | Este programa es software libre; Usted puede usarlo bajo los términos de la |
---|
11 | licencia de software GPL versión 2.0 de la Free Software Foundation. |
---|
12 | |
---|
13 | Este programa se distribuye con la esperanza de que sea útil, pero SIN |
---|
14 | NINGUNA GARANTÍA; tampoco las implícitas garantías de MERCANTILIDAD o |
---|
15 | ADECUACIÓN A UN PROPÓSITO PARTICULAR. |
---|
16 | Consulte la licencia GPL para más detalles. Usted debe recibir una copia |
---|
17 | de la GPL junto con este programa; si no, escriba a la Free Software |
---|
18 | Foundation Inc. 51 Franklin Street,5 Piso, Boston, MA 02110-1301, USA. |
---|
19 | */ |
---|
20 | |
---|
21 | /* |
---|
22 | Autor: Alejandro J. Mujica |
---|
23 | Fecha de creación: 05/06/2014 |
---|
24 | Este archivo contiene la definición de la clase Input y una |
---|
25 | estructura que llamada Input_Simulation_Attributes que contiene los |
---|
26 | atributos utilizados en la simulación para una instancia de Input. |
---|
27 | */ |
---|
28 | |
---|
29 | # ifndef INPUT_H |
---|
30 | # define INPUT_H |
---|
31 | |
---|
32 | # include <good.H> |
---|
33 | |
---|
34 | /// Atributos de simulación para la clase Input. |
---|
35 | struct Input_Simulation_Attributes |
---|
36 | { |
---|
37 | size_t state_number; |
---|
38 | |
---|
39 | real production; |
---|
40 | real stock; |
---|
41 | real internal_sales; |
---|
42 | real external_sales; |
---|
43 | real internal_requested_quantity; |
---|
44 | real external_requested_quantity; |
---|
45 | real price; |
---|
46 | |
---|
47 | Input_Simulation_Attributes() |
---|
48 | : state_number(0), production(0.0), stock(0.0), internal_sales(0.0), |
---|
49 | external_sales(0.0), internal_requested_quantity(0.0), |
---|
50 | external_requested_quantity(0.0), price(0.0) |
---|
51 | { |
---|
52 | // Empty |
---|
53 | } |
---|
54 | }; |
---|
55 | |
---|
56 | /** Representa la especialización Input de la clase Good. |
---|
57 | * |
---|
58 | * Esta clase representa un bien producido por una Unidad Económica NO |
---|
59 | * registrada en el SIGESIC. |
---|
60 | * |
---|
61 | * @author Alejandro J. Mujica |
---|
62 | */ |
---|
63 | class Input : public Good |
---|
64 | { |
---|
65 | /** Sumatoria de la cantidad a producto vendido a empresas que están en la |
---|
66 | red. |
---|
67 | */ |
---|
68 | real internal_sales; |
---|
69 | |
---|
70 | /** Sumatoria de la cantidad a producto vendido a empresas que no están en la |
---|
71 | red. |
---|
72 | */ |
---|
73 | real external_sales; |
---|
74 | |
---|
75 | /// Valor de compra registrado por las empresas que requieren el insumo. |
---|
76 | real price; |
---|
77 | |
---|
78 | DECLARE_SIMULATION_ATTRIBUTES(Input_Simulation_Attributes) |
---|
79 | |
---|
80 | public: |
---|
81 | Input(); |
---|
82 | |
---|
83 | Input(const Input &); |
---|
84 | |
---|
85 | Input(Input &&); |
---|
86 | |
---|
87 | const real & get_internal_sales() const; |
---|
88 | |
---|
89 | void set_internal_sales(const real &); |
---|
90 | |
---|
91 | const real & get_external_sales() const; |
---|
92 | |
---|
93 | void set_external_sales(const real &); |
---|
94 | |
---|
95 | const real & get_price() const; |
---|
96 | |
---|
97 | void set_price(const real &); |
---|
98 | |
---|
99 | Input & operator = (const Input &); |
---|
100 | |
---|
101 | Input & operator = (Input &&); |
---|
102 | |
---|
103 | DEFINE_SIMULATION_ATTRIBUTES_METHODS(Input_Simulation_Attributes) |
---|
104 | |
---|
105 | std::string to_dot() const; |
---|
106 | |
---|
107 | Good_Type get_type() const; |
---|
108 | |
---|
109 | real & production_at(const size_t &); |
---|
110 | |
---|
111 | real & stock_at(const size_t &); |
---|
112 | |
---|
113 | real & internal_requested_quantity_at(const size_t &); |
---|
114 | |
---|
115 | real requested_quantity_at(const size_t &); |
---|
116 | |
---|
117 | real & internal_sales_at(const size_t &); |
---|
118 | |
---|
119 | real & price_at(const size_t &); |
---|
120 | }; |
---|
121 | |
---|
122 | # endif // INPUT_H |
---|
123 | |
---|