← 全部工具

ampl-asl

热度 85 更新于 开发与构建

AMPL Solver Library

homebrewauto-collected

安装

Homebrew
brew install ampl-asl

通过 Homebrew 安装。

asl

This repository contains the up-to-date version of ASL (AMPL Solver Library) as maintained by David Gay. It supports cmake multiplatform builds. There are a few cmake switches that define which optional modules will be built:

  • BUILDEXAMPLES builds the ASL examples
  • BUILDF2c build the f2c (Fortran To C) library; implied in case the examples are being compiled
  • BUILDMTLIBS builds the asl-mt and asl2-mt libraries, multithreaded, compiled using OpenMP switches

Linux systems

To build the static library under x86 Unix/Linux systems and the examples, simply do the following:

mkdir build
cd build
cmake .. -DBUILD_EXAMPLES=1
make .

This by default builds 64 bits versions of the libraries, to build 32 bits builds, define the variable ARCH when calling cmake:

cmake .. -DARCH=32

Windows systems

To build the library on Windows (this assumes Visual Studio 2019 as a generator); note also that after the third step you'll have a file ASL.sln that can be opened from Visual Studio to continue the build from there.

md build
cd build
cmake .. 
cmake --build .

To build other flavours of the library, replace the cmake .. command with:

  • VS2019 32 bits: cmake .. -A Win32
  • VS2017 64 bits: cmake .. -G "Visual Studio 15 2017 Win64"
  • VS2017 32 bits: cmake .. -G "Visual Studio 15 2017"

Licenses

BSD-3 SMLNJ

Copyright © 2023 AMPL Optimization inc. All rights reserved.