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

MixedIntegerLinearProgram.ambient_space, feasible_set, optimal_set #31742

Open
mkoeppe opened this issue Apr 27, 2021 · 19 comments
Open

MixedIntegerLinearProgram.ambient_space, feasible_set, optimal_set #31742

mkoeppe opened this issue Apr 27, 2021 · 19 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Apr 27, 2021

We define some convenience methods that make it easy to construct sets and manifold objects corresponding to linear and mixed-integer linear optimization problems.

The ambient space is just a CombinatorialFreeModule or a ConditionSet or a EuclideanSpace, using the (formatted) variable names of the frontend as indices (CombinatorialFreeModule) / variable names.

The feasible set is also a ConditionSet or a manifold subset.

We extend the method get_values so that it can return elements of the ambient space (or its projections).

Followups:

  • Define a backend chart using the variable names that the MILP backend uses
  • Adding variables to the MILP will define a ContinuousMap that injects the previous MILP into the new one.

Depends on #21405
Depends on #31750

CC: @egourgoulhon @mjungmath @tscrim @yuan-zhou

Component: manifolds

Branch/Commit: u/mkoeppe/mixedintegerlinearprogram_ambient_manifold__feasible_subset__objective_scalar_field__optimal_subset @ 3bad25c

Issue created by migration from https://trac.sagemath.org/ticket/31742

@mkoeppe mkoeppe added this to the sage-9.4 milestone Apr 27, 2021
@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 28, 2021

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 28, 2021

Commit: 616dc06

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 28, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

3270098MixedIntegerLinearProgram: New init arg 'name'
a001f20MixedIntegerLinearProgram.interactive_lp_problem: Factor out helper functions _backend_variable_names etc
616dc06MixedIntegerLinearProgram.ambient_manifold: New

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 28, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

b1b29a5MixedIntegerLinearProgram.ambient_manifold: New

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 28, 2021

Changed commit from 616dc06 to b1b29a5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 28, 2021

Changed commit from b1b29a5 to 1c7a697

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 28, 2021

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

1c7a697MixedIntegerLinearProgram.ambient_manifold: Add docstring

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 28, 2021

comment:5

Perhaps the strange variable names for the backend, constructed in MIPVariable.__getitem__, should be changed to the format that _format_backend_variable_name uses.

sage: M2.<x> = MixedIntegerLinearProgram()                                                                                                               
sage: x[1,2]                                                                                                                                             
x_0
sage: x[3,4]                                                                                                                                             
x_1
sage: M2.get_backend().col_name(0)                                                                                                                       
'x[(1, 2)]'

This variable name is not compatible with LP (http://lpsolve.sourceforge.net/5.0/CPLEX-format.htm) or MPS file format (https://www.gurobi.com/documentation/9.1/refman/mps_format.html).
So changing this to something that has a chance to work with these file formats, such as x_1_2, would be an improvement.

@mkoeppe
Copy link
Member Author

mkoeppe commented May 7, 2021

comment:6

opened #31791 (MIPVariable: Better names for backend variable names)

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Mar 5, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title MixedIntegerLinearProgram.ambient_manifold, feasible_subset, objective_scalar_field, optimal_subset MixedIntegerLinearProgram.ambient_space, feasible_set, optimal_set Dec 31, 2022
@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 5, 2023

Dependencies: #21405

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 5, 2023

Changed commit from 1c7a697 to dc3d974

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 5, 2023

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

a55d0a9MixedIntegerLinearProgram.ambient_manifold: Add docstring
b46d482src/sage/numerical/mip.pyx: WIP
1da89f6Initial version of introducing coercion of base rings.
7f69146review
69d5605CombinatorialFreeModule.change_ring: New
bc88a0bCombinatorialFreeModule._coerce_map_from_: Tighten test using base_extend
e82d44fsrc/sage/combinat/free_module.py: Add doctest
083c680src/sage/modules/with_basis/indexed_element.pyx: Revert changes to doctests
a475397Merge #21405
dc3d974WIP

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 6, 2023

Changed dependencies from #21405 to #21405, #31750

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 6, 2023

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

8b2ada9Merge #34839
98bd774Merge #31750
2e2596aMIPVariable.name: New
d8e70dfMixedIntegerLinearProgram: New init arg 'name'
fb935fbMixedIntegerLinearProgram.interactive_lp_problem: Factor out helper functions _backend_variable_names etc
988b855MixedIntegerLinearProgram.ambient_manifold: New
2ecd50dMixedIntegerLinearProgram.ambient_manifold: Add docstring
f9b0cd7src/sage/numerical/mip.pyx: WIP
89c733cWIP
a1d1ca4WIP

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 6, 2023

Changed commit from dc3d974 to a1d1ca4

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 6, 2023

Branch pushed to git repo; I updated commit sha1. New commits:

3bad25cWIP

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 6, 2023

Changed commit from a1d1ca4 to 3bad25c

@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 29, 2023
@mkoeppe mkoeppe modified the milestones: sage-10.0, sage-10.1 Apr 30, 2023
@mkoeppe mkoeppe removed this from the sage-10.1 milestone Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant