Loop in cpu_cost model::GetEquivClassToEquivClassesArcs need to simplified , make method and return true or false and use it in for loop conditional check and increment.
for (cur_resource = *task_resource_request;
cur_resource.cpucores < available_resources.cpucores &&
cur_resource.ramcap < available_resources.ramcap &&
cur_resource.ephemeralstorage < available_resources.ephemeralstorage &&
index < ecs_for_machine->size() && task_count < rd.max_pods();
cur_resource.cpucores += task_resource_request->cpucores,
cur_resource.ramcap += task_resource_request->ramcap,
cur_resource.ephemeralstorage += task_resource_request->ephemeralstorage,
index++, task_count++) {
cout<<"*** pushing at index"<<index<<endl;
pref_ecs->push_back(ec_machines.second[index]);
}
Loop in cpu_cost model::GetEquivClassToEquivClassesArcs need to simplified , make method and return true or false and use it in for loop conditional check and increment. for (cur_resource = *task_resource_request; cur_resource.cpucores < available_resources.cpucores && cur_resource.ramcap < available_resources.ramcap && cur_resource.ephemeralstorage < available_resources.ephemeralstorage && index < ecs_for_machine->size() && task_count < rd.max_pods(); cur_resource.cpucores += task_resource_request->cpucores, cur_resource.ramcap += task_resource_request->ramcap, cur_resource.ephemeralstorage += task_resource_request->ephemeralstorage, index++, task_count++) { cout<<"*** pushing at index"<<index<<endl;
pref_ecs->push_back(ec_machines.second[index]); }