Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function ResultFinder {
- Parameter NodeList.
- Parameter ScoreType.
- Parameter ScoreList.
- Parameter RestrictionTypeList.
- local Best100dv is ScoreImproveCompare(NodeList, ScoreType, ScoreList, RestrictionTypeList[0], 100).
- local Best10dv is ScoreImproveCompare(Best100dv, ScoreType, ScoreList, RestrictionTypeList[1], 10).
- local Best1dv is ScoreImproveCompare(Best10dv, ScoreType, ScoreList, RestrictionTypeList[2], 1).
- local Best01dv is ScoreImproveCompare(Best1dv, ScoreType, ScoreList, RestrictionTypeList[3], 0.1).
- return ScoreImproveCompare(Best01dv, ScoreType, ScoreList, RestrictionTypeList[4], 0.01).
- }
- Function ScoreImproveCompare {
- Parameter InitialNodeList.
- Parameter ScoreType.
- Parameter ScoreList.
- Parameter RestrictionType.
- Parameter Increment.
- local NodeList is InitialNodeList:copy.
- local CurrentDv is CurrentDVGetterx().
- until false {
- local OldNodeList is NodeList:copy.
- local OldScore is Score(OldNodeList, ScoreType, ScoreList, CurrentDv).
- set NodeList to Improve(OldNodeList, ScoreType, ScoreList, CurrentDv, RestrictionType, Increment).
- local NewScore is Score(NodeList, ScoreType, ScoreList, CurrentDv).
- if round(OldScore, 6) <= round(NewScore, 6) {
- return OldNodeList.
- }
- }
- }
- ==========================================
- Function CorrectionBurn {
- Parameter TargetDestination.
- Parameter TargetPeriapsis.
- local NewList is list(time:seconds + 300, 0, 0, 0).
- local NewScoreList is list(TargetDestination, TargetPeriapsis).
- local NewRestrictionList is TX_lib_hillclimb_universal["IndexFiveFolderder"]("none").
- local FinalMan is TX_lib_hillclimb_universal["ResultFinder"](NewList, "Interplanetary", NewScoreList, NewRestrictionList).
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement