Comments (2)
Hi @Jullija. Please try using QUBOTools.write_model
instead of the regular write
function.
I think the problem is with the docs.
from qubotools.jl.
Just tried with QUBOTools 0.8.1:
julia> model = QUBOTools.read_model("problem.json")
QUBO Model [Min, 𝔹]
▷ Variables ……… 3
Density:
▷ Linear ……………… 66.67%
▷ Quadratic ……… 66.67%
▷ Total ………………… 66.67%
There are no solutions available.
julia> write("problem.qubo", model)
ERROR: MethodError: no method matching write(::IOStream, ::QUBOTools.Model{Int64, Float64, Int64})
Closest candidates are:
write(::Union{AbstractString, IO}, ::QUBOTools.AbstractModel, ::QUBOTools.AbstractFormat)
@ QUBOTools C:\Users\pedroxavier\.julia\packages\QUBOTools\gdvpc\src\model\abstract.jl:370
write(::IO, ::Any)
@ Base io.jl:674
write(::IO, ::Any, ::Any...)
@ Base io.jl:675
...
Stacktrace:
[1] write(io::IOStream, x::QUBOTools.Model{Int64, Float64, Int64})
@ Base .\io.jl:674
[2] (::Base.var"#414#415"{QUBOTools.Model{Int64, Float64, Int64}, Tuple{}})(io::IOStream)
@ Base .\io.jl:459
[3] open(::Base.var"#414#415"{QUBOTools.Model{Int64, Float64, Int64}, Tuple{}}, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base .\io.jl:395
[4] open(::Function, ::String, ::String)
@ Base .\io.jl:392
[5] write(::String, ::QUBOTools.Model{Int64, Float64, Int64})
@ Base .\io.jl:459
[6] top-level scope
@ REPL[16]:1
julia> QUBOTools.write_model("problem.qubo", model)
julia> print(stdout, read("problem.qubo", String))
2 2 0.4
3 3 -4.4
1 2 -0.8
1 3 6.0
Link for file: https://github.com/psrenergy/QUBOTools.jl/blob/main/docs/data/problem.json
from qubotools.jl.
Related Issues (20)
- Implement fixed-size SampleSet HOT 4
- Add Plot Recipes for SampleSet HOT 1
- Set timing standard
- Write Documentation
- Implement `swap_sense`
- Set different colors for stacked bars when plotting HOT 3
- Should we provide `MOI` support?
- Add model density visualization recipe HOT 1
- Add function for computing Hamming distance between solution state vectors HOT 1
- Sort stacked bars in Solutions Summary by number of reads
- Add specialized wrappers for visualization recipes
- Create solver architecture & device interface
- Integrate Graphs.jl interface
- QUBOTools + MathOptInterface Wrapper for ToQUBO.jl and QUBODrivers.jl HOT 2
- Add performance tests
- HDF5 format HOT 4
- TagBot trigger issue HOT 29
- Restore support after renaming project HOT 1
- Add coverage reports + Add tests
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 qubotools.jl.