Skip to content

Instantly share code, notes, and snippets.

View mforets's full-sized avatar
🏠
Working from home

Marcelo Forets mforets

🏠
Working from home
View GitHub Profile
@mforets
mforets / EMBrake_scriptverif.md
Created May 7, 2020 03:31
EMBrake_scriptverif.md
using Plots, BenchmarkTools, StaticArrays
using Revise, ReachabilityAnalysis
const RA = ReachabilityAnalysis
include("/home/mforets/.julia/dev/ReachabilityAnalysis/test/models/hybrid/embrake.jl")
LazySets.deactivate_assertions()

function LazySets.diameter(R::ReachabilityAnalysis.AbstractLazyReachSet; vars::Int)
    overapproximate(project(R, vars=vars), Interval) |> set |> diameter
end
@mforets
mforets / EMBrake_verif.md
Last active May 6, 2020 22:10
Property verification EMBrake

no pv, no jitter, delta = 1e-7, GLGM06

first_in = findfirst((X->begin
                #= In[14]:11 =#
                set(X)  P
            end), vsol.Xk) = 888783
all((X->begin
            #= In[14]:14 =#
            set(X)  P
@mforets
mforets / EMBrake_new
Created April 27, 2020 16:24
EMBrake_new
```julia
using Plots, BenchmarkTools
using Revise, ReachabilityAnalysis
include("/home/mforets/.julia/dev/ReachabilityAnalysis/test/models/hybrid/embrake.jl")
LazySets.deactivate_assertions()
```
## No pv no jitter
```
@mforets
mforets / ltv_test.plt
Created April 10, 2020 15:18
Gnuplot polygons test
set terminal postscript enhanced color
set output './images/ltv_test.eps'
set style line 1 linecolor rgb "blue"
set autoscale
unset label
set xtic auto
set ytic auto
set xlabel "x"
set ylabel "y"
plot '-' notitle with lines ls 1
@mforets
mforets / LazySets_julia_v_1.4.jl
Created March 25, 2020 14:04
LazySets_julia_v_1.4.jl
```julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.4.0 (2020-03-21)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
@mforets
mforets / xps.md
Last active March 16, 2020 12:25
Windows commands
@mforets
mforets / gist:86958a476b4f9ffe1884171d0e8966aa
Last active March 3, 2020 15:18
installing flow* on fedora

Getting the software

First download Flow*, https://flowstar.org/dowloads/

At the time of writing the latest release is v2.1.0 from march 2017.

The following installation instructions were tested on a Dell 9575 laptop running Fedora 31.

Installing the dependencies

@mforets
mforets / testscript.jl
Last active March 2, 2020 23:35
lazysets minimal test script
# paste this script on your .julia/dev/LazySets/test folder
using Revise, LazySets, Test
using LazySets: ispermutation
using LazySets.Arrays
using SparseArrays
using LinearAlgebra
using Polyhedra, CDDLib
using LazySets: dim, Interval, translate, volume, HalfSpace, project
test_suite_polyhedra = true
@mforets
mforets / cfp
Created February 20, 2020 17:30
cfp
- https://www.anii.org.uy/apoyos/investigacion/25/investigacion-y-desarrollo-en-matematica/
@mforets
mforets / sympower_imatrix.jl
Last active February 6, 2020 14:42
Symbolic interval matrix power
# =====================================
# Version using MacroTools + SymEngine
# =====================================
using IntervalMatrices
using SymEngine
using MacroTools: postwalk
subidx(i) = join(Char.(0x2080 .+ convert.(UInt16, digits(i)[end:-1:1])))