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

# PGASetEvaluation(1)

Set the evaluation function value for a string to a specified value.

## NAME

PGASetEvaluation - Set the evaluation function value for a string to a specified value.

## DESCRIPTION

Also sets the evaulation up to date flag to PGA\_TRUE.

## INPUT PARAMETERS

- ctx

  \- context variable

- p

  \- string index

- pop

  \- symbolic constant of the population string p is in

- val

  \- the (user) evaluation value to assign to string p

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetEvaluation(ctx, p, pop, val)
PGAContext *ctx
int p
int pop
double val
```

## LOCATION

evaluate.c

## EXAMPLE

```
Example:
Set the evaluation function value of string p in population PGA_NEWPOP
to 123.456.
PGAContext *ctx;
int p;
:
PGASetEvaluation(ctx, p, PGA_NEWPOP, 123.456);
```
