Skip to content

Instantly share code, notes, and snippets.

View rschwarz's full-sized avatar

Robert Schwarz rschwarz

View GitHub Profile
@rschwarz
rschwarz / output.log
Last active February 17, 2021 15:56
python-mip SEGFAULT when adding lazy constraint generator to simple model in CBC
Welcome to the CBC MILP Solver
Version: devel
Build Date: Nov 15 2020
Starting solution of the Linear programming relaxation problem using Primal Simplex
Clp0000I Optimal - objective value 20
Clp0032I Optimal objective 20 - 0 iterations time 0.002, Idiot 0.00
Starting MIP optimization
@rschwarz
rschwarz / cbc.master.log
Last active June 1, 2022 08:25
Cbc error with SOS2 and (partial) MIP Start
Welcome to the CBC MILP Solver
Version: devel
Build Date: Nov 10 2020
command line - /home/rs/src/coinbrew/dist/bin/cbc invalid_index.lp mips invalid_index.mst solve (default strategy 1)
### CoinLpIO::readLp(): Variable u_0 does not appear in objective function or constraints
### CoinLpIO::readLp(): Variable u_1 does not appear in objective function or constraints
### CoinLpIO::readLp(): Variable u_2 does not appear in objective function or constraints
### CoinLpIO::readLp(): Variable u_3 does not appear in objective function or constraints
### CoinLpIO::readLp(): Variable u_4 does not appear in objective function or constraints
@rschwarz
rschwarz / Project.toml
Created May 16, 2020 06:05
StackOverflowError with Test.detect_ambiguities
[deps]
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
@rschwarz
rschwarz / run.jl
Created March 10, 2020 09:30
JuMP / SCIP benchmark
using JuMP
using SCIP
function run1(N)
m = Model(SCIP.Optimizer)
JuMP.set_optimizer_attribute(m, "display/verblevel", 0)
@variable(m, x[1:N])
@objective(m, Min, sum(x))
@constraint(m, x .>= 1)
JuMP.optimize!(m)
@rschwarz
rschwarz / error.log
Created September 25, 2019 12:04
Testing SCIP.jl with JuMP.jl in direct mode.
julia> test()
ERROR: In `@constraint(model, ind, ind_fun in ind_set)`: unable to add the constraint because we don't recognize MathOptInterface.VectorAffineFunction{Float64}(MathOptInterface.VectorAffineTerm{Float64}[VectorAffineTerm{Float64}(1, ScalarAffineTerm{Float64}(1.0, VariableIndex(3))), VectorAffineTerm{Float64}(2, ScalarAffineTerm{Float64}(0.2, VariableIndex(1))), VectorAffineTerm{Float64}(2, ScalarAffineTerm{Float64}(1.0, VariableIndex(2)))], [0.0, 0.0]) as a valid JuMP function.
Stacktrace:
[1] error(::String, ::String) at ./error.jl:42
[2] _macro_error(::Symbol, ::Array{Any,1}, ::String) at /home/rs/.julia/packages/JuMP/iGamg/src/macros.jl:1091
[3] (::getfield(JuMP, Symbol("#_error#55")){Symbol})(::String) at /home/rs/.julia/packages/JuMP/iGamg/src/macros.jl:565
[4] build_constraint(::getfield(JuMP, Symbol("#_error#55")){Symbol}, ::MathOptInterface.VectorAffineFunction{Float64}, ::MathOptInterface.IndicatorSet{ACTIVATE_ON_ONE::ActivationCondition = 1,MathOptInterface.LessThan{Float64}}) at /h
@rschwarz
rschwarz / repl.log
Created March 15, 2019 13:03
Julia Pkg, using branch of package
# rs@t440p:~/.julia/dev/SCIP/test/MINLPTests [git:master o] [14:01:23]
$ julia --project=.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.1.0 (2019-01-21)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
@rschwarz
rschwarz / steps.log
Created March 3, 2019 07:23
Failure when building docs for MathOptInterface.jl locally (Julia 1.1)
# rs@t440p:~/.julia/dev/MathOptInterface/docs [git:master o] [8:21:53]
$ git pull
Already up-to-date.
# rs@t440p:~/.julia/dev/MathOptInterface/docs [git:master o] [8:21:59]
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
@rschwarz
rschwarz / exprcreate.c
Created March 2, 2019 22:08
C wrapper for SCIPexprCreate without variadic arguments of mixed type.
#include "scip/scip.h"
/*
* To create nonlinear constraints in SCIP, one creates an expression tree whose
* nodes are of type SCIP_EXPR*. To create these nodes, there is a variadic
* function, SCIPexprCreate:
*
* SCIP_RETCODE SCIPexprCreate(BMS_BLKMEM* blkmem, SCIP_EXPR** expr,
* SCIP_EXPROP op, ...);
*
@rschwarz
rschwarz / example_session.log
Created February 25, 2019 20:21
MWE for non-deterministic behavior of Julia with ccall, compared to equivalent(?) C code
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.1.0 (2019-01-21)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
@rschwarz
rschwarz / test_repr.c
Created February 24, 2019 18:14
Try to reproduce non-deterministic behavior with pure C code calling SCIP.
#include "scip/scip.h"
#include "scip/scipdefplugins.h"
int main() {
SCIP* scip = NULL;
SCIP_CALL( SCIPcreate(&scip) );
SCIP_CALL( SCIPincludeDefaultPlugins(scip) );
SCIP_CALL( SCIPcreateProbBasic(scip, "lp") );