Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:10
    Abhi2109 commented #47
  • May 08 07:44
    dietmarwo commented #127
  • May 08 07:43
    dietmarwo commented #148
  • May 08 07:21
    dietmarwo synchronize #148
  • Apr 26 18:49
    dietmarwo commented #127
  • Apr 26 18:44
    dietmarwo commented #127
  • Apr 26 18:19
    dietmarwo commented #127
  • Apr 22 21:12
    spacebee3 commented #58
  • Apr 22 21:05
    spacebee3 commented #58
  • Apr 20 19:19
  • Apr 16 11:17
  • Mar 28 18:59
    dietmarwo synchronize #148
  • Mar 28 18:23
    dietmarwo synchronize #148
  • Mar 28 18:10
    dietmarwo synchronize #148
  • Mar 26 13:58
    mlooz synchronize #127
  • Mar 20 16:27
  • Mar 19 19:46
    TomSemblanet edited #149
  • Mar 19 19:45
    TomSemblanet opened #149
  • Mar 19 11:47
    dietmarwo opened #148
  • Mar 18 17:43
    mlooz synchronize #127
Dario Izzo
@darioizzo
@vascoamaralgrilo Yes, you can try scipy slsqp (or nlopt version which is also shipped with pygmo)
vascoamaralgrilo
@vascoamaralgrilo
@darioizzo Thank you very much, once again!
vascoamaralgrilo
@vascoamaralgrilo

Good afternoon,

1 -

I am trying to use the class "pykep.propagate_taylor", but I get the following error:

Traceback (most recent call last):
File "<input>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
pykep.core.core.propagate_taylor()
did not match C++ signature:
propagate_taylor(std::array<double, 3ull> r0=(1.0, 0.0, 0.0), std::array<double, 3ull> v0=(0.0, 1.0, 0.0), double m0=100, std::array<double, 3ull> thrust=(0.0, 0.0, 0.0), double tof=1.5707963267948966, double mu=1, double veff=1, int log10tol=1e-15, int log10rtol=1e-15)

I tried with the example given on the pykep page :

propagate_taylor(r0 = [1,0,0], v0 = [0,1,0], m = 100, thrust = [0,0,0], tof = pi/2, mu = 1, veff = 1, log10tol =-15, log10rtol = -15)

(I can run the class pykep.propagate_lagrangian)

2 -

I would also like to confirm that, for coherence, all units should be in SI, or all normalised coherently (for example, using AU for distance, Earth rotation period for time, and the initial spacecraft mass for mass).

kind regards,

Vasco Grilo

Dario Izzo
@darioizzo
@vascoamaralgrilo Its
propagate_taylor(r = [1,0,0], v = [0,1,0], m = 100, thrust = [0,0,0], tof = pi/2, mu = 1, veff = 1, log10tol =-15, log10rtol = -15)
or depending on the version you have installed:
propagate_taylor(r0 = [1,0,0], v0 = [0,1,0], m0 = 100, thrust = [0,0,0], tof = pi/2, mu = 1, veff = 1, log10tol =-15, log10rtol = -15)
vascoamaralgrilo
@vascoamaralgrilo

@darioizzo Thank you very much, I was using m instead of m0! I suggest you update the example given in

https://esa.github.io/pykep/documentation/core.html#pykep.propagate_taylor

as it has (r0, v0, m) instead of (r0, v0, m0).

2 - I would also like to confirm that, for coherence, all units should be in SI, or all normalised coherently (for example, using AU for distance, Earth rotation period for time, and the initial spacecraft mass for mass).

kind regards,

Vasco Grilo

Dario Izzo
@darioizzo
@vascoamaralgrilo yes the docs are ony referred to the head version on the git repository, which is different from the released version you are using. On top of that they are not checked for syntax so may contain errors.
@vascoamaralgrilo If you open an issue on the github I will fix this at the next release.
vascoamaralgrilo
@vascoamaralgrilo
@darioizzo Ok, I´ve opened an issue, thanks for the feedback.
Dario Izzo
@darioizzo
Thanks!
Dappoli
@Dappoli
Hi everyone, I have a question regarding pykep, I tried looking at the documentation but I didn't find anything
I was wandering what is the reference frame used to express the velocity when using the lambert solver with the sun as primary body
heliocentric ecliptic?
thanks!
Dario Izzo
@darioizzo
@Dappoli The reference frame will be the same as that defined by the r0 and r1 vectors.
Christopher Iliffe Sprague
@cisprague
Random thought about using homotopy continuation with the shooting method and PMP — if you include the desired homotopy parameter as an equality constraint in the NLP would it help much?
Dario Izzo
@darioizzo
@cisprague interesting thought .. would not be too difficult to try and see, I think the answer to your quiestion lies in the numerics ...
worth a try
vascoamaralgrilo
@vascoamaralgrilo

Good afternoon,

I was trying to use lt_margo, but obtained the following error:

"self.__sc = pk.sims_flanagan._sims_flanagan.spacecraft(m0, Tmax, Isp)
AttributeError: module 'pykep.sims_flanagan' has no attribute '_sims_flanagan'"

Any insight would be appreciated.

Kind regards,

Vasco

Dario Izzo
@darioizzo
@vascoamaralgrilo FIxed in the PR #119
vascoamaralgrilo
@vascoamaralgrilo

Thank you very much, I am able to use lt_margo now! However, not with snopt7, I get the error message below. I have pykep 2.5, pygmo 2.13.0 (the last version is the 2.15.0) and pygmo-plugins-nonfree 0.10 (the last version is the 0.21). Are the last pygmo and pygmo-plugins-nonfree versions required? I did not manage to install them with pip in python 3.6.

ValueError:
function: evolve_version
where: C:\projects\pagmo-plugins-nonfree\src\snopt7.cpp, 617
what:
An error occurred while loading the snopt7_c library at run-time. This is typically caused by one of the following
reasons:

  • The file declared to be the snopt7_c library, i.e. /usr/local/lib/libsnopt7_c.so, is not a shared library containing the necessary C interface symbols (is the file path really pointing to
    a valid shared library?)
    • The library is found and it does contain the C interface symbols, but it needs linking to some additional libraries that are not found
      at run-time.

We report the exact text of the original exception thrown:

function: evolve_version
where: C:\projects\pagmo-plugins-nonfree\src\snopt7.cpp, 569
what: The snopt7_c library path was constructed to be: /usr/local/lib/libsnopt7_c.so and it does not appear to be a file

Dario Izzo
@darioizzo
@vascoamaralgrilo /usr/local/lib/libsnopt7_c.so does not appear to be a file. Is it?
Do you have the SNOPT library? It seems you do not.
vascoamaralgrilo
@vascoamaralgrilo
My bad, I thought snopt7 would come with pagmo-plugins-no-free, but that wouldn´t make sense, as it is not free. I am using the NLOPT solver "cobyla" now (the only from the NLOPT library which does not require derivatives, and handles thelt_margo constraints).
KR,
Vasco
dietmarwo
@dietmarwo

Tried pg.nlopt('slsqp') and it works quite well. I don't have the snopt library, has anyone compared nlopt('slsqp') with pg7.snopt7 for pk.trajopt.lt_margo ? is it much better?

Another question: Is there a tutorial how to configure the pygmo/pagmo archipelago topology for the trajopt/gym problems? I tried to beat the results from https://github.com/dietmarwo/fast-cma-es/blob/master/PYKEP.adoc using pygmo but this is harder than I thought.

dietmarwo
@dietmarwo

Inspired by @DIEGOA363 from the pagmo2 gitter I tried the following:

   ftol = 1E-6
    G = 100
    I = 64
    M = 1
    P = 500
    algo = pg.algorithm(pg.de1220(gen = G, ftol=ftol))
    topo = pg.topology(pg.fully_connected(w=1.0))
    rp = pg.r_policy(pg.fair_replace(M))
    sp = pg.s_policy(pg.select_best(M))
    archi = pg.archipelago(n=I, t=topo, algo = algo, prob = prob, pop_size=P, r_pol=rp, s_pol=sp)
    for i in range(100000):
        archi.evolve()
        archi.wait()
        # output of the best ...

on a 32 core / 64 thread machine. Got all cores under load and got reasonable results for the easier gym problems. But for tandem(6) and messenger I couldn't reach the results from https://www.researchgate.net/publication/45913344_A_Global_Optimisation_Toolbox_for_Massively_Parallel_Engineering_Optimisation
With fcmaes both problems from https://github.com/esa/pykep/tree/master/pykep/trajopt/gym behave quite similar to their GTOP counterparts, but of course the PYTHON implementation is slower. Increasing to a population size to P=1500 I can at least reach the local minimum at -7.2 for tandem(6), but no improvement beyond 6000 for messenger. Perhaps a mix of algorithms could help?

Dario Izzo
@darioizzo
Tried pg.nlopt('slsqp') and it works quite well. I don't have the snopt library, has anyone compared nlopt('slsqp') with pg7.snopt7 for pk.trajopt.lt_margo ? is it much better?
Yes.
Another question: Is there a tutorial how to configure the pygmo/pagmo archipelago topology for the trajopt/gym problems? I tried to beat the results from https://github.com/dietmarwo/fast-cma-es/blob/master/PYKEP.adoc using pygmo but this is harder than I thought.
No.
The messenger problem is tricky and indeed requires some multistart strategy to be cleverly implemented. The vanilla version per se will not deliver. I am interested if you manage to understand what is in https://github.com/dietmarwo/fast-cma-es/blob/master/PYKEP.adoc that make the difference
dietmarwo
@dietmarwo
I created a new gitter for fcmaes https://gitter.im/fast-cma-es/community so that details about fcmaes can be discussed independend from PYKEP. fcmaes has a different view about parallelisation: Not a single evolve step, but complete optimization runs with a limited number of evaluation steps are viewed as atomic. Population members of a fcmaes coordinated parallel retry are their solutions together with the box boundaries used to compute them. A "crossover" is performed by generating new boxed bounds together with initial stepsize vectors from two parents. Not only CMA-ES supports an initial stepsize vector, for NLopt it is a parameter available to many algorithms https://nlopt.readthedocs.io/en/latest/NLopt_Reference/#initial-step-size . fcmaes performs optimizations in parallel, stores their results and parameterizes new runs using this crossover mechanism. To determine whether this is a good idea I created https://github.com/dietmarwo/fast-cma-es/blob/master/PYKEP.adoc describing how to compute solutions for https://github.com/esa/pykep/tree/master/pykep/trajopt/gym together with the solutions I found. Some of them, for instance the -7.4338 solution for the unconstrained Tandem problem for the 6th planet sequence [earth, venus, earth, earth, saturn] are not easy to find. To check how good fcmaes works I would like to compare it with other methods, for instance pagmos archipelago approach - or any other parallel optimization method.
Tarek
@tarekbouazza
Hello, I have a question regarding pykep, I looked through the documentation but didn"t find what I was looking for. Are there any ways to include a force model that we want? for example to obtain a third body dynamics by adding the earth's force model to construct orbits around libration points
Dario Izzo
@darioizzo
@tarekbouazza pykep has limited support at the moment for three body dynamics, I suggest you look elsewhere.
Will Binns
@wbnns
@darioizzo Hello. I noticed there are some in-line instances of TODO, FIXME, and WRITE ME - would it be helpful if I created GitHub issues as stubs for those types of things, to make them more visible to others on a repository level?
Dario Izzo
@darioizzo
@wbnns sure, good idea. I suspect many could be obsolete, in which case I will quickly comment and close the issue.
Will Binns
@wbnns
@darioizzo Ok, will do! Thanks.
Adisesh Yeragudi
@AdiseshYeragudi
Can I use pykep to calculate the optimal low thrust transfer for a satellite between two different earth orbits? if so what's the best way to get started learning?
thank you! @darioizzo
Dario Izzo
@darioizzo
Did you have a look to the examples in the docs?
It could be as simple as to use those examples ...
Ajaja
@Ajaja
https://esa.github.io/pykep/documentation/planets.html?highlight=kepler#pykep.planet.keplerian:
orbital_elements: a sequence of six containing a,e,i,W,w,M (SI units, i.e. meters and radiants)
Is there somewhere a description of those "a,e,i,W,w,M"?
Dario Izzo
@darioizzo
Semi Major axis, eccentricity, inclination, RAAN, argument of perihelium, mean anomaly.
Ajaja
@Ajaja
Yes, thank you. Eventually I was able to find it here: https://esa.github.io/pykep/documentation/index.html But it wasn't easy.
vascoamaralgrilo
@vascoamaralgrilo

Good evening,

In the M-ARGO preliminary trajectory design study (https://link.springer.com/article/10.1007/s42064-018-0024-y), I believe you mention that the optimal solution corresponds to a bang-bang thrust profile. In case the constraint d_E_NEO_arr <= 1 AU (where d_E_NEO_arr is the Earth-NEO distance at the end of the interplanetary transfer) to the M-ARGO (optimum control) Problem, would the optimum solution still correspond to a bang-bang control profile?

Kind regards,

Vasco

Fabiano Perini
@fperini0_gitlab
Hi I have a question about pykep and pygmo, I wrote my multiple gravity assist code with 1-DSM per leg, if I use the jpl low ephemeris it works very well, the problem is that if I try to use SPICE ephemeris the archipelago used for minimization gives me an error.
thank you @darioizzo
Dario Izzo
@darioizzo
spice is not thread safe, likely you are seeing an error related to that.
use interpolants or jpl_lp .....
Fabiano Perini
@fperini0_gitlab
ok thank you very much @darioizzo
dietmarwo
@dietmarwo

@mlooz @darioizzo

Updated solutions to compare all three solar orbiter models are at

https://gist.github.com/dietmarwo/86f24e1b9a702e18615b767e226e883f

solodsmtest.py - for pykep.trajopt.gym._solar_orbiter._solar_orbiter_udp_1dsm
solotest.py - for pykep.trajopt.gym._solar_orbiter._solar_orbiter_udp
solomgartest.py - for pykep.trajopt.gym._solar_orbiter._solo_mgar_udp

_solo_mgar_udp, _solar_orbiter_udp and _solar_orbiter_udp_1dsm are of increasing complexity. _solar_orbiter_udp_1dsm has much more dimensions and freedom than _solo_mgar_udp. The challenge is now to utilize this freedom by finding superior solutions - the given solutions are quite similar so far. Using the plot function of _solar_orbiter_udp and _solar_orbiter_udp_1dsm reveals that the plots are incomplete for multi revolution transfers - should be fixed in esa/pykep#127 .