---
name: "PGASetPopSize"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.0.0.1-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/PGASetPopSize/3"
---

# PGASetPopSize(3)

Specifies the size of the genetic algorithm population. The default population size is 100.

## NAME

PGASetPopSize - Specifies the size of the genetic algorithm population. The default population size is 100.

## INPUT PARAMETERS

- ctx

  \- context variable

- popsize

  \- the genetic algorithm population size to use

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetPopSize(ctx, popsize)
PGAContext *ctx
int popsize
```

## LOCATION

pop.c

## EXAMPLE

```
Example:
PGAContext *ctx;
:
PGASetPopSize(ctx, 200);
```
