This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This is a modified version of pyoptsparse/pyoptsparse/pySNOPT/setup.py | |
# The modifications allow the user to use pyOpt with SNOPT precompiled libraries. | |
# | |
# Instructions: | |
# 1. Replace pyoptsparse/pyoptsparse/pySNOPT/setup.py with this file. | |
# 2. Modify line 39 so that snopt7_path is the actual path to the location of the | |
# precompiled SNOPT library (libsnopt7.*). | |
# 3. Make sure to add the location of the library to DYLD_LIBRARY_PATH (for macOS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#----------------------------------------------------------------------- | |
# Makefile to create SNOPT AMPL executable from libsnopt7.a | |
# | |
# Assumes you have downloaded solvers.tgz and snopt.tgz and | |
# that you ran "./configurehere; make" in the solvers | |
# directory to build amplsolver.a | |
#----------------------------------------------------------------------- | |
SNOPT_LIB = /path/to/libsnopt7.a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [x,F,xmul,Fmul,INFO] = hs116_nonlin() | |
% HS116 | |
% Problem has both linear and nonlinear constraints but | |
% all constraints are defiend as nonlinear in this example. | |
% | |
% Jacobian defined in coordinate form | |
% Linear objective defined in row 1. | |
% | |
% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [x,F,info]=hs116_matrix() | |
% HS Problem 116 with explicit linear constraints. | |
% The Jacobian structure and linear elements are defined as a matrix. | |
% Linear objective row is in the first row and defined as a "nonlinear" function. | |
options.name = 'hs116'; | |
options.printfile = 'hs116_mtx.out'; | |
options.specsfile = which('hs116.spc'); | |
options.system_information ='yes'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.8) | |
#pull in the user-defined configurations | |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}) | |
include(EMTG-Config.cmake) | |
if (${EMTG_MPI}) | |
add_definitions(-DEMTG_MPI) | |
message(STATUS "Activating MPI with compiler: ${CMAKE_CXX_COMPILER}") | |
endif() |