oxfordcontrol / SwitchTimeOpt.jl

SwitchTimeOpt.jl - Switching Time Optimization in Julia
Other
15 stars 8 forks source link

HybridSystems package #5

Open blegat opened 6 years ago

blegat commented 6 years ago

As a follow up of #1 , I have finally decided to split my SwitchedSystems.jl package into an HybridSystems package and a SwitchOnSafety package. The first one attempts to be a generic interface for HybridSystems.jl It allows both

1) packages implementing an algorithm on hybrid systems like this package or SwitchOnSafety.jl to be easily accessible without needing to spend time on design a nice user friendly interface. 2) For the user to have a consistent interface for different algorithms in Julia.

One way to think about it is that HybridSystems.jl is to hybrid systems what MathOptInterface is to optimization.

I would be interested to know what you think about it and whether you would like to use it for this package.

bstellato commented 6 years ago

It sounds like a good idea! I like the modular approach of MathOptInterface.

Were you thinking about being able to call SwitchTimeOpt (or other equivalent packages) from the HybridSystems package once an hybrid system model is defined?

blegat commented 6 years ago

Yes, as a first step, it would be nice to be able to do

# Create Problem
SwitchTimeOpt.stoproblem(x0, hs::HybridSystems.DiscreteSwitchedLinearSystem, t0=t0, tf=tf)
# Solve Problem
SwitchTimeOpt.solve!(m)

Then in the long term, as there could be several packages solving the same problem with different algorithm, it would be nice to have a common interface and do instead something like

# Create Problem
HybridSystems.stoproblem(x0, hs::HybridSystems.DiscreteSwitchedLinearSystem, t0=t0, tf=tf)
# Solve Problem
HybridSystems.solve!(m, solver=SwitchTimeOpt.SwitchTimeOptAlgorithm())