/home/coin/SVN-release/OS-1.0.0/OS/examples/amplClient/amplClient.cpp File Reference

#include "CoinSolver.h"
#include "OSConfig.h"
#include "OSnl2osil.h"
#include "OSiLReader.h"
#include "OSrLReader.h"
#include "OSiLWriter.h"
#include "OSrLWriter.h"
#include "OSInstance.h"
#include "OSResult.h"
#include "DefaultSolver.h"
#include "OSSolverAgent.h"
#include "OShL.h"
#include "ErrorClass.h"
#include <sstream>
#include <asl.h>

Include dependency graph for amplClient.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)


Detailed Description

Author:
Robert Fourer, Jun Ma, Kipp Martin,
Version:
1.0, 10/05/2005
Since:
OS1.0
Remarks:
Copyright (C) 2005, Robert Fourer, Jun Ma, Kipp Martin, Northwestern University, and the University of Chicago. All Rights Reserved. This software is licensed under the Common Public License. Please see the accompanying LICENSE file in OS root directory for terms.
This executable is designed to act as a "solver" for AMPL. It can be used to solve problems locally or on a remote server. For example, to solve a problem locally, start AMPL. We assume that the model is hs71.mod. Execute the following sequence of commands:

model hs71.mod;
option solver amplClient;
option amplClient_options "solver ipopt";
write gtestfile;
solve;
display x1;
you should get:

x1 = 1

display x2;
you should get:

x2 = 4.743

now if you wanted to call a remote OS solver do something like:

option ipopt_options "http://128.135.130.17:8080/os/OSSolverService.jws";

Definition in file amplClient.cpp.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 80 of file amplClient.cpp.

References OSnl2osil::createOSInstance(), ErrorClass::errormsg, OSResult::getOptimalDualVariableValues(), OSResult::getOptimalPrimalVariableValues(), OSResult::getSolutionMessage(), DefaultSolver::osinstance, OSnl2osil::osinstance, osinstance, DefaultSolver::osol, osresult, DefaultSolver::osrl, OSrLReader::readOSrL(), OSResult::setGeneralMessage(), OSResult::setGeneralStatusType(), OSSolverAgent::solve(), DefaultSolver::solve(), DefaultSolver::sSolverName, OSiLWriter::writeOSiL(), and OSrLWriter::writeOSrL().


Generated on Thu May 15 22:15:06 2008 by  doxygen 1.4.7