Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batsched
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
poquet
millian
batsched
Commits
56283fb3
Commit
56283fb3
authored
1 year ago
by
karim.moussaoui
Browse files
Options
Downloads
Patches
Plain Diff
Carbon Algo, Fait par : Karim/Adem
parent
bf11e9b3
No related branches found
No related tags found
No related merge requests found
Pipeline
#8638
failed
1 year ago
Stage: big_stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/algo/carbone.hpp
+32
-0
32 additions, 0 deletions
src/algo/carbone.hpp
with
32 additions
and
0 deletions
src/algo/carbone.hpp
0 → 100644
+
32
−
0
View file @
56283fb3
#ifndef CARBONE_HPP
#define CARBONE_HPP
#pragma once
#include
<list>
#include
"../isalgorithm.hpp"
#include
"../json_workload.hpp"
#include
"../locality.hpp"
#include
"../schedule.hpp"
#include
"isalgorithm.hpp"
class
CarboneAlgorithm
:
public
ISchedulingAlgorithm
{
public:
CarboneAlgorithm
(
Workload
*
workload
,
SchedulingDecision
*
decision
,
Queue
*
queue
,
ResourceSelector
*
selector
,
double
rjms_delay
,
rapidjson
::
Document
*
variant_options
);
virtual
~
CarboneAlgorithm
();
virtual
void
on_simulation_start
(
double
date
,
const
rapidjson
::
Value
&
batsim_config
);
virtual
void
on_simulation_end
(
double
date
);
void
make_decisions
(
double
date
,
SortableJobOrder
::
UpdateInformation
*
update_info
,
SortableJobOrder
::
CompareInformation
*
compare_info
)
override
;
void
updateCarbonFootprint
(
int
dcA
,
int
dcB
,
int
dcC
);
private:
int
select_datacenter_with_lowest_carbon_footprint
();
int
carbonFootprintDcA
;
int
carbonFootprintDcB
;
int
carbonFootprintDcC
;
protected:
Schedule
_schedule
;
bool
_debug
=
false
;
};
#endif // CARBONE_HPP
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment