Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewK8sStrategy ¶
Types ¶
type Provider ¶
type Provider struct { Pid int64 CpuSum float64 MemSum float64 DiskSum float64 CpuCost float64 MemCost float64 DiskCost float64 CpuAvail float64 MemAvail float64 DiskAvail float64 CurReplicas int MaxReplicas int MaxTaskCanRun int //记录该厂商针对当前可以接收的最大任务数 TrustDegree float64 //信任度取值为0到1,默认初始为1 LearnIndex float64 //云厂商生产成本的学习指数 PartWill float64 //合作意愿 ProfitSum float64 ProfitPerTask map[int]float64 }
func NewProvider ¶
func (*Provider) GenMaxResourceNum ¶
type Strategy ¶
type Strategy struct { Tasksolution []int //对应1种任务分配方案 Resourcesolution [][]int //有多种资源购买方案 ValueSum float64 //记录该参与联盟最大策略的总分值 Profit float64 //记录该参与联盟最大策略的利润 HighDegree float64 //记录该参与联盟最大策略的高可用度值 }
func NewStrategy ¶
func NewStrategy() *Strategy
type Task ¶
type Task struct { Tid int Replicas int //副本数 Cpu float64 Mem float64 Disk float64 Time int //单个副本的运行时间 T0 int T1 int Pr float64 //延迟最低,用户满意度为1时用户的支付价格 B int MaxscoreStrategy *Strategy ResourcePerTask [][]int //存储调度后每个云厂商的具体占用资源剩余执行时间 }
Click to show internal directories.
Click to hide internal directories.