Computing Optimal Schedules of Battery Usage in Embedded Systems | Synapse