-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGreedy.cpp
More file actions
39 lines (33 loc) · 905 Bytes
/
Copy pathGreedy.cpp
File metadata and controls
39 lines (33 loc) · 905 Bytes
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
#include "Greedy.h"
Greedy::~Greedy(){};
Greedy::Greedy()
{
int i,j; // untuk iterasi
Release = 0; // awal dari pemakaian
Deadline = 0; // batas akhir pemakaian
char Barang[] = "kulkas","TV","AC","Mesin Cuci", "" ;
float kWh[] // array kosong berisi besar daya yang akan dibaca melalui teks
int on[]; // array kosong untuk menyimpan waktu menyala
int off[]; // array kosong untuk menyimpan waktu mati
int NSlot[]; // array kosong untuk menyimpan slot yang kosong
Priority = 0; // Kepentingan pemakaian listrik
}
// atribut
void Greedy::InitGreedy(){
int i;
i = 0;
}
void Greedy::GreedykWh(){ // greedy untuk mencari nilai kWH terbanyak
int k;
};
void Greedy::GreedyMoney(){
int N_Slot;
for (N_Slot=0; N_Slot < MaxSlot; N_Slot++){
Path[N_Slot] = StartSlot;
}
};
void Greedy::GreedyPriority(){
int N_Slot;
for (N_Slot=0; N_Slot < MaxSlot; N_Slot++)
}
void AI::