IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Using Discrete Resources > Working with Discrete Resources > Solve the Problem

This solution uses the function IloSetTimesForward, which creates and returns a goal that assigns a start time to all activities in the model, while minimizing the criterion makespan. For more information on IloSetTimesForward, see Search Goals or the IBM ILOG Scheduler Reference Manual.

    // Algorithm
    IloSolver solver(model);
    IloGoal goal = IloSetTimesForward(env, makespan);