In-Development TradeDangerous: power-user trade optimizer

Seems to be getting confused about Non-Lethal Weapons.

Code:
D:\Gadgets\TradeDangerous>trade.py buy --near contiku nonlethal
D:\Gadgets\TradeDangerous\trade.py: Item "nonlethal" could match Non-Lethal Weapons or nonlethalweapons

D:\Gadgets\TradeDangerous>trade.py buy --near contiku nonlethalw
D:\Gadgets\TradeDangerous\trade.py: Item "nonlethalw" could match nonlethalweapons or Non-Lethal Weapons

Same thing either way.

That looks like your database has been corrupted with a commodity called 'nonlethalweapons'.

What happens if you issue the commands:

trade.py buy --near contiku "nonlethalweapons"
and
trade.py buy --near contiku "Non-Lethal Weapons"
 
Hi there,

can someone please confirm my problem?
Currently i'm using commit 84575e0e4b from our git repository.

I already tried to submit some distances using submit-distances.py.
But everytime i entered wished distances for well known stations and also some of the next group:
Code:
System: ICZ KC-U B3-4
Distances:
  SOL: 128.94ly
  ASELLUS AUSTRALIS: 218.78ly
  46 GAMMA HYDRAE: 175.79ly
  TEJAT POSTERIOR: 299.21ly
  RHO PUPPIS: 124.51ly
  IORASP SP-G D10-0: 65169.53ly
  ICZ FW-V B2-1: 31.09ly
  HR 2028: 838.5ly
  EZ ORIONIS: 1261.91ly
after submitting i was wondering how long it takes, but when i search at http://www.edstarcoordinator.com/ i can't find my newly entered and submitted system as target system (unchecked CR check, so that it should display).
Afterwards i tried to insert my data for my new system directly at edstarcoordinator, but as it seemed it doesn't know the coordinates for
Code:
  46 GAMMA HYDRAE: 175.79ly
  TEJAT POSTERIOR: 299.21ly
because i can't get them listed inside the reference systems.
After i manually inserted my new system at edstarcoordinator i only used known systems as reference points and voila after submitting it got a successfull trilateration and found me my coordinates, therefore now i can find my newly entered system as reference system and also inside the target system.

Can someone please confirm this thing, before i open any new issue?
I think it's only because of these two unknown systems, that are defined as well known standardStars/systems in submit-distances.py.

Greets!
BD

PS: when i replace those 2 systems with alioth and klamath for example (in submit-distances), these 2 are known by edsc as refs, then everything works just fine and i can see my new entry at edsc
 
Last edited:
That looks like your database has been corrupted with a commodity called 'nonlethalweapons'.

What happens if you issue the commands:

trade.py buy --near contiku "nonlethalweapons"
and
trade.py buy --near contiku "Non-Lethal Weapons"

Much as I would expect

Code:
D:\Gadgets\TradeDangerous>trade.py buy --near contiku "nonlethalweapons"
Station                           Cost      Stock DistLy Age/days      StnLs B/mkt Pad
--------------------------------------------------------------------------------------
GANDUI/Lopez-Garcia Gateway      1,489     11,627  14.74     0.05       23.1   Yes Med
GANDUI/Dixon Dock                1,491     19,710  14.74     0.05         15    No Med
GANDUI/Regiomontanus Ring        1,492     26,817  14.74     0.06         90   Yes Med

D:\Gadgets\TradeDangerous>trade.py buy --near contiku "non-lethal weapons"
Station                           Cost      Stock DistLy Age/days      StnLs B/mkt Pad
--------------------------------------------------------------------------------------
GANDUI/Lopez-Garcia Gateway      1,489     11,627  14.74     0.05       23.1   Yes Med
GANDUI/Dixon Dock                1,491     19,710  14.74     0.05         15    No Med
GANDUI/Regiomontanus Ring        1,492     26,817  14.74     0.06         90   Yes Med

Identical results.

The batch file you suggested for station entry looks helpful, thanks.
 
So I think I've finally got this down and I actually prefer using this over Slopey's but I was wondering... is there anyway to send the output to the printer. I tried using >lpt1 at the end but my computer just laughed.
 
I get the following

Code:
NOTE: Added local station placeholder for CD-46 14401/KLEIN ENTERPRISE (#5492)
NOTE: Added local station placeholder for CD-46 14401/STITH RING (#5493)
NOTE: Added local station placeholder for LTT 9156/KOROLEV HUB (#5494)
NOTE: Added local station placeholder for NAHUA/FULLER VISION (#5495)

Placeholders are ONLY added to the local db. If you want to make them persistent, you need to do

Code:
$ trade.py export --table Station

It will now tell you this when you import:

NOTE: Added local station placeholder for XI URSAE MAJORIS/DURRANCE DOCK (#5396)
NOTE: Added local station placeholder for YARIFUKURA/SHKLOVSKY TERMINAL (#5397)
NOTE: Added local station placeholder for YZ CANIS MINORIS/RAY FREEPORT (#5398)
NOTE: Placeholder statiosn are added to the local DB only (not the .CSV).
NOTE: Use 'trade.py export --table Station' if you /need/ to persist them.
NOTE: Import complete: 173,897 items (172,492 buyers, 57,191 sellers) for 3,268 stations in 1,962 systems

- - - - - Additional Content Posted / Auto Merge - - - - -

I don't know about all those problems you are having with maddavo but I have a little station.bat file in the same folder as trade.py to help me with all those long switch names

Code:
trade.py station --ls-from-star %1 --bm %2 --pad-size %3 %4 -%5

It's then called as (for example to add a new station thats 123 ls from the star, has no black market and a large pad size):

Code:
station.bat 123 N L [COLOR=#E4E4E4]"<system>/<stationname>" a[/COLOR]

If you were updating a station you would use 'u' at the end rather than 'a'.

It's not perfect but it does help a little.

I try in the documentation and elsewhere to explain that you don't have to use the long switch names TD is very aggressive at doing best-guess matching.

Code:
trade.py st -a --ls 123 "sys/stn"    (don't know the bm or pad)
trade.py st -u --bm y "sys/stn"     (just want to update the bm flag)

I hate having to over-type, is there a way I could make it clearer so that people aren't so encumbered?
 
So in addition to my sending the output to a .txt file or even the printer I'm currently using the following line to find my routes.
Code:
trade.py run --fr=turdetani --ly=16.25 --jumps=10 --cap=52 --cr=1000000 --hops=60 --max-days-old=5 --ls-max=10000 -v
2 questions. 1) Can I add / change anything to optimize my route for extreme Profitsss. 2) When I use anything more than 5 in the -jumps it take forever for it to spit out a trade route. Is this simply because of the amount of processing going on under the hood or just a limitation?
 
Bdragon. all the TD python file does is HTTP POST the information to the EDSC server using the SubmitDistances method - not sure if EDSC automatically puts them into the database or if there is some automatic or manual validation that occurs first, perhaps they are input daily or the like and not instantaeneously. See the SubmitDistances method description here: http://edstarcoordinator.com/api.html Edit: Systems I submitted have also not shown up yet

Other questions for kfsone - should star system names with spaces have quotation marks around them for this script? I input some Witch Head Sector ones last night and messed something up, so said no at the
Code:
Does this look correct? Y/N
stage. The systems were added to my outliers file even though I said no (as I had entered some incorrect distances). Some showed up as outliers tonight when I tried to do it again, prompting me for distance again, and after submission I got the message
Code:
****Not all system names are unique (#102)
Finally, at the outliers and verification stage the systems I had entered with quotations around the name were displayed with the quotations, but when cut and paste do not have them. ( Similarly, -VVV also appears as part of the displayed initial system name after I mistakenly tried to use it once when running the command, oops). Hopefully I have not buggered things up.

Also, a more general question - can you enter new systems as your own outliers, and will they be added to ESDC in that fashion, or do you have to enter each and every new system as an initial system for the command, and use "known to EDSC" outliers for it? The former seems to be the case perhaps as my systems from last night which I had entered as my own outliers were recycled tonite? If not this may be a bug, not sure?

Hi there,

can someone please confirm my problem?
Currently i'm using commit 84575e0e4b from our git repository.

I already tried to submit some distances using submit-distances.py.
But everytime i entered wished distances for well known stations and also some of the next group:
Code:
System: ICZ KC-U B3-4
Distances:
  SOL: 128.94ly
  ASELLUS AUSTRALIS: 218.78ly
  46 GAMMA HYDRAE: 175.79ly
  TEJAT POSTERIOR: 299.21ly
  RHO PUPPIS: 124.51ly
  IORASP SP-G D10-0: 65169.53ly
  ICZ FW-V B2-1: 31.09ly
  HR 2028: 838.5ly
  EZ ORIONIS: 1261.91ly
after submitting i was wondering how long it takes, but when i search at http://www.edstarcoordinator.com/ i can't find my newly entered and submitted system as target system (unchecked CR check, so that it should display).
Afterwards i tried to insert my data for my new system directly at edstarcoordinator, but as it seemed it doesn't know the coordinates for
Code:
  46 GAMMA HYDRAE: 175.79ly
  TEJAT POSTERIOR: 299.21ly
because i can't get them listed inside the reference systems.
After i manually inserted my new system at edstarcoordinator i only used known systems as reference points and voila after submitting it got a successfull trilateration and found me my coordinates, therefore now i can find my newly entered system as reference system and also inside the target system.

Can someone please confirm this thing, before i open any new issue?
I think it's only because of these two unknown systems, that are defined as well known standardStars/systems in submit-distances.py.

Greets!
BD

PS: when i replace those 2 systems with alioth and klamath for example (in submit-distances), these 2 are known by edsc as refs, then everything works just fine and i can see my new entry at edsc
 
Last edited:
Bdragon. all the TD python file does is HTTP POST the information to the EDSC server using the SubmitDistances method - not sure if EDSC automatically puts them into the database or if there is some automatic or manual validation that occurs first, perhaps they are input daily or the like and not instantaeneously. See the SubmitDistances method description here: http://edstarcoordinator.com/api.html Edit: Systems I submitted have also not shown up yet
Hi from EDSC about:

What's that "CR check" thing?
When you've succesfully entered a new Target System, you'll usually notice that it does not appear in the dropdown lists afterwards.
This is because each Target System has a CR (Confidence Rating) counter and when you enter it the first time the CR gets set to 1.
The next time that exact system is entered to the DB the CR gets incremented to 2 and so on. Once it hits 5 it'll get shown on the lists.
This is very usefull for filtering systems that got entered by mistake (the name was mis-typed or similar) as the CR will then usually stay at 1.

That means, that when it has enough information to triangulate, it will show in it's result the new coordinates AND it will be displayed with unchecked CR option as an already known system in the new/reference system section.
 
Just executed a recent update and getting the following error whenever I execute a command-line trade.py command:


NOTE: Rebuilding cache file: this may take a moment.
D:\Games\Frontier\kfsone\trade.py: Station.csv:76 ERROR Second occurrance of entry "39 TAURI/PORTA", previous entry at line 75.

I've deleted and re-pulled with update and still can't get past this. Regardless of what command I run it throws this error and fails. I went in and removed the duplicate copies of the lines, but I end up getting even more failed errors when inserting to the database, etc. Any insight on how to fix?

'39 SERPENTIS','Lindsey Orbital',424,'Y','L'
'39 SERPENTIS','Rushd Ring',1315,'N','L'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',994,'Y','L'
'41 GAMMA SERPENTIS','Abe Landing',0,'?','?'
'41 GAMMA SERPENTIS','Forest Refinery',0,'N','M'
 
Go to the directory where TD is located and find the stations.csv file in the \data folder and open it with notepad (or whatever txt reader you like) and remove all instances or 39 Tauri Porta 0 ? ? leaving the last line with Porta 994 Y L and then rerun TD and it will rebuild database. Don't do the update again just run trade.py and let it rebuild the database or you could try trade.py buildcache -f and see if that works.
 
Last edited:
That means, that when it has enough information to triangulate, it will show in it's result the new coordinates AND it will be displayed with unchecked CR option as an already known system in the new/reference system section.

Thanks - I tried searching for the systems I input with the CR checkbox turned off, and they still do not seem to appear in the list of known systems, probably because I messed things up with quotation marks (or maybe there is a still a delay as well before the systems appear, not sure).

:-(
 
Placeholders are ONLY added to the local db. If you want to make them persistent, you need to do
Code:
$ trade.py export --table Station

Ah very cool. That makes my life much easier.

I try in the documentation and elsewhere to explain that you don't have to use the long switch names TD is very aggressive at doing best-guess matching.

Code:
trade.py st -a --ls 123 "sys/stn"    (don't know the bm or pad)
trade.py st -u --bm y "sys/stn"     (just want to update the bm flag)

I hate having to over-type, is there a way I could make it clearer so that people aren't so encumbered?

Probably not. For my part there is a certain paranoia when adding station data. I don't want it to be wrong and end up with even more derped data floating about, so I tend to be extra careful.
Given I didn't write the code, I'm not immediately sure how far one can safely go with abbreviating, so those examples are useful. Perhaps more such examples in the documentation? I've added the above into the wiki.
 
How long does it take for new stations to get propagated? I sent some to Maddavo hours ago, but TD is still generating placeholders - which also means the bm/pad/distance data is ending up lost. Is the sync with EDDN causing a hold up somewhere?
 
So I think I've finally got this down and I actually prefer using this over Slopey's but I was wondering... is there anyway to send the output to the printer. I tried using >lpt1 at the end but my computer just laughed.

trade.py run all your options > myoutput.txt
notepad myoutput.txt
File | Print...
 
How long does it take for new stations to get propagated? I sent some to Maddavo hours ago, but TD is still generating placeholders - which also means the bm/pad/distance data is ending up lost. Is the sync with EDDN causing a hold up somewhere?

TD and maddavo are two different things; TD comes with a default data set - that has been somewhat in-sync with Maddavo for a while, but I've not been able to keep up :)

Placeholders are there because you are importing price data from someplace with a different "Station.csv" and you aren't committing to them.

Your options are to (a) download his Station.csv file (trade.py imp --plug=maddavo --opt=stncsv), (b) add the stations yourself or (c) accept the new stations by exporting your Station table (trade.py exp --tab Station.csv)

-Oliver
 
Just executed a recent update and getting the following error whenever I execute a command-line trade.py command:
I've deleted and re-pulled with update and still can't get past this. Regardless of what command I run it throws this error and fails. I went in and removed the duplicate copies of the lines, but I end up getting even more failed errors when inserting to the database, etc. Any insight on how to fix?

'39 SERPENTIS','Lindsey Orbital',424,'Y','L'
'39 SERPENTIS','Rushd Ring',1315,'N','L'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
'39 TAURI','Porta',0,'?','?'
...

This is data you're fetching from maddavo's site, you need to let him know there's a problem, but in the short term the fix is to edit your "Station.csv" file and remove all those extra "Porta" entries.

I'm changing the import command so that the first time you use the maddavo plugin, it will throw up a pop-up notification explaining a little more about whats going on.


-Oliver
 
See the SubmitDistances method description here: http://edstarcoordinator.com/api.html Edit: Systems I submitted have also not shown up yet

I'm not 100% sure what's going on on the EDSC side. I've tried to reach out to TornSoul a couple of times but I'm not getting anything back from him, e.g. I pointed out to him that the "trilat" data you get back when submitting an update is all for the same system ... If you submit a star + 6 distances, you get back 7 "trilat" entries for the same thing.

clavain said:
Other questions for kfsone - should star system names with spaces have quotation marks around them for this script? I input some Witch Head Sector ones last night and messed something up, so said no at the
Code:
Does this look correct? Y/N
stage. The systems were added to my outliers file even though I said no (as I had entered some incorrect distances). Some showed up as outliers tonight when I tried to do it again, prompting me for distance again, and after submission I got the message
Code:
****Not all system names are unique (#102)
Finally, at the outliers and verification stage the systems I had entered with quotations around the name were displayed with the quotations, but when cut and paste do not have them. ( Similarly, -VVV also appears as part of the displayed initial system name after I mistakenly tried to use it once when running the command, oops). Hopefully I have not buggered things up.

Also, a more general question - can you enter new systems as your own outliers, and will they be added to ESDC in that fashion, or do you have to enter each and every new system as an initial system for the command, and use "known to EDSC" outliers for it? The former seems to be the case perhaps as my systems from last night which I had entered as my own outliers were recycled tonite? If not this may be a bug, not sure?

- You only need to use quotes on the command line, I'm adding a check to remove quotes if you type them in-app,
- You could edit data/extra-stars.txt and add a bunch of stars you want to use as outliers or add them to the .py file if you feel fancy,
- I've added more checks for duplication,
- It sounds like you just need to edit "data/extra-stars.txt",
 
TD and maddavo are two different things; TD comes with a default data set - that has been somewhat in-sync with Maddavo for a while, but I've not been able to keep up :)

Which returns me to my earlier question - where/how do you prefer to receive new station info? (if at all I guess!).

Has Maddavo a forum thread hidden away somewhere that anyone knows of?
 
Last edited:
Back
Top Bottom