Digital Twin - GUI
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
GUI.IO_Modules.ModelData Class Reference

This class reads all the important data out of an Excel file related to the model. More...

Public Member Functions

 ModelData (String dir, String[] locNames, LocationCB[] loc, Dictionary< String, int > locDic)
 Constructor. More...
 
String toDatString (double d, DateTime start, DateTime end)
 Concatenates the array and set strings, suitable for Xpress. Considers only the needed data, e.g. nothing outside of the time horizon. More...
 

Public Attributes

int maxN = 0
 Maximum amount of orders for a single product. More...
 

Private Member Functions

void createOrderData (DataTable sheet1, string sheetName)
 
String getAlpha (double d)
 Writes data to array "alpha". More...
 
String getBeta ()
 Writes data to array "beta". More...
 
void getContainerData (DataTable sheet)
 Extract container data from sheet. More...
 
String getDelta ()
 Writes data to array "delta". More...
 
String getEpsilon ()
 Writes data to array "epsilon". More...
 
String getEta (double d)
 Writes data to array "eta". More...
 
String getGamma (DateTime start, double d)
 Writes data to array "gamma". More...
 
String getKappa ()
 Writes data to array "kappa". More...
 
String getKhi ()
 Writes data to array "khi". More...
 
String getLambda ()
 Writes data to array "lambda". More...
 
String getLocations ()
 Writes data to set "S". Initilizes usableLocationDictionary. More...
 
String getLocOfMachine ()
 Writes data to array "LocOfMachine". More...
 
String getMachines ()
 Writes data to set "M". More...
 
String getMachinesOfLocation ()
 Writes data to array "MachinesOfLocation". More...
 
void getMatrixData (DataTable sheet, String s)
 Extract matrix data from sheet. More...
 
void getModelData ()
 Reads all the excel sheets and writes data to respective arrays. More...
 
String getNAndMaxN (DateTime start, DateTime end)
 Writes data to array "N" and field "nMax". Initializes relevantOrders by given time horizon. More...
 
String getNu ()
 Writes data to array "nu". More...
 
String getProducts ()
 Writes data to set "P". Initializes producableProductDictionary. More...
 
String getPsi ()
 Writes data to array "psi". More...
 
String getRho ()
 Writes data to array "rho". More...
 
String getSigma ()
 Writes data to array "sigma". More...
 
void getStockData (DataTable sheet)
 Extract stock data from sheet. More...
 
String getT (double d, DateTime start, DateTime end)
 Writes data to set "T". More...
 
String getTau (double d)
 Writes data to set "tau". More...
 
void getToolkitData (DataTable sheet)
 Extract Toolkit data from sheet. More...
 
String getToolkits ()
 Writes data to set "W". More...
 
String getV (double d)
 Writes data to array "v". More...
 
String getWdep ()
 Writes data to array "Wdep". More...
 
String getWProducer ()
 Writes data to array "WProducer". More...
 
String getYInit ()
 Writes data to array "yInit". More...
 

Private Attributes

double[][] DauerBauteillogistik
 Matrix that contains DauerBauteillogistik data for the model. Index is: [S][S]. More...
 
double[][] DauerWerkzeuglogistik
 Matrix that contains DauerWerkzeuglogistik data for the model. Index is: [S][S]. More...
 
String Dir
 Directory CheckboxCreator reads from. More...
 
double[] FuellgradBehaelter
 Array that contains FuellgradBehaelter data for the model. Index is P. More...
 
double[] FuellgradTransportmittel
 Array that contains FuellgradTransportmittel data for the model. Index is P. More...
 
double[][] KostenBauteillogistik
 Matrix that contains KostenBauteillogistik data for the model. Index is: [S][S]. More...
 
double[][] KostenWerkzeuglogistik
 Matrix that contains KostenWerkzeuglogistik data for the model. Index is: [S][S]. More...
 
Dictionary< String, int > locationDictionary
 Dictionary that maps a location's name to its position in the locations array. More...
 
String[] locationNames
 Array that contains all of the locations' names. More...
 
LocationCB[] locations
 Array that contains all of the locations. More...
 
List< Order >[][] orders
 List of orders for a product p at location S. Index is: [S][P]. More...
 
Dictionary< String, int > producableProductDictionary
 Subdictionary that maps a product's name to its position in the product array. Only conatains checked product. More...
 
Dictionary< String, int > productDictionary
 Dictionary that maps a product's name to its position in the product array. More...
 
String[] productNames
 Array that contains all of the products' names. More...
 
List< Order >[][] relevantOrders
 List of orders for a product p at location S, that fall into our time horizon. Index is: [S][P]. More...
 
double[][] StockOfProdAtLocation
 Matrix that contains StockOfProdAtLocation data for the model. Index is: [P][S]. More...
 
Dictionary< String, int > usableLocationDictionary
 Subdictionary that maps a location's name to its position in the locations array. Only conatains checked locations. More...
 
List< ToolkitusableToolkits
 List that contains all Toolkits. More...
 

Detailed Description

This class reads all the important data out of an Excel file related to the model.

Constructor & Destructor Documentation

GUI.IO_Modules.ModelData.ModelData ( String  dir,
String[]  locNames,
LocationCB[]  loc,
Dictionary< String, int >  locDic 
)

Constructor.

Parameters
dirDirectory ModelData reads from.
locNamesAll the location names.
locAll the location checkboxes.
locDicDictionary that maps a location's name to its position in the locations array.

Member Function Documentation

String GUI.IO_Modules.ModelData.getAlpha ( double  d)
private

Writes data to array "alpha".

Parameters
dFactor that determines length of a timeslot. Length is 60min*d.
Returns
String, that Mosel Xpress can read in. Only for relevant set items.
alpha: array(S,S) of real.
Number of timeslots needed for transportation of products from s1 to s2.
String GUI.IO_Modules.ModelData.getBeta ( )
private

Writes data to array "beta".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. beta: array(S,P) of integer. Initial stock of product p at location s.
void GUI.IO_Modules.ModelData.getContainerData ( DataTable  sheet)
private

Extract container data from sheet.

Parameters
sheetDataTable that is extracted from an Excel worksheet.
String GUI.IO_Modules.ModelData.getDelta ( )
private

Writes data to array "delta".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. delta: array(S,S,W) of real. Logistic cost for shipping toolkit w from s1 to s2.
String GUI.IO_Modules.ModelData.getEpsilon ( )
private

Writes data to array "epsilon".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
epsilon: array(S,P,L) of integer.
Demand of product p at location s for order l.
String GUI.IO_Modules.ModelData.getEta ( double  d)
private

Writes data to array "eta".

Parameters
dFactor that determines length of a timeslot. Length is 60min*d.
Returns
String, that Mosel Xpress can read in. Only for relevant set items.
eta: array(S,S,W) of real.
Number of timeslots needed for transportation of toolkit w from s1 to s2.
String GUI.IO_Modules.ModelData.getGamma ( DateTime  start,
double  d 
)
private

Writes data to array "gamma".

Parameters
startStart time for time horizon.
dFactor that determines length of timeslot. Length is 60min*d.
Returns
String, that Mosel Xpress can read in. Only for relevant set items.
gamma: array(S,P,L) of integer.
Deadline for l-th order of product p at location s.
String GUI.IO_Modules.ModelData.getKappa ( )
private

Writes data to array "kappa".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. kappa: array(P) of integer. Number of products p which can fit in one container.
String GUI.IO_Modules.ModelData.getKhi ( )
private

Writes data to array "khi".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. khi: array(S,S) of real. Logistic cost for shipping 1 truck from s1 to s2.
String GUI.IO_Modules.ModelData.getLambda ( )
private

Writes data to array "lambda".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
lambda: integer.
Minimum buffer for a toolkit exchange.
String GUI.IO_Modules.ModelData.getLocations ( )
private

Writes data to set "S". Initilizes usableLocationDictionary.

Returns
String, that Mosel Xpress can read in. Only checked location. S: set of strings.
String GUI.IO_Modules.ModelData.getLocOfMachine ( )
private

Writes data to array "LocOfMachine".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
LocOfMachine: array(M) of string.
For each machine, store its location.
String GUI.IO_Modules.ModelData.getMachines ( )
private

Writes data to set "M".

Returns
String, that Mosel Xpress can read in. Only checked machines. M: set of strings.
String GUI.IO_Modules.ModelData.getMachinesOfLocation ( )
private

Writes data to array "MachinesOfLocation".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
MachinesOfLocation: array(S) of list of string.
For each location l, store the list of machines located in l.
void GUI.IO_Modules.ModelData.getMatrixData ( DataTable  sheet,
String  s 
)
private

Extract matrix data from sheet.

Parameters
sheetDataTable that is extracted from an Excel worksheet.
sName of the array this function writes to.
void GUI.IO_Modules.ModelData.getModelData ( )
private

Reads all the excel sheets and writes data to respective arrays.

String GUI.IO_Modules.ModelData.getNAndMaxN ( DateTime  start,
DateTime  end 
)
private

Writes data to array "N" and field "nMax". Initializes relevantOrders by given time horizon.

Parameters
startStart time for time horizon.
endEnd time for time horizon.
Returns
String, that Mosel Xpress can read in. Only for relevant set items.
N: array(S,P) of intger.
Number of orders for product p at location s.

nMax: integer.
Maximum amount of orders for a single product.
String GUI.IO_Modules.ModelData.getNu ( )
private

Writes data to array "nu".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
Nu: array(S,P,L) of integer.
Safety stock for product p at location s of order l.
String GUI.IO_Modules.ModelData.getProducts ( )
private

Writes data to set "P". Initializes producableProductDictionary.

Returns
String, that Mosel Xpress can read in. Only checked products. P: set of strings.
String GUI.IO_Modules.ModelData.getPsi ( )
private

Writes data to array "psi".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. psi: array(S,P) of real Penalty for missing item p at location s.
String GUI.IO_Modules.ModelData.getRho ( )
private

Writes data to array "rho".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
rho: array(M,W) of real.
Number of products that machine m and toolkit w are able to produce per minute.
String GUI.IO_Modules.ModelData.getSigma ( )
private

Writes data to array "sigma".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. sigma: array(P) of integer. Number of containers for product p which can be placed on a transportation device.
void GUI.IO_Modules.ModelData.getStockData ( DataTable  sheet)
private

Extract stock data from sheet.

Parameters
sheetDataTable that is extracted from an Excel worksheet.
String GUI.IO_Modules.ModelData.getT ( double  d,
DateTime  start,
DateTime  end 
)
private

Writes data to set "T".

Parameters
dFactor for determining timeslot length. Length is 60min*d.
startStart time of time horizon.
endEnd time of time horizon.
Returns
String GUI.IO_Modules.ModelData.getTau ( double  d)
private

Writes data to set "tau".

Parameters
dFactor for determining timeslot length. Length is 60min*d.
Returns
void GUI.IO_Modules.ModelData.getToolkitData ( DataTable  sheet)
private

Extract Toolkit data from sheet.

Parameters
sheetDataTable that is extracted from an Excel worksheet.
String GUI.IO_Modules.ModelData.getToolkits ( )
private

Writes data to set "W".

Returns
String, that Mosel Xpress can read in. Only checked toolkits for checked locations. W: set of strings.
String GUI.IO_Modules.ModelData.getV ( double  d)
private

Writes data to array "v".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. v: array(M, W) of integer. Duration of setup phase of toolkit w on machine m.
String GUI.IO_Modules.ModelData.getWdep ( )
private

Writes data to array "Wdep".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
Wdep: array(W) of list of string. For each toolkit, store the list of dependent tools.
String GUI.IO_Modules.ModelData.getWProducer ( )
private

Writes data to array "WProducer".

Returns
String, that Mosel Xpress can read in. Only for relevant set items.
WProducer: array(P) of list of string.
For each product p, store the list of toolkits producing p.
String GUI.IO_Modules.ModelData.getYInit ( )
private

Writes data to array "yInit".

Returns
String, that Mosel Xpress can read in. Only for relevant set items. yInit : array(S,W) of integer. Bbinary: 1 if toolkit w is initially located in w.
String GUI.IO_Modules.ModelData.toDatString ( double  d,
DateTime  start,
DateTime  end 
)

Concatenates the array and set strings, suitable for Xpress. Considers only the needed data, e.g. nothing outside of the time horizon.

Parameters
dd is between 0 and 1. Timeslot length will be 60min*d.
startStarttime for optimization.
endEndtime for optimization.
Returns
Dat String, that Mosel Xpress can read in.

Member Data Documentation

double [][] GUI.IO_Modules.ModelData.DauerBauteillogistik
private

Matrix that contains DauerBauteillogistik data for the model. Index is: [S][S].

double [][] GUI.IO_Modules.ModelData.DauerWerkzeuglogistik
private

Matrix that contains DauerWerkzeuglogistik data for the model. Index is: [S][S].

String GUI.IO_Modules.ModelData.Dir
private

Directory CheckboxCreator reads from.

double [] GUI.IO_Modules.ModelData.FuellgradBehaelter
private

Array that contains FuellgradBehaelter data for the model. Index is P.

double [] GUI.IO_Modules.ModelData.FuellgradTransportmittel
private

Array that contains FuellgradTransportmittel data for the model. Index is P.

double [][] GUI.IO_Modules.ModelData.KostenBauteillogistik
private

Matrix that contains KostenBauteillogistik data for the model. Index is: [S][S].

double [][] GUI.IO_Modules.ModelData.KostenWerkzeuglogistik
private

Matrix that contains KostenWerkzeuglogistik data for the model. Index is: [S][S].

Dictionary<String, int> GUI.IO_Modules.ModelData.locationDictionary
private

Dictionary that maps a location's name to its position in the locations array.

String [] GUI.IO_Modules.ModelData.locationNames
private

Array that contains all of the locations' names.

LocationCB [] GUI.IO_Modules.ModelData.locations
private

Array that contains all of the locations.

int GUI.IO_Modules.ModelData.maxN = 0

Maximum amount of orders for a single product.

List<Order> [][] GUI.IO_Modules.ModelData.orders
private

List of orders for a product p at location S. Index is: [S][P].

Dictionary<String, int> GUI.IO_Modules.ModelData.producableProductDictionary
private

Subdictionary that maps a product's name to its position in the product array. Only conatains checked product.

Dictionary<String, int> GUI.IO_Modules.ModelData.productDictionary
private

Dictionary that maps a product's name to its position in the product array.

String [] GUI.IO_Modules.ModelData.productNames
private

Array that contains all of the products' names.

List<Order> [][] GUI.IO_Modules.ModelData.relevantOrders
private

List of orders for a product p at location S, that fall into our time horizon. Index is: [S][P].

double [][] GUI.IO_Modules.ModelData.StockOfProdAtLocation
private

Matrix that contains StockOfProdAtLocation data for the model. Index is: [P][S].

Dictionary<String, int> GUI.IO_Modules.ModelData.usableLocationDictionary
private

Subdictionary that maps a location's name to its position in the locations array. Only conatains checked locations.

List<Toolkit> GUI.IO_Modules.ModelData.usableToolkits
private

List that contains all Toolkits.


The documentation for this class was generated from the following file: