Comments (4)
Can't be done (yet)
Robust models are JuMP models with an "extension".
function RobustModel(;solver=nothing,cutsolver=nothing)
m = Model(solver=solver)
m.ext[:Robust] = RobustData(cutsolver)
return m
end
Alternatives that would let you do multiple dispatch including using an AbstractModel from which Model and a hypothetical RobustModel inherit from is one option, another was making Model parametric. Both had issues...
This is something @mlubin and I talked about a lot, and this "extension" mechanism was the best we could do without compromising any JuMP speed. Somewhat related to JuliaLang/julia#4935
from jumper.jl.
I noticed that... Do you know if the language extension is coming soon?
(i.e. requiring abstract types to have certain members?)
Alternatively, although it seems a bit dodgy, (for my own edifiaton)
couldn't you have done this?
type RobustModel <: Model
m #This is actually a model
rd #this is the robust data and extension stuff
end
In other words, Robust models implement BOTH "is a" and "has a" in the
inheritance scheme?
Vishal Gupta
PhD Candidate, 2014
Operations Research Center
Massachusetts Institute of Technology
www.mit.edu/~vgupta1/
On Thu, Apr 10, 2014 at 9:50 PM, Iain Dunning [email protected]:
Can't be done (yet)
Robust models are JuMP models with an "extension".function RobustModel(;solver=nothing,cutsolver=nothing)
m = Model(solver=solver)
m.ext[:Robust] = RobustData(cutsolver)
return m
endAlternatives that would let you do multiple dispatch including using an
AbstractModel from which Model and a hypothetical RobustModel inherit from
is one option, another was making Model parametric. Both had issues...
This is something @mlubin https://github.com/mlubin and I talked about
a lot, and this "extension" mechanism was the best we could do without
compromising any JuMP speed. Somewhat related to JuliaLang/julia#4935JuliaLang/julia#4935Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-40163671
.
from jumper.jl.
The issue is that variables contain a reference to their parent model, which needs to be a Model
. We tried making variables parametric on the model type, but that led to Julia's version of C++ template hell. Having different model types also makes extensions mutually exclusive.
from jumper.jl.
Also you can't inherit from concrete types in Julia. Model
would need to be an abstract type.
from jumper.jl.
Related Issues (20)
- Keyword argument inconsistency HOT 3
- JuMPeR has no licence HOT 1
- Passing bad number of Uncertainties to Oracles HOT 9
- More compact reformulations HOT 4
- Docs out of date HOT 2
- conflict with "ScikitLearn" package HOT 16
- second-order conic constraint in uncertainty set HOT 3
- Extract affine policy coefficients HOT 3
- Typo in README
- Update to JuMP 0.14 HOT 2
- Error when solving problem with uncertain integer variables HOT 2
- JuMPeR not working in Julia PRO HOT 2
- JuMPeR not available for Julia v0.6.0 HOT 2
- Lazy constraints when solving a robust mixed integer model HOT 1
- Enable attobot for this package HOT 3
- JuMPeR v0.5.0 incompatible with JuMP v0.17.1 HOT 2
- Implement adding constraints on uncertain parameters for the BudgetUncertaintySet HOT 2
- Mapping Gurobi IIS to JuMP Constraints
- JuMPDict not defined
- Unsatisfiable requirements error with JuMP v0.20.1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jumper.jl.