动态调整STEM_INC
This commit is contained in:
parent
061c66e888
commit
421d533c4a
@ -86,7 +86,7 @@ int* flip_need_update;
|
|||||||
std::vector<Gate*> flip_update_queue;
|
std::vector<Gate*> flip_update_queue;
|
||||||
|
|
||||||
// incremental stem struct
|
// incremental stem struct
|
||||||
const int STEM_INC = 2;
|
int STEM_INC = 0;
|
||||||
const int STEM_WEIGHT_MAX = 1e9;
|
const int STEM_WEIGHT_MAX = 1e9;
|
||||||
ll stem_total_weight;
|
ll stem_total_weight;
|
||||||
int stem_total_cnt;
|
int stem_total_cnt;
|
||||||
|
4
ls.cpp
4
ls.cpp
@ -138,7 +138,7 @@ bool Circuit::local_search(std::unordered_set<Fault*> &faults) {
|
|||||||
|
|
||||||
void Circuit::ls_update_weight() {
|
void Circuit::ls_update_weight() {
|
||||||
|
|
||||||
//STEM_INC += 5;
|
STEM_INC += 1;
|
||||||
|
|
||||||
if(rand() % 10000 <= SP * 10000) {
|
if(rand() % 10000 <= SP * 10000) {
|
||||||
for(Gate* g : gates) {
|
for(Gate* g : gates) {
|
||||||
@ -280,6 +280,8 @@ void Circuit::ls_init_data_structs() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STEM_INC = 0;
|
||||||
|
|
||||||
fault_propagate_score = 0;
|
fault_propagate_score = 0;
|
||||||
|
|
||||||
fault_propagate_tatal_len = 0;
|
fault_propagate_tatal_len = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user