Relay and Power Splitting Ratio Selection for Cooperative Networks with Energy Harvesting