Currently tested with:
- Julia v1.3.0
- JuMP v0.21.2
- Optim v0.20.6
Codes for the book "Julia Programming for Operations Research"
Home Page: https://www.chkwon.net/julia
Currently tested with:
I've had revisited your code and recognized some brackets are missed in statements using ..Optimizer. In Julia v1.4 reading CSV-files with readdlm does not work with only the filename. using Base.joinpath could solve the problem.
Best Frank
Hi!
How is it possible to extend the code in ssp_example1.jl or ssp_example1.jl to return "k" first shortest path from o to d and not just the first shortest?
I thank you and appreciate any advice.
Hello. I was trying to look at the second version of the Julia Programming for Operations Research book, but it seems like the link is not working. Here was the link that I tried.
https://juliabook.chkwon.net/book
Thanks.
In the ssp_example1.jl
is there any way to read the data from the title of the header? I mean, instead of start_node = round.(Int64, data[:,1])
is there another way to say start_node is the one in the .csv file that its header is "start node i"
# Data Preparation
network_data_file = "simple_network.csv"
network_data = readdlm(network_data_file, ',', header=true)
data = network_data[1]
header = network_data[2]
You should not compute x_B as x_B = inv(B)*b, but as the solution of a linear system: x_B = B\b, and check that the rank of B is equal to m
In chap10 p-median
syntax: misplaced "global" declaration
Julia 1.2.0
I believe the line global locations, customers, c
should be inside the function optimal(p)
Running the first two lines of script.jl
in Chapter 1:
using JuMP, GLPK
m = Model(with_optimizer(GLPK.Optimizer))
I get the following error:
ERROR: MethodError: no method matching supports_default_copy_to(::GLPK.Optimizer, ::Bool)
Closest candidates are:
supports_default_copy_to(::MathOptInterface.Utilities.AbstractModel, ::Bool) at /home/mepstein/.julia/packages/MathOptInterface/C1XBe/src/Utilities/model.jl:693
supports_default_copy_to(::MathOptInterface.Utilities.MockOptimizer, ::Bool) at /home/mepstein/.julia/packages/MathOptInterface/C1XBe/src/Utilities/mockoptimizer.jl:521
supports_default_copy_to(::MathOptInterface.Utilities.CachingOptimizer, ::Bool) at /home/mepstein/.julia/packages/MathOptInterface/C1XBe/src/Utilities/cachingoptimizer.jl:165
...
Stacktrace:
[1] #set_optimizer#77(::Bool, ::typeof(set_optimizer), ::Model, ::OptimizerFactory) at /home/mepstein/.julia/packages/JuMP/MsUSY/src/optimizer_interface.jl:43
[2] #Model#7 at ./none:0 [inlined]
[3] Model(::OptimizerFactory) at /home/mepstein/.julia/packages/JuMP/MsUSY/src/JuMP.jl:193
[4] top-level scope at REPL[2]:1
I'm using the current stable julia (1.3.1). I know the book says it was tested on julia 1.1. Should I expect things to not work with julia 1.3? I'm new to Julia so apologies if I've done something unrelated incorrectly.
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.