Agrivoltaics (AV), the integration of agriculture and photovoltaic (PV) technology, can provide solutions to address land use conflicts associated with growing demands for food, energy, and water resources. Currently, there is no method to address the site-specific characteristics of AV (altered microclimate, crop yield, PV and crop design) in a planning and optimization model. In this paper, we develop a first-of-its-kind open-source AV design model with solar, crop (soybean), economic, and optimization modules. We use this model to conduct an in-silico multi-objective optimization experiment, revealing a nuanced relationships between PV energy and soybean crop output (yield and profit). We find that PV panel spacing is a critical factor within the global optimal design domain, positively affecting crop production and crop profit, while negatively impacting PV generation per land area, PV profit, and land equivalent ratio (LER). An increase in PV spacing, transitioning from traditional solar farms to those approaching agricultural farms, causes a 49% and 75% increase in crop production and profit, respectively. However, this also results in a decrease of 55% in PV power generation, 54% in PV profit, and 17% in LER. Additionally, PV height and crop buffer zones around panel boundaries show secondary effects, with optimal designs favoring taller PV installations and narrower crop buffers (occupying ~40% of the under-panel area for soybean cultivation) for enhanced system efficiency. Our integrated modeling framework informs AV design guidelines and offers insights to support informed technological decision-making in this dynamically evolving field.