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

Introduce (partial) user solution file #1971

Open
jajhall opened this issue Oct 12, 2024 · 0 comments
Open

Introduce (partial) user solution file #1971

jajhall opened this issue Oct 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request LP MIP QP

Comments

@jajhall
Copy link
Member

jajhall commented Oct 12, 2024

Users running HiGHS from the command line may wish to supply a (partial) solution from a file. The HiGHS output solution file format,

Model status
Optimal

# Primal solution values
Feasible
Objective 32
# Columns -1
C0 4 0

is not appropriate for them to mimic, since it contains the Model status, feasibility of the solution values and objective function value.

The format needs to distinguished such files, and for partial solutions, be driven by names, and not indices. Names can be assumed to be known, since the model itself is read from a name-driven format (MPS or .lp). The following formats are suggested

For full solutions

# User solution
# Values $N$
"value 0"
"value 1"
...
"value $N$-1"

For partial solutions

# User solution
# Values $-K$
"name 0" "value 0"
"name 1" "value 1"
...
"name $K$-1" "value $K$-1"

The negated number of values distinguishes full and partial solutions - as with the HiGHS output solution file.

For partial solutions, the variables with unspecified values will be assigned a value kHighsUndefined

When the incumbent model is solved with a non-empty Highs::solution_, variables with kHighsUndefined values will be interpreted as follows

  • For MIPs, after fixing any integer variables with defined values at those values, an attempt will be made to solve for the remaining values to provide an initial integer feasible solution for the MIP solver
  • For continuous problems, variables with kHighsUndefined values will be set to zero if $l\le0\le u$, otherwise their lower bound or (if the lower bound is $-\infty$) upper bound, to provide an initial solution for the simplex solver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request LP MIP QP
Projects
None yet
Development

No branches or pull requests

1 participant