This is my submission to Rubylight/JUG programming contest 2, my code is in src/main/java/lv/jug/rubylightcontest2/impl/InstanceManagerImpl.java
A lot of parameters are fine-tuned for the load in Load.csv file (like the initial wild guess and scales for first 24 hours). AFAIK the problem is usually solved by reporting the load every 10 or 5 minutes and hourly billing so this is just a gamble.
https://wiki.rubylight.com/pages/viewpage.action?pageId=2687202