Giter Site home page Giter Site logo

jpor_codes's Introduction

Code Repository for "Julia Programming for Operations Research"

Lear more about the book

Currently tested with:

  • Julia v1.3.0
  • JuMP v0.21.2
  • Optim v0.20.6

jpor_codes's People

Contributors

chkwon avatar mrchaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpor_codes's Issues

Little typo errors and path errors

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

using DelimitedFiles with title of the header

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]

image

Avoid inv()

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

syntax: misplaced "global" declaration

Error message:

In chap10 p-median
syntax: misplaced "global" declaration

Julia version information:

Julia 1.2.0

Suggestion:

I believe the line global locations, customers, c should be inside the function optimal(p)

Error in chap1 script.jl for current stable julia

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.