Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New structures for Solutions & Results #286

Merged
merged 12 commits into from
Mar 13, 2020
Merged

New structures for Solutions & Results #286

merged 12 commits into from
Mar 13, 2020

Conversation

guimarqu
Copy link
Contributor

@guimarqu guimarqu commented Mar 7, 2020

Solution -> contains a formulation ref now

MoiResult -> to retrieve the result after solving a model with a MoiOptimizer/UserOptimizer

OptimizationOutput -> output of an algorithm & contains an OptimizationState

ObjValues -> contains incumbent bounds

OptimizationState :

    OptimizationState(
        form; feasibility_status = UNKNOWN_FEASIBILITY, termination_status = NOT_YET_DETERMINED,
        ip_primal_bound = nothing, ip_dual_bound = nothing, lp_primal_bound = nothing, lp_dual_bound = nothing,
        max_length_ip_primal_sols = 1, max_length_lp_dual_sols = 1, max_length_lp_dual_sols = 1,
        insert_function_ip_primal_sols = bestbound, insert_function_lp_primal_sols = bestbound, 
        insert_function_lp_dual_sols = bestbound
        )

A convenient structure to maintain and return solutions and bounds of a formulation form during an optimization process. The feasibility and termination statuses are considered as unknown by default. You can define the initial incumbent bounds using ip_primal_bound, ip_dual_bound, lp_primal_bound, and lp_primal_bound keyword arguments. Incumbent bounds are set to infinite (according to formulation objective sense) by default. You can store three types of solutions ip_primal_sols, lp_primal_sols, and lp_dual_sols. These solutions are stored in three lists. Keywords max_length_ip_primal_sols, max_length_lp_primal_sols, and max_length_lp_dual_sols let you define the maximum size of the lists. Keywords insert_function_ip_primal_sols, insert_function_lp_primal_sols, and insert_function_lp_dual_sols let you provide a function to define the way you want to insert a new solution in each list. By default, lists are sorted by best bound.

guimarqu added 2 commits March 7, 2020 22:53
* part 1

* wip

* tests ok

* improve a little bit
* starting work on OptimizationResult

* draft

* wip

* wip

* works

* rm outputs
* masterIpHeur -> IpForm

* future input in comment

* rm use of incumbents

* solve colgen sp with ipform + try things with Logging
* MasterLp -> LpForm

* use LpForm to solve LP restricted master in colgen

* update travis
* rm old optimization input

* debug outputs

* fix bug in call for restricted master heur

* fix things

* not working

* fix colgen mlp

* fixes

* tests ok
@guimarqu guimarqu marked this pull request as ready for review March 12, 2020 13:27
@guimarqu guimarqu changed the title New structures for Solutions/OptimizationOutputs New structures for Solutions Mar 12, 2020
@guimarqu guimarqu changed the title New structures for Solutions New structures for Solutions & Results Mar 12, 2020
* move optresult in alg

* rename OptimizationResult -> OptimizationState
),
PrimalSolution{sense}(), DualBound{sense}()
)
struct OptimizationOutput{F,S} <: AbstractOutput
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this structure still going to be completed? Right now it is not consistent with the description in the PR.
Why do we need it?

@guimarqu guimarqu requested a review from vitornesello March 13, 2020 10:56
@guimarqu guimarqu merged commit ff46bbd into master Mar 13, 2020
@guimarqu guimarqu deleted the optimizationoutput branch March 13, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants