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

# PGASetMaxGAIterValue(3)

specify the maximum number of iterations for the stopping rule PGA\_STOP\_MAXITER (which, by itself, is the default stopping rule and is always in effect). The default value is 1000 iterations.

## NAME

PGASetMaxGAIterValue - specify the maximum number of iterations for the stopping rule PGA\_STOP\_MAXITER (which, by itself, is the default stopping rule and is always in effect).  The default value is 1000 iterations.

## INPUT PARAMETERS

- ctx

  \- context variable

- maxiter

  \- the maximum number of GA iterations to run before stopping

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetMaxGAIterValue(ctx, maxiter)
PGAContext *ctx
int maxiter
```

## LOCATION

stop.c

## EXAMPLE

```
Example:
PGAContext *ctx;
:
PGASetMaxGAIterValue(ctx,5000);
```
