A linear programming approach for battery degradation analysis and optimization in offgrid power systems with solar energy integration | Synapse