Skip to content

Commit

Permalink
Move comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Sep 3, 2024
1 parent b4b3e10 commit 3b699e9
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
/**
* Dantzig-Wolfe decomposition.
*
* The linear programming formulation of the problem based on Dantzig–Wolfe
* decomposition is written as follows:
*
* Variables:
* - yᵢᵏ ∈ {0, 1} representing a feasible schedule of night i.
* yᵢᵏ = 1 iff the corresponding schedule is selected for night i.
* xⱼᵢᵏ = 1 iff yᵢᵏ contains target j, otherwise 0.
*
* Program:
*
* max ∑ᵢ ∑ₖ (∑ⱼ wⱼ xⱼᵢᵏ) yᵢᵏ
* Note that (∑ⱼ wⱼ xⱼᵢᵏ) is a constant.
*
* 0 <= ∑ₖ yᵢᵏ <= 1 for all nights i
* (not more than 1 schedule selected for each night)
* Dual variables: uᵢ
* 0 <= ∑ₖ xⱼᵢᵏ yᵢᵏ <= 1 for all targets j
* (each target selected at most once)
* Dual variables: vⱼ
*
* The pricing problem consists in finding a variable of positive reduced cost.
* The reduced cost of a variable yᵢᵏ is given by:
* rc(yᵢᵏ) = ∑ⱼ wⱼ xⱼᵢᵏ - uᵢ - ∑ⱼ xⱼᵢᵏ vⱼ
* = ∑ⱼ (wⱼ - vⱼ) xⱼᵢᵏ - uᵢ
*
* Therefore, finding a variable of maximum reduced cost reduces to solving m
* Single Night Star Observation Scheduling Problems with targets with profit
* (wⱼ - vⱼ).
*
*/

#pragma once

#include "starobservationschedulingsolver/flexible_star_observation_scheduling/solution.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,3 @@
/**
* Star observation scheduling problem
*
* Problem description:
* See https://github.com/fontanf/orproblems/blob/main/orproblems/starobservationscheduling.hpp
*
* The linear programming formulation of the problem based on Dantzig–Wolfe
* decomposition is written as follows:
*
* Variables:
* - yᵢᵏ ∈ {0, 1} representing a feasible schedule of night i.
* yᵢᵏ = 1 iff the corresponding schedule is selected for night i.
* xⱼᵢᵏ = 1 iff yᵢᵏ contains target j, otherwise 0.
*
* Program:
*
* max ∑ᵢ ∑ₖ (∑ⱼ wⱼ xⱼᵢᵏ) yᵢᵏ
* Note that (∑ⱼ wⱼ xⱼᵢᵏ) is a constant.
*
* 0 <= ∑ₖ yᵢᵏ <= 1 for all nights i
* (not more than 1 schedule selected for each night)
* Dual variables: uᵢ
* 0 <= ∑ₖ xⱼᵢᵏ yᵢᵏ <= 1 for all targets j
* (each target selected at most once)
* Dual variables: vⱼ
*
* The pricing problem consists in finding a variable of positive reduced cost.
* The reduced cost of a variable yᵢᵏ is given by:
* rc(yᵢᵏ) = ∑ⱼ wⱼ xⱼᵢᵏ - uᵢ - ∑ⱼ xⱼᵢᵏ vⱼ
* = ∑ⱼ (wⱼ - vⱼ) xⱼᵢᵏ - uᵢ
*
* Therefore, finding a variable of maximum reduced cost reduces to solving m
* Single Night Star Observation Scheduling Problems with targets with profit
* (wⱼ - vⱼ).
*
*/

#pragma once

#include "starobservationschedulingsolver/star_observation_scheduling/solution.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
/**
* Dantzig-Wolfe decomposition.
*
* The linear programming formulation of the problem based on Dantzig–Wolfe
* decomposition is written as follows:
*
* Variables:
* - yᵢᵏ ∈ {0, 1} representing a feasible schedule of night i.
* yᵢᵏ = 1 iff the corresponding schedule is selected for night i.
* xⱼᵢᵏ = 1 iff yᵢᵏ contains target j, otherwise 0.
*
* Program:
*
* max ∑ᵢ ∑ₖ (∑ⱼ wⱼ xⱼᵢᵏ) yᵢᵏ
* Note that (∑ⱼ wⱼ xⱼᵢᵏ) is a constant.
*
* 0 <= ∑ₖ yᵢᵏ <= 1 for all nights i
* (not more than 1 schedule selected for each night)
* Dual variables: uᵢ
* 0 <= ∑ₖ xⱼᵢᵏ yᵢᵏ <= 1 for all targets j
* (each target selected at most once)
* Dual variables: vⱼ
*
* The pricing problem consists in finding a variable of positive reduced cost.
* The reduced cost of a variable yᵢᵏ is given by:
* rc(yᵢᵏ) = ∑ⱼ wⱼ xⱼᵢᵏ - uᵢ - ∑ⱼ xⱼᵢᵏ vⱼ
* = ∑ⱼ (wⱼ - vⱼ) xⱼᵢᵏ - uᵢ
*
* Therefore, finding a variable of maximum reduced cost reduces to solving m
* Single Night Star Observation Scheduling Problems with targets with profit
* (wⱼ - vⱼ).
*
*/

#include "starobservationschedulingsolver/flexible_star_observation_scheduling/algorithms/column_generation.hpp"

#include "starobservationschedulingsolver/flexible_star_observation_scheduling/algorithm_formatter.hpp"
Expand Down
37 changes: 37 additions & 0 deletions src/star_observation_scheduling/algorithms/column_generation.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
/**
* Star observation scheduling problem
*
* Problem description:
* See https://github.com/fontanf/orproblems/blob/main/orproblems/starobservationscheduling.hpp
*
* The linear programming formulation of the problem based on Dantzig–Wolfe
* decomposition is written as follows:
*
* Variables:
* - yᵢᵏ ∈ {0, 1} representing a feasible schedule of night i.
* yᵢᵏ = 1 iff the corresponding schedule is selected for night i.
* xⱼᵢᵏ = 1 iff yᵢᵏ contains target j, otherwise 0.
*
* Program:
*
* max ∑ᵢ ∑ₖ (∑ⱼ wⱼ xⱼᵢᵏ) yᵢᵏ
* Note that (∑ⱼ wⱼ xⱼᵢᵏ) is a constant.
*
* 0 <= ∑ₖ yᵢᵏ <= 1 for all nights i
* (not more than 1 schedule selected for each night)
* Dual variables: uᵢ
* 0 <= ∑ₖ xⱼᵢᵏ yᵢᵏ <= 1 for all targets j
* (each target selected at most once)
* Dual variables: vⱼ
*
* The pricing problem consists in finding a variable of positive reduced cost.
* The reduced cost of a variable yᵢᵏ is given by:
* rc(yᵢᵏ) = ∑ⱼ wⱼ xⱼᵢᵏ - uᵢ - ∑ⱼ xⱼᵢᵏ vⱼ
* = ∑ⱼ (wⱼ - vⱼ) xⱼᵢᵏ - uᵢ
*
* Therefore, finding a variable of maximum reduced cost reduces to solving m
* Single Night Star Observation Scheduling Problems with targets with profit
* (wⱼ - vⱼ).
*
*/

#include "starobservationschedulingsolver/star_observation_scheduling/algorithms/column_generation.hpp"

#include "starobservationschedulingsolver/star_observation_scheduling/algorithm_formatter.hpp"
Expand Down

0 comments on commit 3b699e9

Please sign in to comment.