This is a Julia help you to project onto the intersection of a box and a hyperplane (also known as the continuous knapsack problem). It wraps the code described in our paper in Mathematical Programming Computation:
@article{CMS2014,
author = {Roberto Cominetti, Walter F. Mascarenhas, and Paulo J. S. Silva},
title = {A Newton's method for the continuous quadratic knapsack problem},
journal = {Mathematical Programming Computation},
volume = {6},
pages = {151--169},
year = {2014},
doi = {10.1007/s12532-014-0066-y},
}
If you find this work useful in your research, please cite the paper.