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

# PGARestart(3)

reseeds a population from the best string

## NAME

PGARestart - reseeds a population from the best string

## INPUT PARAMETERS

- val

  \- the probability of changing an allele when copying the best string to the new population

- source\_pop

  \- the source population

- dest\_pop

  \- symbolic constant of the destination population

## OUTPUT PARAMETERS

- side

  \-effect.

## SYNOPSIS

```
#include "pgapack.h"
void  PGARestart(ctx, source_pop, dest_pop)
PGAContext *ctx
int source_pop
int dest_pop
```

## LOCATION

restart.c

## EXAMPLE

```
Perform an unspecified test to determine if the current evolution is
not evolving fast enough, and if so, restart the evolution.
PGAContext *ctx;	    PGAEvaluateMS(ctx, PGA_OLDPOP, f, comm);
PGAFitness   (ctx, PGA_OLDPOP);
}
:
if (StagnantEvolution()) {
PGARestart(ctx, PGA_OLDPOP, PGA_NEWPOP);
PGAEvaluate(ctx, PGA_NEWPOP, EvalFunc);
PGAUpdateGeneration(ctx);
}
```
