Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 14:46
    pabloem commented #124
  • 09:46
    mlooz synchronize #127
  • Oct 21 19:41
    mlooz synchronize #127
  • Oct 21 14:20
    mlooz synchronize #127
  • Oct 19 21:32
    mlooz synchronize #127
  • Oct 16 06:21

    darioizzo on master

    version bump and skip PyPi uplo… Merge pull request #140 from da… (compare)

  • Oct 16 06:21
    darioizzo closed #140
  • Oct 16 06:21
    darioizzo opened #140
  • Oct 15 20:54

    darioizzo on v2.6

    (compare)

  • Oct 15 20:49
    darioizzo closed #134
  • Oct 15 16:27

    darioizzo on master

    Adding linter tests on Appveyor… allow C extensions to be loaded… Including all dependencies in I… and 7 more (compare)

  • Oct 15 16:27
    darioizzo closed #137
  • Oct 15 16:27
    darioizzo commented #137
  • Oct 14 17:35
    mlooz synchronize #127
  • Oct 14 13:29
    mlooz synchronize #127
  • Oct 14 11:33
    mlooz synchronize #127
  • Oct 13 19:26
    pabloem commented #137
  • Oct 02 20:11
    pabloem commented #137
  • Oct 02 20:07
    pabloem ready_for_review #137
  • Oct 02 19:57
    albertoibm synchronize #137
Dario Izzo
@darioizzo
for some reason
Giacomo Acciarini
@Sceki
I was afraid of mixing up the envs ahah
Dario Izzo
@darioizzo
true, in this case its allowed
neel
@n-dutta
Hello, I recently downloaded the pykep and pygmo packages onto my (linux mint 18) machine and am trying to do some trajectory optimization
I'm trying to use the mga_1dsm tool, but i get the error "'init() got an unexpected keyword argument 'tof_encoding'" when i include tof_encoding, orbit_insertion, e_target, or rp_target options that mga_1dsm should be able to take
does anyone have any advice? I can see that the _mga_1dsm file in my pykep/pykep/trajopt submodule has these input arguments:
image.png
Dario Izzo
@darioizzo
@n-dutta cannot reproduce. Can you post the code that raises the problem?
vascoamaralgrilo
@vascoamaralgrilo
Good afternoon,
I have been trying to use the class lt_margo to model a continuous thrust transfer. From the answer to my previous issue, the optimisation algorithms should be able to deal with non-linear constraints for that class.
On the other hand, I have researched that evolutionary algorithms are adequate for the optimisation of continuous thrust transfers, but, from the errors I got, I believe these are not suitable to problems with non-linear constraints. In order to use, for example, Hemoglop (DE + PSO + SGA) to optimise a continuous thrust transfer, I believe a class with non-linear constraints should be used to model the problem. Could the classes direct_pl2pl, indirect_pt2pt or indirect_or2or be used to model a continuous thrust transfer without non-linear constraints? If so, which one is more adequate?
Kind regards,
Vasco
Dario Izzo
@darioizzo
@vascoamaralgrilo Simple answer is no. Those classes model the continuous thrust as an NLP. To model it as an unconstrained model you need to use different modelling techniques, or to transform your NLP into an unconstrained problem (possible also, but then your genetic algos will likely perform poorly)
vascoamaralgrilo
@vascoamaralgrilo
@darioizzo Thank you very much for the insight. In that case, other than snopt7, is there a go-to algorithm you would suggest as default/first-try for a problem with non linear constraints?
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 ...