private static Log PSO(int numberOfAntenae, double steeringAngle, Terminate t) { AntennaArray antenna = new AntennaArray(numberOfAntenae, steeringAngle); Swarm swarm = new Swarm(numberOfAntenae - 1, antenna, t, (uint)(20 + Math.Sqrt(numberOfAntenae))); return(swarm.StartPSO()); }
public static void Test() { const double f0 = 1e9; const double lambda = Consts.SpeedOfLight / f0; var array = AntennaArray.CreateLinearArray(new Antenna[4].Initialize(i => new UniformAntenna()), lambda / 2); var EF = array.GetPatternExpression(); var F = EF.Compile(); }
public Model() { var xml_data = XDocument.Load("Array.xml"); var antenna_array = new AntennaArray(xml_data.Root); var F = antenna_array.Pattern(5 * Math.PI / 180); antenna = new LinearAntennaArray(0.5, 5, i => new Dipole()); CalculateBeam(); }