2 using System.Collections.Generic;
5 using System.Threading.Tasks;
9 namespace GUI.Datatypes
50 this.ThreeState =
true;
51 machines =
new List<MachineCB>();
52 toolkits =
new List<Toolkit>();
53 timeslots =
new bool[] {
true };
54 this.Penalty = penalty;
69 mac.CheckState = CheckState.Checked;
85 mac.CheckState = CheckState.Unchecked;
104 if (m.CheckState.Equals(CheckState.Checked)) sum += 2;
105 if (m.CheckState.Equals(CheckState.Indeterminate)) sum += 1;
106 if (m.CheckState.Equals(CheckState.Unchecked)) sum += 0;
109 double d = (double)sum / (
double)machines.Count;
146 timeslots[t] = !timeslots[t];
163 timeslots =
new bool[num];
164 for (
int i = 0; i < timeslots.Length; i++)
180 if (!machines.Contains(m))
205 if (!toolkits.Contains(t))
double allChildrenChecked()
Check if every machine belonging to the location is checked.
void addMachine(MachineCB m)
Add a machine to this location.
bool[] timeslots
An array that stores for each timeslot if the location is available on this time. ...
List< String > extendProducableProducts(List< String > l)
Extends the List of products that can be produced.
A wrapper class for locations.
void addToolkit(Toolkit t)
Add a toolkit to this location.
List< String > extendProductList(List< String > l)
Extends the List of products that can be produced.
List< MachineCB > machines
A list of machines that belong to this location.
List< Toolkit > toolkits
A list of toolkits that belong to this location.
void setNumberOfTimeslots(int num)
Sets the number of timeslots to a certain amount.
void changeStateOfTimeslot(int t)
Change the availability of this machine at timeslot t.
LocationCB(String name, double penalty)
The Constructor.
void changeStateOfTimeslot(int t)
Change the availability of this location at timeslot t.
void uncheckAllMachines()
Uncheck all the machine Checkboxes that belong to this location.
A wrapper class for machines.
bool stateOfTimeslot(int t)
Get the availability of this location at timeslot t.
void checkAllMachines()
Check all the machine Checkboxes that belong to this location.
double Penalty
A number that describes the estimated penalty for the dalayed production of one product (in Euro)...
List< MachineCB > getMachines()
Grants access to the list of machines that belong to the location.
List< Toolkit > getToolkits()
Grants access to the list of toolkits that belong to the location.