Skip to content

StoccoDavide/Pipal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipal

This library is a C++ porting of Frank E. Curtis's Penalty-Interior-Point ALgorithm (PIPAL).

Pipal is a header-only library that provides a simple interface for solving these types of optimization problems using an interior-point method. It is based on the Eigen library and written in C++17.

Are you looking for the online documentation? Visit this link!

Installation

Quick and dirty

Pipal is a header-only library that depends only on Eigen (version >= 3.4.0), so the quick and dirty way of installing it is by simply copying the include directory to your project and make sure to have Eigen available however you see fit. Alternatively, you can do things properly and use CMake (version >= 3.14).

CMake

If you are using CMake, you can add the library as a subdirectory in your project.

add_subdirectory(path/to/Pipal)
target_link_libraries(your_target PRIVATE Pipal::Pipal)

You can use FetchContent to download the library from GitHub.

include(FetchContent)

# Optionally specify a custom path to fetch content to
set(FETCHCONTENT_BASE_DIR "path/to/your/dependencies")
fetchcontent_declare(
  Pipal
  GIT_REPOSITORY https://github.com/StoccoDavide/Pipal.git
  GIT_TAG        main
)
fetchcontent_makeavailable(Pipal)
target_link_libraries(your_target PRIVATE Pipal::Pipal)

If you already have Pipal somewhere on your system, you can use find_package directly.

# Optionally specify a custom path to find content from
list(APPEND CMAKE_PREFIX_PATH "path/to/your/dependencies")
find_package(
  Pipal
  ${YOUR_DESIRED_PIPAL_VERSION}
  NO_MODULE
)

target_link_libraries(your_target PRIVATE Pipal::Pipal)

Since we are nice people, we also show you how to conditionally use FetchContent based if you already have the library or not.

# Optionally specify a custom path to find content from
list(APPEND CMAKE_PREFIX_PATH "path/to/your/dependencies")
find_package(
  Pipal
  ${YOUR_DESIRED_PIPAL_VERSION}
  NO_MODULE
)

if(NOT TARGET Pipal::Pipal)
  include(FetchContent)

  # Optionally specify a custom path to fetch content to
  set(FETCHCONTENT_BASE_DIR "path/to/your/dependencies")
  fetchcontent_declare(
    Pipal
    GIT_REPOSITORY https://github.com/StoccoDavide/Pipal.git
    GIT_TAG        main
  )

  fetchcontent_makeavailable(Pipal)
endif()

target_link_libraries(your_target PRIVATE Pipal::Pipal)

Authors

Aka...

▗▄▄▄  ▄   ▄  ▐▌    ▗▞▀▜▌▄▄▄▄     ▐▌    ▗▄▄▖ ▗▞▀▚▖ ▄▄▄ ▄   ▄
▐▌  █ █   █  ▐▌    ▝▚▄▟▌█   █    ▐▌    ▐▌ ▐▌▐▛▀▀▘█    █   █
▐▌  █  ▀▄▀▗▞▀▜▌         █   █ ▗▞▀▜▌    ▐▛▀▚▖▝▚▄▄▖█     ▀▀▀█
▐▙▄▄▀     ▝▚▄▟▌               ▝▚▄▟▌    ▐▙▄▞▘          ▄   █
                                                       ▀▀▀

License

MIT License

Copyright (c) 2021 Davide Stocco and Enrico Bertolazzi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

License by Frank E. Curtis

MIT License

Copyright (c) 2021 Frank E. Curtis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A C++ porting of Frank E. Curtis's penalty-interior-point algorithm for nonlinear constrained optimization

Topics

Resources

License

Stars

Watchers

Forks

Contributors