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 Product y una |
---|
25 | estructura que llamada Product_Simulation_Attributes que contiene los |
---|
26 | atributos utilizados en la simulación para una instancia de Product. |
---|
27 | */ |
---|
28 | |
---|
29 | # ifndef PRODUCT_H |
---|
30 | # define PRODUCT_H |
---|
31 | |
---|
32 | # include <good.H> |
---|
33 | |
---|
34 | # define WORKED_DAYS_IN_A_YEAR 231 |
---|
35 | |
---|
36 | /// Atributos de simulación para la clase Product. |
---|
37 | struct Product_Simulation_Attributes |
---|
38 | { |
---|
39 | size_t state_number; |
---|
40 | |
---|
41 | // Producción y ventas |
---|
42 | real production; |
---|
43 | real stock; |
---|
44 | real internal_sales; |
---|
45 | real external_sales; |
---|
46 | real internal_requested_quantity; |
---|
47 | real external_requested_quantity; |
---|
48 | |
---|
49 | // Trabajo |
---|
50 | real num_employees; |
---|
51 | real daily_wage; |
---|
52 | real other_wage; |
---|
53 | real other_daily_wage; |
---|
54 | real daily_feeding_coupon; |
---|
55 | real feeding_coupon; |
---|
56 | real integral_wage; |
---|
57 | |
---|
58 | // Costos e ingresos |
---|
59 | real administrative_staff_cost; |
---|
60 | real labor_cost; |
---|
61 | real input_cost; |
---|
62 | real other_cost; |
---|
63 | real total_cost; |
---|
64 | real unitarian_administrative_staff_cost; |
---|
65 | real unitarian_labor_cost; |
---|
66 | real input_cost_per_unit; |
---|
67 | real other_unitarian_cost; |
---|
68 | real price; |
---|
69 | real income; |
---|
70 | real economic_status; |
---|
71 | |
---|
72 | Product_Simulation_Attributes() |
---|
73 | : state_number(0), production(0.0), stock(0.0), internal_sales(0.0), |
---|
74 | external_sales(0.0), internal_requested_quantity(0.0), |
---|
75 | external_requested_quantity(0.0), num_employees(0.0), daily_wage(0.0), |
---|
76 | other_wage(0.0), other_daily_wage(0.0), daily_feeding_coupon(0.0), |
---|
77 | feeding_coupon(0.0), integral_wage(0.0), administrative_staff_cost(0.0), |
---|
78 | labor_cost(0.0), input_cost(0.0), other_cost(0.0), total_cost(0.0), |
---|
79 | unitarian_administrative_staff_cost(0.0), unitarian_labor_cost(0.0), |
---|
80 | input_cost_per_unit(0.0), other_unitarian_cost(0.0), price(0.0), |
---|
81 | income(0.0), economic_status(0.0) |
---|
82 | { |
---|
83 | // Empty |
---|
84 | } |
---|
85 | }; |
---|
86 | |
---|
87 | /** Representa la especialización Product de la clase Good. |
---|
88 | * |
---|
89 | * Esta clase representa un bien producido por una Unidad Económica registrada |
---|
90 | * en el SIGESIC. |
---|
91 | * |
---|
92 | * @author Alejandro J. Mujica |
---|
93 | */ |
---|
94 | class Product : public Good |
---|
95 | { |
---|
96 | /// Representa la cantidad máxima de producto que se puede producir. |
---|
97 | real production_capacity; |
---|
98 | |
---|
99 | /// Producción del año declarada en SIGESIC . |
---|
100 | real production; |
---|
101 | |
---|
102 | /** Sumatoria de la cantidad a producto vendido a empresas que están en la |
---|
103 | red. |
---|
104 | */ |
---|
105 | real internal_sales; |
---|
106 | |
---|
107 | /** Sumatoria de la cantidad a producto vendido a empresas que no están en la |
---|
108 | red. |
---|
109 | */ |
---|
110 | real external_sales; |
---|
111 | |
---|
112 | /// Jornada laboral en horas por día. |
---|
113 | real workday; |
---|
114 | |
---|
115 | /// Cantidad de personal administrativo por producto declarado en la UE. |
---|
116 | real num_administrative_staff; |
---|
117 | |
---|
118 | /// Número de empleados por producto declarados en la UE. |
---|
119 | real num_employees; |
---|
120 | |
---|
121 | /// Precio declarado de venta. |
---|
122 | real price; |
---|
123 | |
---|
124 | real other_cost; // Estimado |
---|
125 | |
---|
126 | DECLARE_SIMULATION_ATTRIBUTES(Product_Simulation_Attributes) |
---|
127 | |
---|
128 | public: |
---|
129 | Product(); |
---|
130 | |
---|
131 | Product(const Product &); |
---|
132 | |
---|
133 | Product(Product &&); |
---|
134 | |
---|
135 | const real & get_production_capacity() const; |
---|
136 | |
---|
137 | void set_production_capacity(const real &); |
---|
138 | |
---|
139 | const real & get_production() const; |
---|
140 | |
---|
141 | void set_production(const real &); |
---|
142 | |
---|
143 | const real & get_internal_sales() const; |
---|
144 | |
---|
145 | void set_internal_sales(const real &); |
---|
146 | |
---|
147 | const real & get_external_sales() const; |
---|
148 | |
---|
149 | void set_external_sales(const real &); |
---|
150 | |
---|
151 | const real & get_workday() const; |
---|
152 | |
---|
153 | void set_workday(const real &); |
---|
154 | |
---|
155 | const real & get_num_administrative_staff() const; |
---|
156 | |
---|
157 | void set_num_administrative_staff(const real &); |
---|
158 | |
---|
159 | const real & get_num_employees() const; |
---|
160 | |
---|
161 | void set_num_employees(const real &); |
---|
162 | |
---|
163 | const real & get_price() const; |
---|
164 | |
---|
165 | void set_price(const real &); |
---|
166 | |
---|
167 | const real & get_other_cost() const; |
---|
168 | |
---|
169 | void set_other_cost(const real &); |
---|
170 | |
---|
171 | real get_relationship_manhours() const; |
---|
172 | |
---|
173 | Product & operator = (const Product &); |
---|
174 | |
---|
175 | Product & operator = (Product &&); |
---|
176 | |
---|
177 | DEFINE_SIMULATION_ATTRIBUTES_METHODS(Product_Simulation_Attributes) |
---|
178 | |
---|
179 | std::string to_dot() const; |
---|
180 | |
---|
181 | Good_Type get_type() const; |
---|
182 | |
---|
183 | real & production_at(const size_t &); |
---|
184 | |
---|
185 | real & stock_at(const size_t &); |
---|
186 | |
---|
187 | real & internal_requested_quantity_at(const size_t &); |
---|
188 | |
---|
189 | real requested_quantity_at(const size_t &); |
---|
190 | |
---|
191 | real & internal_sales_at(const size_t &); |
---|
192 | |
---|
193 | real & price_at(const size_t &); |
---|
194 | }; |
---|
195 | |
---|
196 | # endif // PRODUCT_H |
---|
197 | |
---|