SkillAgentSearch skills...

SHALE

C++ version of SHALE paper: An Efficient Algorithm for Allocation of Guaranteed Display Advertising Guaranteed Display Advertising

Install / Use

/learn @linpingta/SHALE
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

SHALE-Cplusplus

C++ version of SHALE paper, ad inventory allocation

Paper

SHALE: An Efficient Algorithm for Allocation of Guaranteed Display Advertising

How to run code

  1. do cmake
cmake .
  1. make
make
  1. run binary
./shale

Output looks like

Allocation:
demand_node     demand          allocation
1       400     400
2       700     700
3       1100    0

Remained:
supply_node     inventory       remained
0       200     0
1       200     0
2       300     0
3       400     0
4       1200    1200

You may change supply/demand from supply.txt/demand.txt to supply_enough.txt/demand_enough.txt, which same as HWM (thetaIJ) result. Output looks like

Allocation:
demand_node     demand          allocation
1       200     206
2       300     291
3       1000    999

Remained:
supply_node     inventory       remained
0       200     0
1       200     0
2       300     176
3       400     34
4       1200    594
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated4mo ago
Forks1

Languages

C++

Security Score

87/100

Audited on Nov 14, 2025

No findings