ParallelSynchronous.java 892 Bytes
Newer Older
1 2
package mvd.jester.simulator;

Michael Schmid committed
3
import mvd.jester.model.SystemManager;
4 5 6 7

/**
 * MaiaBertogna
 */
8
public class ParallelSynchronous extends AbstractSimulator {
9

Michael Schmid committed
10
    public ParallelSynchronous(SystemManager systemSetup) {
11 12 13 14
        super(systemSetup);
    }

    @Override
15
    protected boolean releaseTasks(long timeStep) {
Michael Schmid committed
16 17 18 19 20 21 22 23 24 25 26
        // for (SynchronousTask t : systemSetup.getTasks()) {
        // if (timeStep % t.getPeriod() == 0) {
        // TaskContext tc = new TaskContext(t, timeStep);
        // if (!readyTasks.add(tc)) {
        // EventPrinter
        // .print("Time " + timeStep + ": Task " + tc + " could not be released!");
        // return false;
        // }
        // EventPrinter.print("Time " + timeStep + ": Task " + tc + " released!");
        // }
        // }
27 28 29 30 31 32 33 34 35 36
        return true;
    }

    @Override
    public String getName() {
        return "MaiaBertogna";
    }


}