-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parametros.cs
159 lines (137 loc) · 4.76 KB
/
Parametros.cs
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
// ReSharper disable ClassNeverInstantiated.Global
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
namespace SilogSolver
{
#region ParametrosEntrada
public class ParametrosDeEntrada
{
private double _nivelDeServicioMínimo;
public ParametrosDeEntrada()
{
MateriasPrimas = new ParametrosMateriasPrimas();
ProductoTerminado = new ParametrosProductoTerminado();
}
public int CantidadDeSemanas { get; set; }
public PrimaPorCarga CalcularPrimaPorCargaIncompleta { get; set; }
public double NivelDeServicioMínimo
{
get { return _nivelDeServicioMínimo; }
set
{
if (value < 0 || value > 1)
{
throw new ArgumentOutOfRangeException("NivelDeServicioMínimo debe estar entre 0 y 1");
}
_nivelDeServicioMínimo = value;
}
}
public double UtilidadMínima { get; set; }
public MaximizeParams Maximize { get; set; }
public enum MaximizeParams
{
Utilidad,
NivelDeServicio,
Compuesto
}
public uint VentasPrevias { get; set; }
public uint DemandasPrevias { get; set; }
public uint InversionMantenimiento { get; set; }
public double UtilidadAcumulada { get; set; }
public enum PrimaPorCarga
{
MateriaPrima,
ProductoTerminado,
Both
}
public ParametrosMateriasPrimas MateriasPrimas { get; set; }
public ParametrosProductoTerminado ProductoTerminado { get; set; }
public ScoresEstimados ScoresEstimados { get; set; }
}
public class ScoresEstimados
{
public double UtilidadMinima { get; set; }
public double UtilidadMaxima { get; set; }
public double NivelDeServicioMinimo { get; set; }
public double NivelDeServicioMaximo { get; set; }
}
public class ParametrosMateriasPrimas
{
public ParametrosMateriasPrimas()
{
Nikelen = new MateriaPrima();
Alternic = new MateriaPrima();
Progesic = new MateriaPrima();
}
public uint CapacidadActualAlmacen { get; set; }
public uint CapacidadEnConstruccion { get; set; }
public MateriaPrima Alternic { get; set; }
public MateriaPrima Nikelen { get; set; }
public MateriaPrima Progesic { get; set; }
}
public class MateriaPrima
{
public MateriaPrima()
{
}
[JsonIgnore]
public uint Disponible { get { return AlmacenPropio + AlmacenAlquilado + Detencion; } }
public uint AlmacenPropio { get; set; }
public uint AlmacenAlquilado { get; set; }
public uint Detencion { get; set; }
public ZeroedList<uint> EnTransito { get; set; }
public bool BloquearOrdenesAereas { get; set; }
public bool BloquearOrdenesTerrestres { get; set; }
}
public class ParametrosProductoTerminado
{
public ParametrosProductoTerminado()
{
Monopolis = new ProductoTerminadoCiudad();
Bipolis = new ProductoTerminadoCiudad();
Tripolis = new ProductoTerminadoCiudad();
Tetrapolis = new ProductoTerminadoCiudad();
Metropolis = new ProductoTerminadoCiudad();
}
public ProductoTerminadoCiudad Monopolis { get; set; }
public ProductoTerminadoCiudad Bipolis { get; set; }
public ProductoTerminadoCiudad Tripolis { get; set; }
public ProductoTerminadoCiudad Tetrapolis { get; set; }
public ProductoTerminadoCiudad Metropolis { get; set; }
}
public class ProductoTerminadoCiudad
{
public string CityName { get; set; }
public ZeroedList<uint> DemandaEstimada { get; set; }
public ZeroedList<uint> EnTransito { get; set; }
public int CapacidadActualAlmacen { get; set; }
public int CapacidadEnConstruccion { get; set; }
[JsonIgnore]
public uint Disponible { get { return AlmacenPropio + Detencion; } }
public uint AlmacenPropio { get; set; }
public uint Detencion { get; set; }
public ZeroedList<double> Precios { get; set; }
}
public class ZeroedList<T> : List<T>
{
public new T this[int index]
{
get
{
if (index >= Count)
{
return default(T);
}
return base[index];
}
set
{
}
}
}
#endregion
}