Optimal Resource Allocation with Time-varying Marketing Effectiveness, Margins and Costs | Synapse