Coder Social home page Coder Social logo

scipopt / scip.jl Goto Github PK

View Code? Open in Web Editor NEW
89.0 11.0 22.0 1.32 MB

Julia interface to SCIP solver

License: MIT License

Julia 100.00%
julia mixed-integer-programming mixed-integer-linear-programming mixed-integer-optimization global-optimization nonlinear-optimization hacktoberfest

scip.jl's People

Contributors

amontoison avatar ayush-iitkgp avatar chkwon avatar etadewal avatar femtocleaner[bot] avatar fserra avatar gnimuc avatar gregplowman avatar hannahtro avatar isoron avatar joaquimg avatar jovarga avatar juliatagbot avatar matbesancon avatar metab0t avatar mlubin avatar odow avatar rschwarz avatar tkoolen avatar yankaicao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scip.jl's Issues

Building SCIP on Windows

Hi,

I tried to build SCIP on Windows, which is unfortunately not possible.
Would it be possible to provide an updated version that supports it?

Anton

clean up old callbacks when setting new

At the moment, set*callback only adds to the callbacks that are registered (with CSIP). But the expected behaviour in MathProgBase is that at most on callback of each type exists, so we should remove existing callbacks first.

See also #19.

Can the installation be fully automated?

Can build.jl download and compile the SCIP source codes by itself without needing SCIPOPTDIR? Is there anything that prevent it? License issue, perhaps? I just doubt that normal Julia users will need SCIP codes and binaries outside Julia. If they need it, they will install it outside Julia, I guess. Just like Ipopt.

Quadratic constraint handler does not have LAPACK for eigenvalue computation.

I compiled with make SHARED=true ZLIB=false GMP=false READLINE=false LPSOPT=opt-gccold OPT=opt-gccold IPOPT=true scipoptlib

drawing attention to IPOPT=true, yet one I try to solve my model within JuMP I get

"Quadratic constraint handler does not have LAPACK for eigenvalue computation. Will assume that matrices (with size > 2x2) are indefinite."

I thought the way to resolve this was to compile with IPOPT=true, but that is what I have done and still get this error.

Initial point is incorrectly classified as infeasible

Summary: When I use SCIP.jl to pass a MINLP JuMP model to SCIP, the solve complains the initial point is infeasible. When I use AmplNLWriter to send the same model to SCIP, it correctly classifies the initial point as feasible.

Example:

using JuMP, SCIP, AmplNLWriter

# Switch between interfaces to SCIP
#m = Model(solver=SCIPSolver())
m = Model(solver=AmplNLSolver("/opt/scipoptsuite-4.0.0/scip-4.0.0/interfaces/ampl/bin/scipampl"))

@variable(m, 0 <= x[1:3] <= 10, start=5.0)
@variable(m, y, Bin, start=1.0)

@NLconstraint(m, x[1] + x[2] <= x[3]*y)
@constraint(m, x[1] - x[2] == 0)

@objective(m, Min, x[1])

# This makes the initial point feasible
setvalue(x[3], 10.0)

solve(m)

Using SCIP.jl:

  [nonlinear] <nonlin_obj>: (1 * <_var0_>)-1<_var4_>[C]  <= 0;
violation: right hand side is violated by 5 (scaled: 5)
all 1 solutions given by solution candidate storage are infeasible

feasible solution found by trivial heuristic after 0.0 seconds, objective value 0.000000e+00
presolving:
(round 1, fast)       0 del vars, 0 del conss, 0 add conss, 0 chg bounds, 0 chg sides, 0 chg coeffs, 3 upgd conss, 0 impls, 0 clqs
(round 2, fast)       2 del vars, 2 del conss, 0 add conss, 2 chg bounds, 0 chg sides, 0 chg coeffs, 3 upgd conss, 0 impls, 0 clqs
presolving (3 rounds: 3 fast, 0 medium, 0 exhaustive):
 3 deleted vars, 2 deleted constraints, 0 added constraints, 2 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
 0 implications, 0 cliques
transformed 1/1 original solutions to the transformed problem space
Quadratic constraint handler does not have LAPACK for eigenvalue computation. Will assume that matrices (with size > 2x2) are indefinite.
Presolving Time: 0.01

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.01
Solving Nodes      : 0
Primal Bound       : +0.00000000000000e+00 (1 solutions)
Dual Bound         : +0.00000000000000e+00
Gap                : 0.00 %
:Optimal

Using AmplNLWriter:

SCIP version 4.0.0 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: CPLEX 12.6.3.0] [GitHash: a80a247]
Copyright (C) 2002-2017 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)

External codes: 
  CPLEX 12.6.3.0       Linear Programming Solver developed by IBM (www.cplex.com)
  CppAD 20160000.1     Algorithmic Differentiation of C++ algorithms developed by B. Bell (www.coin-or.org/CppAD)
  Ipopt 3.12.4         Interior Point Optimizer developed by A. Waechter et.al. (www.coin-or.org/Ipopt)
  ASL                  AMPL Solver Library developed by D. Gay (www.netlib.com/ampl)


number of parameters = 2137
non-default parameter settings:


read problem </home/adowling2/.julia/v0.5/AmplNLWriter/.solverdata/tmpVJvBW1.nl>
============

original problem has 4 variables (1 bin, 0 int, 0 impl, 3 cont) and 2 constraints

1/1 feasible solution given by solution candidate storage, new primal bound 5.000000e+00

feasible solution found by trivial heuristic after 0.0 seconds, objective value 0.000000e+00
presolving:
presolving (1 rounds: 1 fast, 0 medium, 0 exhaustive):
 0 deleted vars, 0 deleted constraints, 0 added constraints, 0 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
 0 implications, 0 cliques
transformed 3/3 original solutions to the transformed problem space
Presolving Time: 0.00

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.01
Solving Nodes      : 0
Primal Bound       : +0.00000000000000e+00 (3 solutions)
Dual Bound         : +0.00000000000000e+00
Gap                : 0.00 %

optimal solution found

:Optimal

Perhaps this is a red herring, but notice the warning message about LAPACK eigenvalue computation with SCIP.jl. Including Ipopt is supposed to provide an interface to LAPACK. Using the AMPL executable for SCIP, we see that Ipopt is included as an external code and the warning message is absent.

Edit x2: Using @NLobjective instead of @objective results in the same behavior.

Adding variable

I'm running into the error

MathProgBase.addvar!(m::SCIPLinearQuadraticModel, l, u, objcoef) = error("Not implemented for SCIP.jl")

via a call to JuMP's @variable(model) to a model that has already been constructed. Is there any way I can get around this?

Here is the stack trace up to the JuMP call:

 [1] addvar!(::SCIP.SCIPLinearQuadraticModel, ::Float64, ::Float64, ::Float64) at /home/ubuntu/.julia/v0.6/SCIP/src/mpb_interface.jl:216
 [2] JuMP.Variable(::JuMP.Model, ::Float64, ::Float64, ::Symbol, ::String, ::Float64) at /home/ubuntu/.julia/v0.6/JuMP/src/JuMP.jl:399
 [3] #constructvariable!#113(::Array{Any,1}, ::Function, ::JuMP.Model, ::JuMP.#_error#120{Tuple{Symbol}}, ::Float64, ::Float64, ::Symbol, ::String, ::Float64) at /home/ubuntu/.julia/v0.6/JuMP/src/macros.jl:971
 [4] macro expansion at /home/ubuntu/.julia/v0.6/JuMP/src/macros.jl:319 [inlined]

I'm on JuMP 0.8.4.

Installation Path

The installation guide says to

Choose an installation path and set the environment variable SCIPOPTDIR to point there.

What installation path should I specify? Is this the same directory that I extracted the .tar.gz file to, or will any directory do (even if it doesn't exist on disk?)

Properly expose SCIP error codes to users.

This applies to the rewrite (after #76 is merged).

Currently, the simple @SC macro is used everywhere, where on would use SCIP_CALL in C.
It only does an @assert to check that the return code is SCIP_OKAY.

It would be better to throw a custom exception, also explaining what happened.

Not sure if we can actually show the full stacktrace (including the SCIP calls). I believe this requires compiling SCIP in debug mode?

cc @fserra

compiling SCIP and CSIP in macOS

julia> Pkg.add("SCIP")
INFO: Installing SCIP v0.2.0
INFO: Building SCIP
INFO: Attempting to Create directory /Users/chkwon/.julia/v0.5/SCIP/deps/downloads
INFO: Directory /Users/chkwon/.julia/v0.5/SCIP/deps/downloads already created
INFO: Downloading file https://github.com/SCIP-Interfaces/CSIP/archive/v0.3.6.zip
INFO: Done downloading file https://github.com/SCIP-Interfaces/CSIP/archive/v0.3.6.zip
INFO: Attempting to Create directory /Users/chkwon/.julia/v0.5/SCIP/deps/src
INFO: Directory /Users/chkwon/.julia/v0.5/SCIP/deps/src already created
INFO: Attempting to Create directory /Users/chkwon/.julia/v0.5/SCIP/deps
INFO: Directory /Users/chkwon/.julia/v0.5/SCIP/deps already created
INFO: Path /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6 already created
INFO: Changing Directory to /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6
make: Nothing to be done for `all'.
INFO: Changing Directory to /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6
INFO: Changing Directory to /Users/chkwon/.julia/v0.5/SCIP/deps/src/CSIP-0.3.6
===================================================================================================================================================[ ERROR: SCIP ]====================================================================================================================================================

LoadError: Provider BinDeps.BuildProcess failed to satisfy dependency libcsip
while loading /Users/chkwon/.julia/v0.5/SCIP/deps/build.jl, in expression starting on line 34

======================================================================================================================================================================================================================================================================================================================

===================================================================================================================================================[ BUILD ERRORS ]===================================================================================================================================================

WARNING: SCIP had build errors.

 - packages with build errors remain installed in /Users/chkwon/.julia/v0.5
 - build the package(s) and all dependencies with `Pkg.build("SCIP")`
 - build a single package by running its `deps/build.jl` script

======================================================================================================================================================================================================================================================================================================================
INFO: Package database updated
INFO: METADATA is out-of-date โ€” you may not have the latest version of SCIP
INFO: Use `Pkg.update()` to get the latest versions of your packages

Memory leaks

There seem to be major memory leaks somewhere between SCIP.jl, CSIP and SCIP.
See this gist for a script that realiably fills up all memory on my 4GB notebook and instantly freezes the system :-\

@fserra: do you want to debug this on saturday, and get lunch at Risa afterwards?

Binary variables with bounds

How does this interact with variable bounds? I.e., what if you have x == 1, Binary. Does this drop the tighter bounds? I'd also want an error/infeasibility report for 2 <= x <= 3, Binary.

Originally posted by @mlubin in https://github.com/_render_node/MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MTg4NTYwNjMz/pull_request_reviews/more_threads

I couldn't reply to the comment on #76 for some reason, so opening an issue. The current code in #76 seems to silently ignore user-provided bounds on binary variables.

handling more general expressions

SCIP allows for user defined expressions. One could in principle give the evaluations via callbacks (as I guess other solvers do), in case we cannot understand the expression provided to MPB.
This is probably future future work

NLconstraints fail with memory allocation issue

I'm trying to use SCIP.jl to solve a simple nonlinear optimization, but so far any nonlinear constraints cause the same memory allocation failure. For example:

using JuMP, SCIP

m = Model(solver=SCIPSolver())
@variable m -5 <= x <= 5
@NLconstraint m x <= 2
solve(m)

fails with:

[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/blockmemshell/memory.c:1052] ERROR: Insufficient memory for allocation of 18446744073701163096 bytes.
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/nlpi/expr.c:12244] ERROR: Insufficient memory for new chunk.
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/nlpi/expr.c:12244] ERROR: No memory in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/nlpi/expr.c:12766] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/nlpi/expr.c:15381] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/cons_nonlinear.c:8424] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/cons.c:1584] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/cons.c:6670] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/prob.c:1318] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/prob.c:571] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/scip.c:13987] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/scip.c:15978] ERROR: Error <-1> in function call
[/home/rdeits/apps/scipoptsuite-5.0.1/scip/src/scip/scip.c:16198] ERROR: Error <-1> in function call
CSIP: failing with retcode 2 at /home/rdeits/.julia/v0.6/SCIP/deps/src/CSIP-0.5.0/src/csip.c:997

I built the scipoptsuite from source following the instructions in the SCIP.jl readme, and I'm using the version of CSIP which is automatically downloaded by Pkg.build("SCIP").

I've also run the full test suite for scipoptsuite with ctest, and the only tests which fail are the ones which require the MA27 solver. I've likewise run the tests for CSIP with make test and again, all of those tests pass except the ones requiring MA27.

Can you help?

Support user-defined bounds for binary variables.

Right now, when a constraint is added that forces a variable into MOI.ZeroOne, we also change the bounds (in SCIP) to [0, 1], or else the solver will fail.

This is a problem in cases where previously defined bounds (e.g. [0, 2]) are overwritten and later the ZeroOne constraint is deleted, without resetting the bounds properly.

support heuristic callbacks

This should be easy to do, based on CSIP, but there are some challenges:

  1. Incomplete solutions (with NaN values) are not currently support by SCIP and therefore CSIP. This feature (solution completion by neighborhood search) might be included in the next SCIP release, but even then it might only work for solution candidates added before the branch-and-bound process.
  2. CSIP only supports adding one solution per callback call. It should be possible to refactor that code, though.
  3. The tests from JuMP for heuristic callbacks fail on my initial implementation because the callback is never called. This is because the heuristic timing is set to AFTERNODE (which makes sense, because we then have the LP relaxation values) but the problem used in the tests is already solved during the root. Therefore, the solving is stopped before the heuristic is asked.

fails with scip compiled with Ipopt

When you compile SCIP with Ipopt, the build fails because CSIP doesn't express its dependency on Ipopt correctly:

$ ldd -r libcsip.so 

linux-vdso.so.1 =>  (0x00007ffd287f3000)

libscipopt.so => /home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so (0x00007f30414f2000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f304112d000)

libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3040e29000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3040b23000)

libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f304090d000)

/lib64/ld-linux-x86-64.so.2 (0x00007f30420e7000)

undefined symbol: _ZTIN5Ipopt7JournalE  (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt7Journal4NameEv  (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt7Journal13SetPrintLevelENS_16EJournalCategoryENS_13EJournalLevelE(/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt7Journal17SetAllPrintLevelsENS_13EJournalLevelE  (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZNK5Ipopt7Journal10IsAcceptedENS_16EJournalCategoryENS_13EJournalLevelE  (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZTIN5Ipopt11TNLPAdapterE (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZTIN5Ipopt12OrigIpoptNLPE    (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt11TNLPAdapter7ResortXERKNS_6VectorEPd    (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt7JournalD2Ev (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt14IpLapackDgetrfEiPdPiiRi    (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt11TNLPAdapter7ResortGERKNS_6VectorES3_Pd (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt14IpLapackDgetrsEiiPKdiPiPdi (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt16IpoptApplicationC1Ebb  (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt13IpLapackDsyevEbiPdiS0_Ri   (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt7JournalC2ERKSsNS_13EJournalLevelE   (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

undefined symbol: _ZN5Ipopt11TNLPAdapter10ResortBndsERKNS_6VectorEPdS3_S4_  (/home/ubuntu/.julia/v0.5/SCIP/deps/src/CSIP-0.3.5/lib/libscipopt.so)

CC @chriscoey

Support MOI.delete for variables and constraints

It should not be so difficult for SCIP itself, but requires a rethinking of how we decide on variable and constraint indices, as well as additional mapping structures that might become necessary.

Support (partial) warm-start solution.

SCIP actually supports users submitting multipe (partial) solution candidates, but I guess it would be enough to allow for a single one, through MOI.

CSIP 0.3.6 is much faster than CSIP 0.4.0?

Hi,

I find a quite wield thing. If I change CSIP_VERSION from 0.4.0 to 0.3.6, SCIP is much faster.
To do that I also need to change line 1484 in csip.c
from SCIP_in_CSIP(SCIPtrySolFree(scip, &sol, FALSE, TRUE, TRUE, TRUE, &stored));
to SCIP_in_CSIP(SCIPtrySolFree(scip, &sol, FALSE, FALSE, TRUE, TRUE, TRUE, &stored));

However, after the change, csip.c in version 0.3.6 is almost the same as csip.c in 0.4.0. But the performance is very different. I guess the dependence of two versions are different.

Here is test code

using JuMP, SCIP
function test(iter)
for i = 1:iter
m= Model()
nvar = 1000
@variable(m, 0<=x[1:nvar]<=1)
@constraint(m, con[i in 1:(nvar-2)], x[i]+x[i+1]<=1)
@objective(m, :Min, sum{(x[i]+x[i+2])^2, i in 1:(nvar-2)})
m.solver=SCIPSolver("display/verblevel", 0)
solve(m)
end
end
test(10)

on my computer, version 0.3.6 takes 15seconds, while version 0.4.0 takes 80 seconds. This is not the old problem I tested, the difference in solution time can be even ten times for many problems I solved.

SCIP fails in Julia/Atom for Windows

Hi,

I have installed the academic licence of SCIP but I had no success to use it in Julia/Atom in Windows OS.

I tried with AmplNLWriter, but even so nothing... It seems the binary scipampl is not supported in Windows...

The SCIPOptSuite 5.0.1 is supported on Julia 0.6.2.1 ?

Thanks in advance.

Support MOI.FEASIBILITY_SENSE

Currently (after merging #76), setting MOI.FEASIBILITY_SENSE is a no-op.
We coud clear the objective coefficients of all variables, but then they could not be recovered when the objective sense is set to maximize or minimize.

To support this properly, we would have to store both the sense and the objective coefficients separately in the MOI wrapper (SCIP.Optimizer).

Issue with (nonconvex) quadratic constraints

Consider the following:

using JuMP
using SCIP
using LinearAlgebra
m = Model(with_optimizer(SCIP.Optimizer))
@variable m x[1 : 3]
@variable m y[1 : 3]
@variable m z[1 : 3]
w = x ร— y - x ร— z
@constraint m w .== 1
optimize!(m)

SCIP reports that the problem is solved, but value.(w) results in

3-element Array{Float64,1}:
 1.9999999962747097
 1.9999999925494194
 1.9999999962747097

i.e., twice what it should be.

implement getsolvetime

So I'm starting to run some experiments using SCIP, and I'm going to begin complaining about the missing methods that I need to get things working. First one is getsolvetime.

Expose callbacks for various SCIP plugin types.

Since SCIP support for plugins (callbacks) is more general that what is available in other MIP solvers, it makes sense to offer a thin layer around the SCIP style of them, for example:

  • constraint handlers (lazy constraints)
  • heuristics (based on LP solutions, but also from scratch type heuristics, or improving heuristics)
  • relaxations (instead of, or in addition to LP)
  • branching rules
  • node selection rules

If/when a callback interface is established for MOI, this layer could be used then.

SCIP-SDP support

It would be great to have support for SCIP-SDP available in SCIP.jl (and through the MathProgBase interface as well). Do you have an estimate how difficult this might be?

instructions in the readme

It's okay not having an automatic build, but we should at least have some instructions in the README to get people started.

Error building SCIP

INFO: Building SCIP
==============================================================[ ERROR: SCIP ]==============================================================
LoadError: None of the selected providers can install dependency libcsip.
Use BinDeps.debug(package_name) to see available providers

while loading C:\Users\shara.julia\v0.6\SCIP\deps\build.jl, in expression starting on line 52

===========================================================================================================================================
=============================================================[ BUILD ERRORS ]==============================================================
WARNING: SCIP had build errors.

  • packages with build errors remain installed in C:\Users\shara.julia\v0.6
  • build the package(s) and all dependencies with Pkg.build("SCIP")
  • build a single package by running its deps/build.jl script

===========================================================================================================================================

Support constraints with general nonlinear expression.

Since there have been no changes from MPB to MOI (?) this might be comparatively easy, since we could look at CSIP for inspiration.

But if that interface is subject to change in MOI, we might also wait and do it later.

Getting solutions when stage is not SOLVED

Currently, we have

https://github.com/SCIP-Interfaces/SCIP.jl/blob/7a5095fdbc10c4ccfd20d2a73f6df85015ce2ffc/src/MOI_wrapper/results.jl#L46

which is called in e.g.

https://github.com/SCIP-Interfaces/SCIP.jl/blob/7a5095fdbc10c4ccfd20d2a73f6df85015ce2ffc/src/MOI_wrapper/results.jl#L51-L54

However, SCIPgetBestSol allows SCIP to be in many more stages. Should the assert_solved check be changed to something less conservative? I'd change this straight away, but I'm not sure what requirements should be satisfied on the MathOptInterface side.

I ran into this when I tried to solve with a time limit; even though SCIP found a feasible point, the stage was still SOLVING, so I couldn't get the results.

Support callbacks with nonlinear models

In MathProgBase and JuMP there's a distinction between solvers for LinearQuadratic vs Nonlinear (expression-based) problems. According to the documentation, the callbacks are supported only for MIP solvers (i.e., LinearQuadratic).

For SCIP, this distinction is artificial. We initially implemented the wrapper with a focus on the LinearQuadratic interface, later adding support for the Nonlinear.

Unfortunately, when building a model using @NLconstraint, adding callback functions does not have an effect with SCIP.jl currently (see example).

@mlubin: Is this a restriction inherent in JuMP or MathProgBase? Can we work around this with little effort?

@fserra: I'm confused by the implementation of Nonlinear in SCIP.jl, in particular this code:

type SCIPMathProgModel <: AbstractLinearQuadraticModel
[...]
end

type SCIPNonlinearModel <: AbstractNonlinearModel
    m::SCIPMathProgModel
end

LinearQuadraticModel(s::SCIPSolver) = SCIPMathProgModel(s.options)
NonlinearModel(s::SCIPSolver) = SCIPMathProgModel(s.options)

The type SCIPNonlinearModel is never again used in the code. Might there be a related issue here?

Automate the wrapper generation, upgrade CEnum dep.

This applies only after #76 is merged.

We now use Clang.jl to generate Julia wrappers from the SCIP header files automatically.
There is a script for that purpose that should be rerun for every (major) release of SCIP that we want to support.

Unfortunately, the process was not completely automatic. The steps should be documented clearly, or integrated properly in the generator script.

In particular, the following steps followed the execution of the script:

  • rename Ptr{SCIP} to Ptr{SCIP_}, to avoid name conflict with module.
  • delete empty wrappers for type_*.h; the type definitions all went to commons.jl
  • add some missing (type/enum) definitions to manual_commons.jl (why did Clang.jl not add them?)

Also, we used the branch of Clang.jl from PR #210, which was now merged to master, but not yet tagged?

Adding SCIP package in simple words

Hi,
Could anybody describe me how I can add "SCIP" solver to the Julia in very simple words. I have just started working with Julia and README file description seems too complicated to me.
Thanks.

float64 parameters

Using SCIPSolver("limits/gap",1e-5) leads to

ERROR: LoadError: MethodError: `convert` has no method matching convert(::Type{Ptr{Void}}, ::Float64)
This may have arisen from a call to the constructor Ptr{Void}(...),
since type constructors fall back to convert methods.
Closest candidates are:
  call{T}(::Type{T}, ::Any)
  convert{T}(::Type{Ptr{T}}, !Matched::UInt64)
  convert{T}(::Type{Ptr{T}}, !Matched::Int64)
  ...
 in setparams! at /home/mlubin/.julia/v0.4/SCIP/src/params.jl:13

Is this the correct usage? Why do you need to convert a Float64 to a void*?

Remove CSIP dependency

Now that we have a working version and a better understanding of both Julia and the conceptual gap between SCIP and MathProgBase, we could build a more direct wrapper, skipping CSIP entirely.

We could also (in the same step) provide a Julia wrapper for the "raw" SCIP function(alitie)s, on which the MPB interface implementation is based. This would enable users to easily use the more advanced features directly, that is, without need for :ccall. It is unclear to what extent the public functions of SCIP should be made available, since the large number of these suggests a semi-automatic way of generating the wrappers.

CC: @fserra

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.