All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javafmi.skeleton.actions.SetupExperiment Maven / Gradle / Ivy

/*
 *  Copyright 2013-2016 SIANI - ULPGC
 *
 *  This File is part of JavaFMI Project
 *
 *  JavaFMI Project is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License.
 *
 *  JavaFMI Project is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with JavaFMI. If not, see .
 */

package org.javafmi.skeleton.actions;

import org.javafmi.framework.FmiSimulation;
import org.javafmi.skeleton.Action;

public class SetupExperiment implements Action {
    @Override
    public String executeOn(FmiSimulation simulation, String... args) {
        return simulation.setupExperiment(
                Boolean.valueOf(args[0]),
                Double.valueOf(args[1].replace(",", ".")),
                Double.valueOf(args[2].replace(",", ".")),
                Boolean.valueOf(args[3]),
                Double.valueOf(args[4].replace(",", "."))).toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy