<commit_before>#include "atp.h"
#include "../timer/timer.h"
#include <algorithm>
#include <ctime>

vector<bool> minimal_feasible_schedule(ATI &ati) {
	bool schedule_changed = true;
	srand(unsigned(time(0)));
	vector<int> v;
	vector<bool> closed;
	for(int i = 0; i < ati.num_times; i++) {
		v.push_back(i);
		closed.push_back(false);
	}
	while(schedule_changed) {
		schedule_changed = false;
		random_shuffle(v.begin(), v.end());
		for(int i = 0; i < ati.num_times; i++) {
			if(closed[i])
				continue;
			close_timeslot(ati, i);
			if(!feasible_schedule_exists(ati)) {
				open_timeslot(ati, i);
			} else {
				closed[i] = true;
				schedule_changed = true;
			}
		}
	}
	return closed;
}

<commit_msg>fixed bug where minfeas was simply going in increasing order of timeslots instead of arbitrarily choosing them<commit_after>#include "atp.h"
#include "../timer/timer.h"
#include <algorithm>
#include <ctime>

vector<bool> minimal_feasible_schedule(ATI &ati) {
	bool schedule_changed = true;
	srand(unsigned(time(0)));
	vector<int> v;
	vector<bool> closed;
	for(int i = 0; i < ati.num_times; i++) {
		v.push_back(i);
		closed.push_back(false);
	}
	while(schedule_changed) {
		schedule_changed = false;
		random_shuffle(v.begin(), v.end());
		for(int i = 0; i < ati.num_times; i++) {
			if(closed[v[i]])
				continue;
			close_timeslot(ati, v[i]);
			if(!feasible_schedule_exists(ati)) {
				open_timeslot(ati, v[i]);
			} else {
				closed[v[i]] = true;
				schedule_changed = true;
			}
		}
	}
	return closed;
}


{'fraction_non_alphanumeric': 0.16105610561056105, 'fraction_numerical': 0.0039603960396039604, 'mean_word_length': 4.174061433447099, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4392264', 'n_tokens_mistral': 652, 'n_tokens_neox': 585, 'n_words': 120}