chkwon / Complementarity.jl

provides a modeling interface for mixed complementarity problems (MCP) and math programs with equilibrium problems (MPEC) via JuMP
Other
75 stars 20 forks source link

Maintenance #49

Closed davidanthoff closed 3 years ago

davidanthoff commented 3 years ago

Hi,

I saw the message that this package is no longer maintained, with a pointer towards newer versions of JuMP and PATHSolver as alternatives. But it seems to me that at the moment JuMP with PATHSolver does not support the non-linear problems of the kind that one can model with Complementarity, right? And at the same time I interpreted @odow's response over at https://github.com/chkwon/PATHSolver.jl/issues/47 as saying that it will take quite a while (realistically 1-2 years) for a generic JuMP/PATHSolver solution to emerge.

So I'm wondering whether it would make sense to continue maintaining Complementarity.jl, until there is actually a viable alternative available? After all, things do seem to work at the moment for non-linear problems, and we (and I believe others) have a lot of use-cases where we would like to utilize the existing functionality.

As far as I can tell the only compat work that one might have to do at the moment is to update Complementarity.jl to work with PATHSolver.jl v1, right?

chkwon commented 3 years ago

Yes I’ll keep this here. I doubt if I’ll add any new functionality here but will try to make it work with newer Julia versions.

davidanthoff commented 3 years ago

Excellent, much appreciated! Do you have a sense how complicated it would be to make things work with PATHSolver.jl v1.0?

odow commented 3 years ago

Probably just replacing https://github.com/chkwon/Complementarity.jl/blob/10b3ed1e3a9f7654e334a939ab5f0b98730f7113/src/mcp.jl#L152-L154

davidanthoff commented 3 years ago

The tests currently fail because they call PATHSolver.options, which apparently doesn't exist anymore?

odow commented 3 years ago

Probably just remove the options for now. You can pass options to PATH via kwargs... in PATHSolver.solve_mcp.

davidanthoff commented 3 years ago

I tried to upgrade things, but I'm running into too many other issues that need fixing where the call signatures seem to have changed, and I think at the moment I'm not familiar enough with the changes in PATHSolver or the design in Complementarity to really push this to the finishing line... So fingers crossed that someone else might tackle this :)

odow commented 3 years ago

I should probably do this seeing as how I went and broke everything.

In the mean time, if you install ] add PATHSolver@0.6.2 you should be able to use it with Complementarity.jl. (What sort of complementarity problems are you solving? You could also try https://github.com/jump-dev/KNITRO.jl)

davidanthoff commented 3 years ago

I should probably do this

That would be awesome :)

And yes, we don't have a problem in the short run as we can just use the previous version of PATHSolver. But would feel better if things keep being maintained to a level where one can use the latest versions of packages.

chkwon commented 3 years ago

@odow If you didn't start the work yet, I think I can do it.

odow commented 3 years ago

Go for it

chkwon commented 3 years ago

@odow A few questions:

  1. Can I check if some expression in JuMP.Model is linear or not? I'd like something like _F_linear_operator
  2. Can the new PATHSolver accept the variable/constraint names? This is to display those names in the output of PATH.
jonmbecker commented 3 years ago

What sort of complementarity problems are you solving?

Example complementarity problems (MCP - computable general equilibrium):

Simple examples: https://github.com/NREL/SLiDE/tree/master/model

Larger examples (access may be restricted, but updates to master coming soon): https://github.com/NREL/SLiDE/tree/dev/model

Jovansam commented 3 years ago

I will add my voice here to say thanks @chkwon and @odow, for the work with Complementarity.jl and PATHSolver.jl. And also thanks to @davidanthoff for bringing this up---I actually brought it up here a while back. Its really nice to see you guys actively care about these features and volunteer your time to help the rest of us. I am certain there are many people like me. Not programmers by training but users of packages who are quickly learning our way around and will soon be able to help with maintaining and developing these packages.

chkwon commented 3 years ago

@Jovansam Thanks you for using it :) If you see any issues, please let us know. I like @odow's new PATHSolver.jl a lot. My version was very dirty and quite difficult to manage.

chkwon commented 3 years ago

Closed by #50

chkwon commented 3 years ago

@Jovansam A new version is tagged. Now Complementarity.jl uses the most recent version of PATHSolver.jl. If you find any issue, please let us know.

davidanthoff commented 3 years ago

Fantastic, thanks so much for this super fast turnaround time!!