Generate constraints for the activities of the project.

Activity constraints are time values (dates) to imply ready times, locked times or due dates on project activities, as explained in the P2Schedule:change_constraint_value function. The following parameters are required:

- Percentage of activities with a constraint.
- Constraint distribution: activity constraints are randomly generated between the project start and the critical path length multiplied with a conDist parameter. The minimum conDist value is equal to 1.
- Activity constraint can lead to infeasible schedules due to constraint hardness options (see the P2Schedule:change_constraint_hardness function). You should indicate whether infeasible constraint generation is allowed.

Parameters:

I/O |
Type |
Name |
Description |
---|---|---|---|

input | integer | percentage | fraction of activities in the project having constraints |

input | float | conDist | time window, value equal to 1 (critical path) or bigger |

input | integer | feasible | feasible constraints? 0 (no) or 1 (yes) |

Learn More:

Step inside PMKC.

Example:

function ()

io.write('\n')

end

io.write('\n')

end

Class:

P2Generator