JuliaReach / Reachability.jl

Reachability and Safety of Nondeterministic Dynamical Systems
MIT License
50 stars 4 forks source link

Plots says "[warn] No strict ticks found" #103

Closed schillic closed 6 years ago

schillic commented 6 years ago

Occurs for the Heat model, but only with few steps:

using Reachability, MAT, Plots

function compute(input_options::Pair{Symbol,<:Any}...)
    file = matopen(@relpath "heat.mat")
    A = sparse(read(file, "A"))

    # initial set
    # - x1-x300 are 0.0,
    # - the rest is in [0.002, 0.0015]
    X0 = Hyperrectangle([fill(0.6125, 2); zeros(198)], [fill(0.0125, 2); zeros(198)])

    # input set
    B = sparse([67], [1], [1.0], size(A, 1), 1)
    U = B * BallInf([0.0], 0.5)

    # instantiate continuous LTI system
    S = ContinuousSystem(A, X0, U)

    # define solver-specific options
    options = merge(Options(
        :mode => "reach",
        :vars => [133], # variable needed for property
        :partition => [(2*i-1:2*i) for i in 1:100], # 2D blocks
        :verbosity => "info",
        :plot_vars => [0, 133]
        ), Options(input_options...))

    result = solve(S, options)

    if options[:mode] == "reach"
        println("Plotting...")
        tic()
        plot(result)
        @eval(savefig(@filename_to_png))
        toc()
    end
end # function

compute(:δ => 0.001, :N => 3);
mforets commented 6 years ago

maybe this error is due to the tiny values in the y-axis (1e-16), and as you say it is only for small N, since it goes for :N => 5.

there are no much references to this warning that i could find: this.

i don't see an action we can do to avoid this warning and vote to close this issue.

schillic commented 6 years ago

The warning is shown when the y-axis ticks are not all within the plot area, as can be seen by playing around with X0. This is presumably a problem with the very small numbers, as you mentioned.