lp:~widelands-dev/widelands/ship_scheduling_2
Created by
ypopezios
and last modified
Apart from other improvements, this redesigns the main algorithm introduced in this branch:
https:/
Main points:
1. Simplified code (although bigger code in total).
2. Faster code (less passes in total).
3. Lighter code (avoids some temporary data structures).
4. Better mathematics/
5. Retains the considerations of the previous branch.
6. Major improvement: After deciding next destination, unload any items unfavored by it, don't load similar items, and give priority in loading items heading to it. All decisions made before loading.
7. Bonus: Added basic unload animation, similar to expedition.
Branch merges
Propose for merging
No branches
dependent on this one.
- GunChleoc: Approve
-
Diff: 1178 lines (+417/-339)10 files modifiedsrc/economy/fleet.cc (+196/-219)
src/economy/fleet.h (+6/-1)
src/economy/portdock.cc (+123/-71)
src/economy/portdock.h (+9/-7)
src/economy/shippingitem.cc (+1/-1)
src/economy/shippingitem.h (+1/-1)
src/logic/map_objects/tribes/ship.cc (+71/-32)
src/logic/map_objects/tribes/ship.h (+6/-3)
test/maps/expedition.wmf/scripting/init.lua (+3/-3)
test/maps/expedition.wmf/scripting/test_cancel_when_port_space_was_reached_two_ships.lua (+1/-1)
Related bugs
Related blueprints
Branch information
Recent revisions
This branch has not been scanned yet.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:widelands