From: Dr. M. B. <dr....@t-...> - 2014-08-19 15:38:13
|
Hello Stefan, i think my approach to the freight train problem in 1837 by adding another OR Action might be overkill at least for 1837, but anyway might be needed for 1853... But thats another story that time might tell. Question to the Master of the network revenue code :); Do we get a list of vistited maphexes (vertices) by each train ? So that one could add a step to the Payout and add the value of a visited coal mine again to the company specific payout ? Regards, Martin |
From: Stefan F. <ste...@we...> - 2014-08-21 14:16:07
|
Martin: I did take a short glance on your code, however I have seen nothing related to freight trains. Maybe you have not pushed your changes? I would not assume that a new OR Action is required, more like adding new possibilities to the existing one. Yes I agree the activity is very similar to the 1853 revenue and payout problem. I have thought about that previously and it is definite a two-dimensional problem, so the player in the general case (in 1837 at least for a major that can access more than one mine) should be able to choose between different optimization results. (E.g. one maximum run is 320 revenue and 60 from mines, another is 300 revenue, however 80 from mines). So I would present the player a list of possible results and having him/her choose from it. For sure, the results of the run are shown already graphically and as a list of hexes, so this is available. Stefan On 08/19/2014 05:37 PM, Dr. Martin Brumm wrote: > Hello Stefan, > > i think my approach to the freight train problem in 1837 by adding > another OR Action might be overkill at least for 1837, but anyway might > be needed for 1853... But thats another story that time might tell. > > Question to the Master of the network revenue code :); > > Do we get a list of vistited maphexes (vertices) by each train ? So that > one could add a step to the Payout and add the value of a visited coal > mine again to the company specific payout ? > > Regards, > Martin > > > ------------------------------------------------------------------------------ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Dr. M. B. <dr....@t-...> - 2014-08-21 15:13:45
|
HI Stefan, i had reverted the commits today, cause i decided to use a different approach without an additional ORAction. My vector of approach would have been as you said to list a number of different revenues with a special revenue derived from the coal trains for the president to choose and decide, but since my understand of your revenue code is very basic that will take some time to find its way, i am afraid. i found the display code in NetworkGraph.visualize and from there went backwards to get more information :) But again, lots of obstacles (like the vertices for the mines and how to treat them with out duplicating code). Regards Martin Am 21.08.14 um 16:15 schrieb Stefan Frey: > Martin: > > I did take a short glance on your code, however I have seen nothing > related to freight trains. Maybe you have not pushed your changes? > > I would not assume that a new OR Action is required, more like adding > new possibilities to the existing one. > > Yes I agree the activity is very similar to the 1853 revenue and payout > problem. I have thought about that previously and it is definite a > two-dimensional problem, so the player in the general case (in 1837 at > least for a major that can access more than one mine) should be able to > choose between different optimization results. (E.g. one maximum run is > 320 revenue and 60 from mines, another is 300 revenue, however 80 from > mines). So I would present the player a list of possible results and > having him/her choose from it. > > For sure, the results of the run are shown already graphically and as a > list of hexes, so this is available. > > Stefan > > > On 08/19/2014 05:37 PM, Dr. Martin Brumm wrote: >> Hello Stefan, >> >> i think my approach to the freight train problem in 1837 by adding >> another OR Action might be overkill at least for 1837, but anyway might >> be needed for 1853... But thats another story that time might tell. >> >> Question to the Master of the network revenue code :); >> >> Do we get a list of vistited maphexes (vertices) by each train ? So that >> one could add a step to the Payout and add the value of a visited coal >> mine again to the company specific payout ? >> >> Regards, >> Martin >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel >> > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Stefan F. <ste...@we...> - 2014-08-21 15:36:05
|
Martin, to give you some hints: For the interaction between Rails and the revenue code the class to start with is RevenueAdapter, as it converts between the Rails and the revenue data structures. A similar relation between Rails to the code to generate the network graph exists with NetworkAdapter. 1) For the coal minors the current maximization code is enough, as they have one unique optimal run. To access the optimal run, use getOptimalRun() in RevenueAdapter which returns a RevenueTrainRun object that has all information on the optimal run. However it only returns NetworkVertices which are objects of the algorithm package only. However it is possible to convert them to Rails hex objects using methods provided in NetworkVertex. So I recommend writing a getAsHexes() method for RevenueTrainRun() and use the result of that to figure out the additional revenue for the coal mine. 2) For the majors it is more difficult, as the owning director might choose to forfeit some company dividend for increased mine payout. In a first step you could use the same approach as for the minors and allow the player to manually adjust to the result he/she prefers. In a second step the more demanding two-dimensional optimization path for company dividend/mine income could be generated. However this seems to be something that takes a little more work and is not per-requisite to be able to play 1837 with Rails. Hope this helps, please feel free to come up with questions, Stefan On 08/21/2014 05:13 PM, Dr. Martin Brumm wrote: > HI Stefan, > > i had reverted the commits today, cause i decided to use a different > approach without an additional ORAction. > > My vector of approach would have been as you said to list a number of > different revenues with a special revenue derived from the coal trains > for the president to choose and decide, but since my understand of your > revenue code is very basic that will take some time to find its way, i > am afraid. > > i found the display code in NetworkGraph.visualize and from there went > backwards to get more information :) > > But again, lots of obstacles (like the vertices for the mines and how to > treat them with out duplicating code). > > Regards > Martin > > Am 21.08.14 um 16:15 schrieb Stefan Frey: >> Martin: >> >> I did take a short glance on your code, however I have seen nothing >> related to freight trains. Maybe you have not pushed your changes? >> >> I would not assume that a new OR Action is required, more like adding >> new possibilities to the existing one. >> >> Yes I agree the activity is very similar to the 1853 revenue and payout >> problem. I have thought about that previously and it is definite a >> two-dimensional problem, so the player in the general case (in 1837 at >> least for a major that can access more than one mine) should be able to >> choose between different optimization results. (E.g. one maximum run is >> 320 revenue and 60 from mines, another is 300 revenue, however 80 from >> mines). So I would present the player a list of possible results and >> having him/her choose from it. >> >> For sure, the results of the run are shown already graphically and as a >> list of hexes, so this is available. >> >> Stefan >> >> >> On 08/19/2014 05:37 PM, Dr. Martin Brumm wrote: >>> Hello Stefan, >>> >>> i think my approach to the freight train problem in 1837 by adding >>> another OR Action might be overkill at least for 1837, but anyway might >>> be needed for 1853... But thats another story that time might tell. >>> >>> Question to the Master of the network revenue code :); >>> >>> Do we get a list of vistited maphexes (vertices) by each train ? So that >>> one could add a step to the Payout and add the value of a visited coal >>> mine again to the company specific payout ? >>> >>> Regards, >>> Martin >>> >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> Rails-devel mailing list >>> Rai...@li... >>> https://lists.sourceforge.net/lists/listinfo/rails-devel >>> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |