Optimal Design and Operation of Polygeneration Systems Incorporating Renewable Energy Sources and Chemical Production