In-Development TradeDangerous: power-user trade optimizer

@kfsone:

there is an addition in the verbose logging¹ to get the station name. If you drop out of supecruise there is an "FindBestIsland" entry with more information (Commander:Gamemode:position:Systemname), now:

Code:
$ getname.sh
.../Frontier/EDLaunch/Products/FORC-FDEV-D-1002/Logs/netLog.1503131011.01.log
{11:23:15} FindBestIsland:Gazelle:solo:Peary Dock:V1581 Cygni
   System: V1581 CYGNI
  Station: Peary Dock

You could use that for spellchecking.


¹) to switch the verbose loggin on you need to add VerboseLogging="1" as attribute to the Network element in the AppConfig.xml file.
Code:
	<Network
	  Port="0"
	  upnpenabled="1"
	  LogFile="netLog"
	  DatestampLog="1"
	  VerboseLogging="1"
	  >
The entry needs to be added manually after every update.

Oh, you beauty :)
 
Code:
[size=3]
v6.14.0 Mar 13 2015
. (kfsone) Station data:
  - Added "outfitting", "rearm", "refuel" and "repair" fields,
  - Added options to "local" and "station" commands,
  - Added output to "local", "station" and "nav" commands,
  - Added support to maddavo import,
[/size]
[size=2]
v6.13.4 Mar 13 2015
. (WombatFromHell) "run" command:
  - Added "--max-gain-per-ton" (--mgpt) option
    Default: 10000cr
    Controls the maximum profit/ton that TD will believe

v6.13.3 Mar 11 2015
. (kfsone) Fixed "--blackmarket" and "--trading" in local,
. (Dry411s) Resolves #200 New ships for 1.2,
. (kfsone) +103 Systems
. (kfsone) OCR Derp fixes
. (kfsone) Station cleanup
. (Dry411s) Resolves #203 New ShipPrices per 1.2.03,
. (orphu) ShipVendor updates
[/size]
 
Just checked in 6.14.2, which takes out a performance feature that was using a crazy amount of memory and actually hurting performance. Under windows this would manifest as the occasional "python has stopped working".

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

I've been trying to figure out what to do about illegal goods; I usually just --avoid them but I got a really good 1890cr/ton option on them today and was recalculating my way around it when I noticed - the destination was a medium pad. Heck, I thought; that's not a problem at an outpost.

I can add a feature that would let you say "avoid trying to sell these things at stations vs outputs", but that might be complicated, and we don't have the data to really make an informed decision about that. Is this even an extra bit of complexity anyone wants?
 
Last edited:
It'd be nice if TD knew what was illegal at each stop along a route and could be asked not to suggest illegal commodities. It'd be even nicer if I could tell TD "Yes, I have 84T capacity, but I'm carrying 4 tons of Wolf Fesh; generate a run from here to there without taking me anyplace where Wolf Fesh is illegal."
 
Just checked in 6.14.2, which takes out a performance feature that was using a crazy amount of memory and actually hurting performance. Under windows this would manifest as the occasional "python has stopped working".

Thanks for this, I love how often these updates come out, BUT....

Whenever I try to pull from git hub all my changes get screwed up... deleted stations get put back in, changed services, etc.

When I first started to use TD I followed your (kfsone) setup instructions from the wiki and used Sourcetree but could never figure out how to use it properly and so I've just recently switched to cmd line GIT but I keep getting the same questions and problems from both.

First neither will report an update to the origin/master. git status says
Code:
git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   data/Station.csv

no changes added to commit (use "git add" and/or "git commit -a")

and Sourcetree indicates the same.

BUT, I know there is an updated version because kfsone says so, and it's listed right there in the wiki, so I go git pull anyway and get this

Code:
git pull
remote: Counting objects: 63, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 63 (delta 47), reused 0 (delta 0)
Unpacking objects: 100% (63/63), done.
From https://bitbucket.org/kfsone/tradedangerous
   601f183..b9c6ef2  master     -> origin/master
 * [new tag]         6.14.2     -> 6.14.2
Updating 601f183..b9c6ef2
error: Your local changes to the following files would be overwritten by merge:
        data/Station.csv
Please, commit your changes or stash them before you can merge.
Aborting

And again Sourcetree says the same things..

It's at about this stage I try git add and/or git commit or randomly right clicking on Sourcetree file lists, but I have no idea what I'm doing so I usually just give up...delete the whole TD repository and start again from scratch. I update every change I make to EDDB and Maddavo anyway so I don't actually lose the data. I get it back on the next maddavo import but it still a pain.


The point of the story.....

Can anyone give a set of simple steps/commands to use to prepare for and download/merge an update, without having to teach me git?
 
Last edited:
Whenever I try to pull from git hub all my changes get screwed up... deleted stations get put back in, changed services, etc.

Before i checkout an update that overwrites my station.csv, i run this batch script: (located in my scripts folder)
Code:
@echo off
cd ..
echo Dateiupload beginnt..
misc\madupload.py data/Station.csv
pause
So all changes regarding the stations are uploaded to maddavo, that's probably what you already do.

Afterwards:
Can anyone give a set of simple steps/commands to use to prepare for and download/merge an update, without having to teach me git?
I click on "Fetch" inside SourceTree and normally it gets all changes from git, only sometimes, it doesn't show up there, but don't know why.
With the now updated list of remote branches i select the latest and click on checkout.
If it stops because i have a changed stations.csv then i delete the changed file. (i already uploaded to maddavo, so it's fine)
checkout once more.
do a
Code:
@echo off
..\trade.py import --plug=maddavo --opt=csvs
..\trade.py import --plug=maddavo --opt=use3h
pause
And everything should be fine.

I hope that helps somehow.
 
Thanks for this, I love how often these updates come out, BUT....

Whenever I try to pull from git hub all my changes get screwed up... deleted stations get put back in, changed services, etc.

When I first started to use TD I followed your (kfsone) setup instructions from the wiki and used Sourcetree but could never figure out how to use it properly and so I've just recently switched to cmd line GIT but I keep getting the same questions and problems from both.

First neither will report an update to the origin/master. git status says
Code:
git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   data/Station.csv

no changes added to commit (use "git add" and/or "git commit -a")

and Sourcetree indicates the same.

BUT, I know there is an updated version because kfsone says so, and it's listed right there in the wiki, so I go git pull anyway and get this

Code:
git pull
remote: Counting objects: 63, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 63 (delta 47), reused 0 (delta 0)
Unpacking objects: 100% (63/63), done.
From https://bitbucket.org/kfsone/tradedangerous
   601f183..b9c6ef2  master     -> origin/master
 * [new tag]         6.14.2     -> 6.14.2
Updating 601f183..b9c6ef2
error: Your local changes to the following files would be overwritten by merge:
        data/Station.csv
Please, commit your changes or stash them before you can merge.
Aborting

And again Sourcetree says the same things..

It's at about this stage I try git add and/or git commit or randomly right clicking on Sourcetree file lists, but I have no idea what I'm doing so I usually just give up...delete the whole TD repository and start again from scratch. I update every change I make to EDDB and Maddavo anyway so I don't actually lose the data. I get it back on the next maddavo import but it still a pain.


The point of the story.....

Can anyone give a set of simple steps/commands to use to prepare for and download/merge an update, without having to teach me git?

This^^^ I had exactly the same problems as you describe. The issues are caused because some of the TD 'source' is actually data (the data/*.csv files). And you are updating that data outside of the Git system, either by issung trade.py station commands, or downloading new .csv files from maddavo (directly or using the trade.py import command).

So when you go into the Git system and ask for an update from kfsone, it won't because it thinks you have some changes that you will lose if it overwrites them. And technically, it's correct. You may have more recent changes that kfsone does not have in his distribution.

In the end, I abandoned Git. I'm not writing any code that I need to commit/merge to the main repository, so why use it (was my argument with myself). I just need the code.

So I subscribe on the GitHub to emails to tell me when new code has been committed, and then I just download the whole codebase. I unzip it, and overwrite everything except the data folder. On that I normally exclude the station.csv, and I usually check the systems.csv file to make sure it has got any systems that I've added by hand. If they are missing, then I add them back in by hand to the NEW version, then use that in my data folder.

I treat Github as being authoratative for all the data/*.csv files except stations.csv and Shipvendors.csv, which I regularly upload to maddavo and similarly import regularly.

(Of course if I knew how to 'stash' my changes before the merge, like the error message suggests, and then add them back in, then I'd still use Git I guess.)
 
Last edited:
I was wondering... Are there any thoughts to putting in qualifiers for On hand quantity and Supply/Demand types? I have been running ragged fixing prices, stations, etc instead of actual trading. I just got off a "good run" where they had a supply of 733. Another has a demand of 2312. I know the data is uploaded by EliteOCR... I do my best to make sure data is correct but seriously... I think I spend most of my time updating old/bad data than making credits.
 
Erm so is there a possibility or not? You are all experienced users here from what I can read.

What value does trading "within a certain range of your origin system" have? Is it a way of trying to force TD to visit as many places as possible within a certain radius of 'home'?

You can certainly give TD the same start and end station so it does a little tour.
And you can ask it to propose trades whilst heading towards another system, but not actually forcing it to visit there.
And you can ask it to 'try' and visit named systems with the '--via' switch.
 
What value does trading "within a certain range of your origin system" have? Is it a way of trying to force TD to visit as many places as possible within a certain radius of 'home'?

You can certainly give TD the same start and end station so it does a little tour.
And you can ask it to propose trades whilst heading towards another system, but not actually forcing it to visit there.
And you can ask it to 'try' and visit named systems with the '--via' switch.

Thanks for answering.

So I want TD to look for a round trip where TD decides itself the startingsystem (which should also be the end system, since it is a round trip). It basically the same what http://www.elitetradingtool.co.uk/ does under the "Find trades" option with the Bidirectional option. The problem with all the commands you proposed is, that I would have to know the starting system already or randomly guess it. I want TD to find it itself. Can't be that hard. The website does it too and runs on a server.
 
Thanks for answering.

So I want TD to look for a round trip where TD decides itself the startingsystem (which should also be the end system, since it is a round trip). It basically the same what http://www.elitetradingtool.co.uk/ does under the "Find trades" option with the Bidirectional option. The problem with all the commands you proposed is, that I would have to know the starting system already or randomly guess it. I want TD to find it itself. Can't be that hard. The website does it too and runs on a server.

That website requires you to type in a starting system.
 
Thanks for answering.

So I want TD to look for a round trip where TD decides itself the startingsystem (which should also be the end system, since it is a round trip). It basically the same what http://www.elitetradingtool.co.uk/ does under the "Find trades" option with the Bidirectional option. The problem with all the commands you proposed is, that I would have to know the starting system already or randomly guess it. I want TD to find it itself. Can't be that hard. The website does it too and runs on a server.

The info you want is stored in the netlog files if you manually add "VerboseLogging" to the network settings in appconfig.xml every patch. easy to automate for a front end to td, indeed the current front ends do it already.
 
That website requires you to type in a starting system.

No, its not a starting system. Its the center system from which the search looks for the best bidirectional route, which usually does not start in the system you are at. I know you can tell TD with --start-jumps X to have a bigger search radius, BUT I can't tell TD to look for a bidirectional route. I am not sure if you understand the difference. Probably my english is too bad to explain in more depth.

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

The info you want is stored in the netlog files if you manually add "VerboseLogging" to the network settings in appconfig.xml every patch. easy to automate for a front end to td, indeed the current front ends do it already.

What has "VerboseLogging" to do with it? The problem is not that I have to type in the system name manually, the problem is the finding of bidirectional routes in itself.
 
No, its not a starting system. Its the center system from which the search looks for the best bidirectional route, which usually does not start in the system you are at. I know you can tell TD with --start-jumps X to have a bigger search radius, BUT I can't tell TD to look for a bidirectional route. I am not sure if you understand the difference. Probably my english is too bad to explain in more depth.

I understand perfectly now. My misunderstanding was not from your English (which is much better than my <insert another languages here>) but from the website functionality.

So now I understand the question, the answer is that NO, TradeDangerous cannot replicate that functionality. It has been requested as a feature at https://bitbucket.org/kfsone/tradedangerous/issue/198/new-run-sub-command-to-plan-roundtrips (if you set hops to 2)

As it happens, personally, I hate going backwards and forwards on the same trade run over and over. :)
 
Back
Top Bottom