// Copyright (C) 2015 Deltares
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

/**
 * @file rtcToolsSNOPT.h
 * @brief SNOPT binding for RTC-Tools
 * @author Jorn Baayen
 * @version 0.1
 * @date August 2015
 */


#ifndef RTCTOOLSSNOPT_H
#define RTCTOOLSSNOPT_H

#include <snoptProblem.hpp>

#include "rtcToolsRuntime.h"

class rtcToolsSNOPT : public rtcToolsOptimizer
{
private:
	rtcToolsRuntime *tool;

	snoptProblemA snopt;

public:
	rtcToolsSNOPT(rtcToolsRuntime * tool, string workDir);
	rtcToolsSNOPT(rtcToolsRuntime * tool, rtcRuntimeConfigSettings::SNOPT par, string workDir);

	~rtcToolsSNOPT();

    int optimize();
	void initialize();
	void write(string filename);
};

#endif // rtcToolsSNOPT