mpcc.jl

Data Structures for Optimization Models with Complementarity Constraints

https://github.com/tmigot/mpcc.jl

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

Data Structures for Optimization Models with Complementarity Constraints

Basic Info
  • Host: GitHub
  • Owner: tmigot
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Size: 582 KB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • Open Issues: 11
  • Releases: 0
Created over 6 years ago · Last pushed 10 months ago
Metadata Files
Readme License Code of conduct Citation

README.md

MPCC

Stable Documentation In development documentation Build Status Test workflow status Lint workflow Status Docs workflow Status

Coverage DOI Contributor Covenant All Contributors

Set of tools to model nonlinear continuous optimization model

math \min f(x) \text{ s.t. } l ≤ c(x) ≤ u,

extended with complementarity constraints:

math G(x) ≥ 0, H(x) ≥ 0, G(x) ∘ H(x) ≤ 0.

The resulting model is called an MPCC.

This package also handles vanishing constraints (MPVC)

math H(x) ≥ 0, G(x) ∘ H(x) ≤ 0,

kink constraints

math H(x) ≥ 0, G(x) ∘ H(x) = 0,

and switching constraints

math G(x) ∘ H(x) = 0.

Denote ∘ the componentwise product of two vectors.

This package extends the NLPModel API defined in NLPModels.jl. The role of NLPModels.jl is to define an API that users and solvers can rely on.

The package contains the basic tools to use the Stopping framework, and exports an MPCCStopping.

Example

The simplest way to define an MPCCModel uses automatic differentiation:

julia using MPCC f(x) = sum(x) # objective function x0 = ones(6) G(x) = [x[1]; x[3]] H(x) = [x[2]; x[4]] lccg, lcch = zeros(2), zeros(2) lvar, uvar = fill(-10.0, size(x0)), fill(10.0, size(x0)) admpcc = ADMPCCModel(G, H, lccg, lcch, f, x0, lvar, uvar)

The resulting is an instance of an AbstractMPCCModel with all capabilities of an AbstractNLPModel such as

julia x = rand(6) grad(admpcc, x) # returns the gradient of the objective function neval_grad(admpcc) # returns the number of evaluation of grad reset!(admpcc) # reset the internal counter

but also exports functions to deal with complementarity constraints

julia x = rand(6) (consG(admpcc, x), consH(admpcc, x))

but also jac_G_structure, jac_H_structure, jac_G_coord, jac_H_coord, jGprod, jHprod, jGtprod, jHtprod, hGprod, hHprod.

It also possible to convert the problem as a classical nonlinear optimization model treating the complementarity constraint as a nonlinear inequalities

math H(x) ≥ 0, G(x) ≥ 0, G(x) ∘ H(x) ≤ 0,

using NLMPCC as follows

julia nlp = NLMPCC(admpcc)

so that

julia cons(nlp, x)

returns a vector consisting of [c(x), G(x), H(x), G(x) ∘ H(x)].

How to Cite

If you use MPCC.jl in your work, please cite using the reference given in CITATION.cff.

Contributing

If you want to make contributions of any kind, please first that a look into our contributing guide directly on GitHub or the contributing page on the website.


Contributors

Tangi Migot
Tangi Migot

📆 🚧 📖 ⚠️ 💻

Owner

  • Login: tmigot
  • Kind: user
  • Location: Montréal

Citation (CITATION.cff)

# Go to https://citation-file-format.github.io/cff-initializer-javascript/#/ to finish this
cff-version: 1.2.0
title: MPCC.jl
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Tangi Migot
    email: tangi.migot@gmail.com

GitHub Events

Total
  • Watch event: 1
  • Delete event: 8
  • Push event: 13
  • Pull request review event: 7
  • Pull request event: 14
  • Fork event: 2
  • Create event: 8
Last Year
  • Watch event: 1
  • Delete event: 8
  • Push event: 13
  • Pull request review event: 7
  • Pull request event: 14
  • Fork event: 2
  • Create event: 8

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 10
  • Total pull requests: 45
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 1
  • Total pull request authors: 4
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.09
  • Merged pull requests: 38
  • Bot issues: 0
  • Bot pull requests: 30
Past Year
  • Issues: 4
  • Pull requests: 22
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 days
  • Issue authors: 1
  • Pull request authors: 4
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.18
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 18
Top Authors
Issue Authors
  • tmigot (10)
Pull Request Authors
  • github-actions[bot] (31)
  • tmigot (19)
  • dependabot[bot] (5)
  • allcontributors[bot] (2)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels
chore (15) dependencies (5) formatting (3) automated pr (3) no changelog (3) github_actions (1)

Dependencies

.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/Docs.yml actions
  • actions/checkout v4 composite
  • julia-actions/cache v2 composite
  • julia-actions/setup-julia v2 composite
.github/workflows/Lint.yml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • julia-actions/cache v2 composite
  • julia-actions/setup-julia v2 composite
  • lycheeverse/lychee-action v1 composite
.github/workflows/PreCommitUpdate.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • peter-evans/create-pull-request v7 composite
.github/workflows/ReusableTest.yml actions
  • actions/checkout v4 composite
  • codecov/codecov-action v4 composite
  • julia-actions/cache v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v2 composite
.github/workflows/Test.yml actions
.github/workflows/TestOnPRs.yml actions