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

# PGASetPopSize(8)

Specifies the size of the genetic algorithm population.

## NAME

PGASetPopSize - Specifies the size of the genetic algorithm population.

## DESCRIPTION

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);
```
