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

# PGASetPopReplaceType(8)

Choose method of sorting strings to copy from old population to new population.

## NAME

PGASetPopReplaceType - Choose method of sorting strings to copy from old population to new population.

## DESCRIPTION

Valid choices are PGA\_POPREPL\_BEST, PGA\_POPREPL\_RANDOM\_NOREP, or PGA\_POPREPL\_RANDOM\_REP for copying the best strings, or  random string, with or without replacement, respectively, from the old population into the new population. The default is PGA\_POPREPL\_BEST.

## INPUT PARAMETERS

- ctx

  \- context variable

- pop\_replace

  \- symbolic constant to specify the population replacement strategy

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetPopReplaceType(ctx, pop_replace)
PGAContext *ctx
int pop_replace
```

## LOCATION

pop.c

## EXAMPLE

```
Example:
PGAContext *ctx;
:
PGASetPopReplaceType(ctx, PGA_POPREPL_RANDOM_NOREP);
```
