Digital Twin - GUI
|
A wrapper class for machines. More...
Public Member Functions | |
MachineCB (String name, LocationCB loc) | |
The Constructor. More... | |
void | addProduct (ProductCB prod) |
Add a product to this machine. More... | |
double | allChildrenChecked () |
Check if every procuct belonging to the machine is checked. More... | |
void | changeStateOfTimeslot (int t) |
Change the availability of this machine at timeslot t. More... | |
void | changeStateOfTimeslot (int t, bool b) |
Change the availability of this machine at timeslot t to a ceratin value. More... | |
void | checkAllProducts () |
Check all the product Checkboxes that belong to this machine. More... | |
List< String > | extendProductList (List< String > l) |
Extends the List of products that can be produced. More... | |
LocationCB | getLocation () |
Grants access to the location where the machine is located. More... | |
List< ProductCB > | getProducts () |
Grants access to the list of products that belong to the machine. More... | |
void | setNumberOfTimeslots (int num) |
Sets the number of timeslots to a certain amount. More... | |
bool | stateOfTimeslot (int t) |
Get the availability of this machine at timeslot t. More... | |
void | uncheckAllProducts () |
Uncheck all the product Checkboxes that belong to this machine. More... | |
Public Attributes | |
double | Bauteilwechselphase |
A number that describes the time needed to change toolkits on this machine (in minutes). More... | |
Private Attributes | |
LocationCB | location |
Location this machine belongs to. More... | |
List< ProductCB > | products |
List of products this machine can produce. More... | |
bool[] | timeslots |
An array that stores for each timeslot if the machine is available on this time. More... | |
A wrapper class for machines.
This class stores all the information that is needed to describe a pressing machine. Plus it contains all the members and functions of a System.Windows.Forms.CheckBox class, so that we have a Checkbox attached to it and can easily check at all times if we want to use if for the model.
GUI.Datatypes.MachineCB.MachineCB | ( | String | name, |
LocationCB | loc | ||
) |
The Constructor.
name | A string that determines the machine's name. |
loc | The location the machine is at. |
Constructs a machine simply by its name and the location that the machine is meant to be at. Machines are initialized with full availability.
void GUI.Datatypes.MachineCB.addProduct | ( | ProductCB | prod | ) |
Add a product to this machine.
prod | A product this machine can produce. |
This function allows one to add a product (type: ProductCB) to the list of products, that can be produced on this machine. Checks that products are not in the list twice.
double GUI.Datatypes.MachineCB.allChildrenChecked | ( | ) |
Check if every procuct belonging to the machine is checked.
Returns 0 iff all products are unchecked, 2 iff all products are checked and a value inbetween iff the Checkboxes are partly checked, unchecked and/or indeterminate.
void GUI.Datatypes.MachineCB.changeStateOfTimeslot | ( | int | t | ) |
Change the availability of this machine at timeslot t.
t | An integer that represents timeslot number t. |
Availability of machine is stored as an array of bools internally. This function flips the value of that array on position t if t is a valid timeslot.
void GUI.Datatypes.MachineCB.changeStateOfTimeslot | ( | int | t, |
bool | b | ||
) |
Change the availability of this machine at timeslot t to a ceratin value.
t | An integer that represents timeslot number t. |
b | Value timeslot t should be assigned. |
Availability of machine is stored as an array of bools internally. This function assigns a given value b to that array on position t if t is a valid timeslot.
void GUI.Datatypes.MachineCB.checkAllProducts | ( | ) |
Check all the product Checkboxes that belong to this machine.
If the user checks a machine, all of its products are taken into account for the model, i.e. all of the Checkboxes that belong to the products are checked as well.
List<String> GUI.Datatypes.MachineCB.extendProductList | ( | List< String > | l | ) |
Extends the List of products that can be produced.
l | The list that should be extended. |
Given a List of strings, this function extends that list with all the products (i.e. productnames) that can be produced on this machine whose Checkboxes are marked as checked. Checks that a product is not listed twice.
LocationCB GUI.Datatypes.MachineCB.getLocation | ( | ) |
Grants access to the location where the machine is located.
List<ProductCB> GUI.Datatypes.MachineCB.getProducts | ( | ) |
Grants access to the list of products that belong to the machine.
void GUI.Datatypes.MachineCB.setNumberOfTimeslots | ( | int | num | ) |
Sets the number of timeslots to a certain amount.
num | Value that represents the number of timeslots we want to look at. |
If the user changes start or end time for which the model should run, the amounts of timeslots (in hours) adapt these changes. All new timeslots are initialized as true, so the machine is fully available.
bool GUI.Datatypes.MachineCB.stateOfTimeslot | ( | int | t | ) |
Get the availability of this machine at timeslot t.
t | An integer that represents timeslot number t. |
Availability of machines is stored as an array of bools internally. This function returns the value of that array on position t if t is a valid timeslot.
void GUI.Datatypes.MachineCB.uncheckAllProducts | ( | ) |
Uncheck all the product Checkboxes that belong to this machine.
If the user checks a machine, none of its products are taken into account for the model, i.e. all of the Checkboxes that belong to the products are unchecked as well.
double GUI.Datatypes.MachineCB.Bauteilwechselphase |
A number that describes the time needed to change toolkits on this machine (in minutes).
|
private |
Location this machine belongs to.
|
private |
List of products this machine can produce.
|
private |
An array that stores for each timeslot if the machine is available on this time.