iainnz / jumper.jl Goto Github PK
View Code? Open in Web Editor NEWJulia for Mathematical Programming - extension for Robust Optimization
Home Page: http://iainnz.github.io/JuMPeR.jl
License: Other
Julia for Mathematical Programming - extension for Robust Optimization
Home Page: http://iainnz.github.io/JuMPeR.jl
License: Other
It'd be nice to be able to pass kwargs to the underlying master problem, e.g.
load_model_only=true
I'd use these when reformulating things just to do timings, or to dump .mps files, or whatever.
Obviously, low-priority....
since build_certain_constr only wants vectors, this code fails:
@defVar(m, us[1:10])
#solve a problem ...
ustar = getValue(us)
build_certain_constr(con, ustar)
Easy workaround is of course replacing ustar by ustar[:], but can we long-term extend the definition please?
VG
The rhs of this constraint must be a float64 to pass? Is this by design?
@defUnc(m, u[1:5] >= 0)
addConstraint(m, u[1] <= 1) #fails
addConstraint(m, u[1] <= 1.) #passes
The name of the uncertainty seems to be lost in printing robust models. This code:
m = RobustModel()
@defUnc(m, u[1:5] >= 0)
for ix = 1:5
addConstraint(m, u[ix] <= float(ix))
end
addConstraint(m, sum(u[:]) <= 5.)
@defVar(m, t)
addConstraint(m, t >= sum(u[:]))
@setObjective(m, Min, t)
printRobust(m)
yields this output:
Min t
Subject to
t free
Uncertain constraints:
-t <= 0
Uncertainty set:
<= 1
<= 2
<= 3
<= 4
<= 5
+ + + + <= 5
0.0 <= <= Inf
0.0 <= <= Inf
0.0 <= <= Inf
0.0 <= <= Inf
0.0 <= <= Inf
The following code throws ERROR: assertion failed: Num Uncertainties doesn't match columns in data
:
using JuMP, JuMPeR, Gurobi, DDUS
m = RobustModel()
x1 = rand(10,3)
x2 = rand(10,3)
oracle = cell(2)
oracle[1] = UCSOracle(x1, 0.1, 0.1)
oracle[2] = UCSOracle(x2, 0.1, 0.1)
@defVar(m, w[1:3])
@defUnc(m, u[1:2, 1:3]) # <- This seems to be the troublesome line
for i in 1:2
expr = AffExpr()
for j in 1:3
expr += u[i,j] * w[j]
end
addConstraint(m, expr <= 0, oracle[i])
end
solve(m, prefer_cuts = true)
From my limited exploration, the bug seems to be coming from JuMPeR telling DDUS that the constraint has 6 uncertain parameters (the total length of u
), instead of three (the number actually referenced in that constraint). The problem seems to go away if I define a different variable (ie u1
, u2
) for each row of u.
Is this intended behavior? This might also be an issue for @vgupta1.
In the documentation, prefer_cuts can be set to "true". But in the code, it seems to be set to "cuts".
I see in in src/uncsets_basic.jl
that JuMPeR currently supports affine inequalities and norm(x) <= const
where x
is uncertain.
I am looking to use JuMPeR to handle uncertain sets with norm(x) <= y
constraints, where x
and y
are both uncertain.
Is this something that is doable in the current structure of the code?
What parts of the code would likely need modification?
Here is a MWE where switching between cuts and reformulation shows a discrepancy. The reformulaton value is correct.
using JuMPeR
rm = RobustModel()
#Uncertainty Set
@defUnc(rm, u >=0)
addConstraint(rm, u <=0)
#Decision variables
@defVar(rm, x >=0)
@defVar(rm, shed >=0)
@setObjective(rm, Min, x + shed)
#1 Uncertain constraint
addConstraint(rm, x - u + 3.46 <= shed)
solveRobust(rm, report=true,
prefer_cuts= (ARGS[1]=="true"), debug_printcut=true)
println("\n Objective \t", getObjectiveValue(rm))
Studying the debug logs from cut generation, it appears the first time through we've lost a minus sign or something:
BEGIN DEBUG :debug_printcut
Constraint: x - shed + -u <= -3.46
Solved Optimal
Cut sol:
u 0.0
OrigLHS val: 3.46
Sense: <=
con.lb/ub: -Inf -3.46
new constr: x - shed <= -6.92
END DEBUG :debug_printcut
To my understanding, the new constraint should be x - shed <= -3.46.
My guess is that this happens because you first move the constant term over to the lhs, and then don't account for it when you need to add it back to the RHS. I'm searching the code now to validate this hypothesis.
There seems to be conflict between master branch of JuMPeR and ScikitLearn. When adding
using ScikitLearn
to an example (such as inventory
or portfolio
examples), I get the following error during the solve(model)
:
ERROR: LoadError: JuMPeR.BasicUncertaintySet has not implemented setup_set!
in error at /Applications/Julia-0.4.3.app/Contents/Resources/julia/lib/julia/sys.dylib
in _solve_robust at /Users/brad-sturt/.julia/v0.4/JuMPeR/src/solve.jl:65
in solve at /Users/brad-sturt/.julia/v0.4/JuMP/src/solvers.jl:114
in include at /Applications/Julia-0.4.3.app/Contents/Resources/julia/lib/julia/sys.dylib
in include_from_node1 at /Applications/Julia-0.4.3.app/Contents/Resources/julia/lib/julia/sys.dylib
in process_options at /Applications/Julia-0.4.3.app/Contents/Resources/julia/lib/julia/sys.dylib
in _start at /Applications/Julia-0.4.3.app/Contents/Resources/julia/lib/julia/sys.dylib
while loading /Users/brad-sturt/Code/Experiments/Jumper/inventory.jl, in expression starting on line 68
The examples work correctly when using ScikitLearn
is removed. My package versions:
Is this a known bug / is there a workaround? Sorry in advance if I am missing an obvious solution. Thanks alot!
Windows, Julia v0.2.1
julia ellipse.jl
Test1 false
Test2 false
Test3 false
Test4 false
Test5 false
Test1 true
ERROR: no method GenericAffExpr{Float64,Variable}(Array{Any,1},Array{Any,1},Floa
t64)
in setup at JuMPeR\src\oracle_gen.jl:105
WARNING: backtraces on your platform are often misleading or partially incorrect
at JuMPeR\test\ellipse.jl:129
Right now
m = RobustModel()
### do stuff
int_m = getInternalModel(m)
fails, because getInternalModel isn't exported from JuMPeR.jl around line 27... There seem to be some other model functions that are also not exported yet, presumably because they were added to JuMP recently.
More generally, it seems like a painful design choice to have to update the exports everytime new functionality is added to the Model class in JuMP...
but should probably return something akin to the MathProgBase status codes.... maybe just the code from the underlying master model?
I've tried to use JuMPeR to fiddle with some robust models in a quick way, and I really like it.
It's obvious that the reformulation, in some cases, can be written in a more compact way that what JuMPeR General Oracle does, e.g., when an uncertain term is exactly the same in two constraints (if deviations are symmetric, even with opposite directions), etc.
Not sure if you're working on similar ideas (I guess it's not a pressing matter), but it'd be nice if Jumper could maybe identify some of these (more or less) trivial cases and write a more compact reformulation.
[This kind of preprocessing might be esp. useful for a non-expert (or lazy!) user that doesn't know (or doesn't want to think) too much about the reformulation, and just wants its robust model.]
I actually thought solvers would easily get rid of all the unnecessary junk (extra variables, etc) in presolve; it turns out that it's not always the case.
Example: I have a very simple MIP model where some constraints have a number of uncertain parameters, and none of them is related to a variable. The uncertain term can be easily precomputed, instead of dualizing it etc. This makes a significant difference: a simple instance is solved in 1-2 seconds (both Gurobi and Cplex) if I use Jump (with full reformulation), and only 0.1s if I precompute the deviations. (I actually added a couple of line of code to oracle-gen.jl to carry out this simple precomputation when "applying the reformulation", I can open a PR if interested.)
Now, this might be a silly example [but I've read worse things in some papers :)], and you wouldn't really want to "dualize" in that case, but I hope you see my point.
Now we're using macros everywhere, there isn't an easy way to pass constraints.
Options
@addConstraint
- could probably be done in a minor version bump.Needs:
BenTalNemOracle(Gamma)
norm
In the event the master is unbounded, we'll have a ray and a feasible solution (I think thats what we get, or can get - need to look into this)
So the cutting plane problem is now
u^T x <= b
y
and ray r
u
and s
such that u^T (y + s*r) > b
u
such that u^T r
> 0 because then you just scale s
So thats, mathematically, how you do it. But working this into the oracle interface is a bit more painful. A fallback would be just setting s
to a biggish-M - better than the box at least.
So... may be my installation, but in my new installation (Julia 0.3, brand new packages), i get a warning when i call using JuMPeR
Warning: could not import JuMP.@buildExpr into JuMPeR
Thoughts? Is it replicable?
In your README you link to https://github.com/IainNZ/JuMPeR.jl/blob/master/examples
but this does not exist since your folder is named example
without s
.
I seem to get errors simply trying to resolve some of the RobustModel testing examples. Literally just calling solve twice?
For example - at least the first 2 tests (Reformulation/Cutting) in ellipse.jl
- at least the first 2 tests (Only cutting) in polyhedral.jl
julia> include("ellipse.jl") ###With solve line copied twice.
WARNING: @test_throws without an exception type is deprecated
Use @test_throws ErrorException build_ellipse_constraint(vec,0.0)
in anonymous at no file:35
Test1 false
ERROR: Inconsistent argument dimensions.
in _chklen at C:\Users\dfagnan.julia\Gurobi\src\grb_common.jl:30
in loadproblem! at C:\Users\dfagnan.julia\Gurobi\src\GurobiSolverInterface.jl:
34
while loading C:\Users\dfagnan\Dropbox\MIT\Research A.Lo\Robust Pension\ellipse.
jl, in expression starting on line 124
Given how common non-pro solutions seem to be, it would be nice to have some general way to do this if its flagged, e.g.:
Some complications are how to do this if we take a different unc. set for each constraint or how oracles should be expected to support this solution. Thoughts? I'd advocate asking Dimitris to make this a coding-based final project for one of his more capable students in the robust class :).
The documentation at doc/index.md
references addEllipseConstraint
, which was removed in 44d63af in favor of norm2
. As a new user, this tripped me up - should probably be updated ๐
So, what if JuMPeR supported setting "initial values" on uncertainties. These could be added, e.g., as certain constraints to "seed" the cut generation process. I'm thinking the interface could leverage the same "setValue" interface that warmstarts use in JuMP. E.g.
@defUncs(rm, u[1:2])
setValue(u[1], 0.0) #A nominal value for u
setValue(u[2], 1.0)
In the case where the user has multiple reasonable initial points maybe she could pass them as arrays (assuming that the ordering of the array corresponds to the same uncertainty across coordinates).
One advantage of this is it offers a way out of the need for adding the bounding box when starting cut generation; in reasonable problems, adding nominal values to uncertainties should make them well-behaved.
Thoughts?
I am not sure this is a bug, but I was surprised to get a LoadError: Integer uncertain parameters not supported in reformulation
when I run the following code:
using JuMP, Gurobi, JuMPeR
model= RobustModel()
@variable(model, obj >= 0)
@uncertain(model, x[1:2], Bin)
@constraint(model, x[1] + x[2] == 1)
@constraint(model, obj <= 2*x[1] + x[2])
@objective(model, Max, obj)
solve(model,prefer_cuts=false)
I expected that JuMPeR would not be trying reformulation, and instead just cut on the different combinations of x[1]
and x[2]
.
Is this a bug? Or, does my example fall into some broader class of problems that are not always solvable via adding cuts (and hence JuMPeR isn't attempting to solve it)?
I have looked at the docs, and saw
# You can even define binary uncertain parameters - although you might not
# be able to solve the resulting problem with all possible some methods!
# Also, note the use of an arbitrary index set.
highways = [:I90, :I93, :I95]
@uncertain(rm, blocked[highways], Bin)
Is this comment elaborated on anywhere in the code?
Should setting prefer_cuts
to true
solve this problem? If so, is there a reason JuMPeR doesn't simply try cuts by default?
Thanks!
Sorry about the twitter reply. Github doesn't work on my ancient cellphone.
Thought it best to open an issue here so it could be tracked ... and possibly linked to JuliaBox and/or Ipopt, etc.
juser@juliabox:~$ julia -e 'Pkg.test("JuMPeR")'
Warning: using Base.Graphics in module Main conflicts with an existing identifier.
INFO: Computing test dependencies for JuMPeR...
INFO: No packages to install, update or remove
INFO: Testing JuMPeR
Loading solvers...
Running tests...
[operators] Robust operator tests: .......................................................................................................................
..............
[operators] Higher level operations: ............
[operators] Check ellipse construction: .............
[print] RobustModel: .
[print] JuMPContainer{Uncertain}: ..................
[print] EllipseConstraint: ....
[macro] Uncertainty set constraints: ......
[macro] Uncertain constraints: .......
[oracle] Check interface throws: ....
[oracle] Test oracle utilities: ........................
[oracle_gen_poly] Test 1: ......WARNING: Solver does not appear to support hot-starts. Problem will be solved from scratch.
......
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************
WARNING: Solver does not appear to support adding constraints to an existing model. Hot-start is disabled.
............
[oracle_gen_poly] Test 2: ........................
[oracle_gen_poly] Test 2-IP: ..F...
Failure :: (line:-1) :: got 1.0
getValue(x[2]) => roughly(0.0,1.0e-6)
[oracle_gen_poly] Test 3: ........................
[oracle_gen_poly] Test 3-IP: ......
[oracle_gen_poly] Test 4: ................
[oracle_gen_poly] Test 5: ................
[oracle_gen_poly] Test 6: ................................................................................................................................
[oracle_gen_poly] Test 7 (integer uncertainty set): WARNING: Dual solutions not available
WARNING: Dual solutions not available
..
[oracle_gen_poly] Test 8: ........
signal (6): Aborted
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_Unwind_Resume at /lib/x86_64-linux-gnu/libgcc_s.so.1 (unknown line)
_ZN5Ipopt11TNLPAdapter9GetSpacesERNS_8SmartPtrIKNS_11VectorSpaceEEES5_S5_S5_RNS1_IKNS_11MatrixSpaceEEES5_S9_S5_S9_S5_S9_S9_S9_RNS1_IKNS_14SymMatrixSpaceEE
E at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt12OrigIpoptNLP20InitializeStructuresERNS_8SmartPtrINS_6VectorEEEbS4_bS4_bS4_bS4_bS4_S4_ at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt9IpoptData24InitializeDataStructuresERNS_8IpoptNLPEbbbbb at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt25DefaultIterateInitializer18SetInitialIteratesEv at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt14IpoptAlgorithm18InitializeIteratesEv at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt14IpoptAlgorithm8OptimizeEb at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt16IpoptApplication13call_optimizeEv at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt16IpoptApplication11OptimizeNLPERKNS_8SmartPtrINS_3NLPEEERNS1_INS_16AlgorithmBuilderEEE at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt16IpoptApplication11OptimizeNLPERKNS_8SmartPtrINS_3NLPEEE at /usr/local/lib/libipopt.so (unknown line)
_ZN5Ipopt16IpoptApplication12OptimizeTNLPERKNS_8SmartPtrINS_4TNLPEEE at /usr/local/lib/libipopt.so (unknown line)
IpoptSolve at /usr/local/lib/libipopt.so (unknown line)
solveProblem at /home/juser/.julia/v0.3/Ipopt/src/Ipopt.jl:289
jlcall_solveProblem_21932 at (unknown line)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
optimize! at /home/juser/.julia/v0.3/Ipopt/src/IpoptSolverInterface.jl:364
jlcall_optimize!_21916 at (unknown line)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
solveLP at /home/juser/.julia/v0.3/JuMP/src/solvers.jl:232
jlcall___solveLP#34___21561 at (unknown line)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
julia_solveLP_21560 at (unknown line)
solve at /home/juser/.julia/v0.3/JuMP/src/solvers.jl:29
jlcall___solve#33___21491 at (unknown line)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
julia_solve_21633 at (unknown line)
generateCut at /home/juser/.julia/v0.3/JuMPeR/src/oracle_gen.jl:248
generateCut at /home/juser/.julia/v0.3/JuMPeR/src/oracle_gen.jl:236
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
_solve_robust at /home/juser/.julia/v0.3/JuMPeR/src/solve.jl:181
jlcall____solve_robust#54___22054 at (unknown line)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
julia__solve_robust_21667 at (unknown line)
solve at /home/juser/.julia/v0.3/JuMP/src/solvers.jl:3
jlcall___solve#33___21491 at (unknown line)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
julia_solve_21633 at (unknown line)
anonymous at /home/juser/.julia/v0.3/FactCheck/src/FactCheck.jl:142
do_fact at /home/juser/.julia/v0.3/FactCheck/src/FactCheck.jl:172
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
anonymous at /home/juser/.julia/v0.3/JuMPeR/test/oracle_general.jl:142
context at /home/juser/.julia/v0.3/FactCheck/src/FactCheck.jl:312
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
anonymous at /home/juser/.julia/v0.3/JuMPeR/test/oracle_general.jl:169
facts at /home/juser/.julia/v0.3/FactCheck/src/FactCheck.jl:286
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
unknown function (ip: 706374840)
unknown function (ip: 706371008)
unknown function (ip: 706438458)
unknown function (ip: 706441165)
jl_load at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
include at ./boot.jl:245
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
include_from_node1 at ./loading.jl:128
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
anonymous at no file:20
unknown function (ip: 706438668)
unknown function (ip: 706441165)
jl_load at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
include at ./boot.jl:245
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
include_from_node1 at loading.jl:128
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
process_options at ./client.jl:285
_start at ./client.jl:354
jlcall__start_17289 at /usr/bin/../lib/x86_64-linux-gnu/julia/sys.so (unknown line)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
unknown function (ip: 4200623)
julia_trampoline at /usr/bin/../lib/x86_64-linux-gnu/julia/libjulia.so (unknown line)
unknown function (ip: 4199613)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 4199667)
unknown function (ip: 0)
====================================================================[ ERROR: JuMPeR ]=====================================================================
failed process: Process(`/usr/bin/julia /home/juser/.julia/v0.3/JuMPeR/test/runtests.jl`, ProcessSignaled(6)) [0]
==========================================================================================================================================================
INFO: No packages to install, update or remove
ERROR: JuMPeR had test errors
in error at error.jl:21
in test at pkg/entry.jl:718
in anonymous at pkg/dir.jl:28
in cd at ./file.jl:20
in cd at pkg/dir.jl:28
in test at pkg.jl:67
in process_options at ./client.jl:213
in _start at ./client.jl:354
juser@juliabox:~$
Neglecting constant terms and standalone uncertainties, a general linear uncertain constraint can be written this way:
\sum_{i=1}^d a_i( u ) x_i \leq b
for some affine functions a_i, or equivalently, by rearranging terms as
\sum_{i=1}^d l_i( x )^T u \leq b
for some different affine functions l_i. As far as I understand, the first representation is (roughly) how they're stored in FullAffExpr. The "roughly" part comes because you don't necessarily need to group together all the terms depending on x_i.
In the course of the polyhedral oracle (and the bertsimas sim oracle), there's some general boiler plate code that I think MOST oracles need to do, and could be factored out, namely
I suggest we factor out these functions into standalone helpers ( I can help! ) and then add one additional function which, given any uncertain constraint, converts it into a constraint in standard form (e.g. a less than or equal with all terms on lhs and all constants on rhs). In that way, we can write a templatized boilerplate (maybe even using parametric types?) user-defined oracles where all the user would need to implement is the solution to:
max_{u in U} u^T x^*
I can spell out more of what I'm thinking in person, but I'd like to get a conversation going on this... I really think it would limit how much users need to know about JuMPeR internals and simplify some of the steps in oracle creation.
After solving a model with affine-adaptive variables, how do we extract the coefficients of that affine policy? getvalue doesn't seem to work on adaptive variables.
Target release for Wednesday, recitation is Friday.
printRobust
/solveRobust
Current design checks if the number of reformulated constraints is less than the number of uncertain constraints, and if so, sets a lazycallback.
See line: 178 of solve.jl
I can imagine situations where this might be limiting... For example, I give you a complicated (non-polyhedral set). You add a reformulation for a polyhedral inner-approximation which should get you most of the way there, but as your'e solving you want to add additional cuts for the points that you missed.
Is there a reason it's designed this way? Is there an obvious workaround I'm missing?
Are you planning an update of JuMPeR compatible with JuMP 0.14?
Copying and pasting this example and trying to run it yields the following error:
ERROR: type GenericAffExpr has no field uncs
in generateReform at /Users/VGupta/Documents/Research/UnitCommittment/UnitCommitment/solvers/bugs.jl:87
in solveRobust at /Users/VGupta/.julia/v0.2/JuMPeR/src/solve.jl:163
in solve_portfolio at /Users/VGupta/Documents/Research/UnitCommittment/UnitCommitment/solvers/bugs.jl:165
in include at boot.jl:238
in include_from_node1 at loading.jl:114
in process_options at client.jl:303
in _start at client.jl:389
at /Users/VGupta/Documents/Research/UnitCommittment/UnitCommitment/solvers/bugs.jl:173
Mainly with cutting planes
$ julia test/runtests.jl [21:14:32]
Warning: could not import JuMP.string_intclamp into JuMPeR
Selected Gurobi as solver
Running tests...
Test: operators.jl
ERROR: test error in expression: affToStr(uaff) == "2.3 a + 5.5"
string_intclamp not defined
in affToStr at /Users/huchette/.julia/v0.4/JuMPeR/src/print.jl:75
in affToStr at /Users/huchette/.julia/v0.4/JuMPeR/src/print.jl:71
in anonymous at test.jl:83
in do_test at test.jl:47
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in anonymous at no file:23
in include at ./boot.jl:245
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:285
in _start at ./client.jl:354
in _start at /usr/local/julia/usr/lib/julia/sys.dylib
while loading /Users/huchette/.julia/v0.4/JuMPeR/test/operators.jl, in expression starting on line 20
while loading /Users/huchette/.julia/v0.4/JuMPeR/test/runtests.jl, in expression starting on line 21
So, more JumpDict woes....
This fails on uncertains, but passes on variables...
@defVar(rm, xs[1:5])
sum(xs) #passes on JuMP Master
@defUnc(rm, us[1:5])
sum(us) #fails
Just wanted to let you know so you could flag it for now.....
Polyhedral oracle generateCut
is looking very lean https://github.com/IainNZ/JuMPeR.jl/blob/master/src/oracle_poly.jl#L152-L189
by adding in quadratic support to it
So i can't yet confirm if this is a real bug, or a problem in my own code, but in I keep getting an ERROR: BoundsError() thrown from
in generateCut at /Users/VGupta/.julia/v0.2/JuMPeR/src/oracle_poly.jl:261
I'm not sure what it could be. Reformulation works correctly. Any ideas?
VG
so there is a design issue
currently oracles are responsible for adding cuts to the master
this gives them plenty of flexibility
in what they do
but
does make the oracles more complicated
the alternative is that they just return the values of the uncertainties
and then i splice them in
in the "main" loop
but this would limit it to constraints you can represent using JuMP as a single line
you couldn't do clever things
where you basically attach an oracle
with no particular constraints involved
In favour of oracles doing whatever they want:
Against oracles doing whatever they want
After solving a robust problem with solveRobust(m, active_cuts=true)
how do you extract the cuts? It would seem you want to call getRobust
and then manipulate the robust data object, but getRobust
isn't exported currently?
Am I missing something?
I know this is undocumented functionality, so maybe just ignore me:
But right now, this functionality relies on the idea that there is an internal cut-model being used to generate cuts. (See e.g. oraclegen.jl around line 278)
Many cases I have closed-form ways of finding cuts. Then the printing function chokes.
Error output below:
ERROR: type OptDirichlet has no field cut_model
in debug_printcut at /Users/vishalgupta/.julia/v0.3/JuMPeR/src/oracle_gen.jl:278
in generateCut at /Users/vishalgupta/Documents/Research/BayesDRO/AmbiguitySets/Experiments/../oracles.jl:49
in generateCut at /Users/vishalgupta/Documents/Research/BayesDRO/AmbiguitySets/Experiments/../oracles.jl:25
in solveRobust at /Users/vishalgupta/.julia/v0.3/JuMPeR/src/solve.jl:178
in robustNews at /Users/vishalgupta/Documents/Research/BayesDRO/AmbiguitySets/Experiments/singleNewsVendor.jl:80
in include at /Applications/Julia-0.3.0.app/Contents/Resources/julia/lib/julia/sys.dylib
in include_from_node1 at /Applications/Julia-0.3.0.app/Contents/Resources/julia/lib/julia/sys.dylib
while loading /Users/vishalgupta/Documents/Research/BayesDRO/AmbiguitySets/Experiments/singleNewsVendor.jl, in expression starting on line 174
Minor issue: it'd be nice to call solve() and print() instead of solveRobust() and printRobust() using multiple dispatch if possible. Is there a reason we can't do it this way?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.