Skip to content

Commit

Permalink
fix: Updating derives
Browse files Browse the repository at this point in the history
  • Loading branch information
dandxy89 committed Jan 23, 2024
1 parent fae84c4 commit be04033
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/model/coefficient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use crate::{
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "diff", derive(diff::Diff))]
#[diff(attr(
#[cfg_attr(feature = "diff", diff(attr(
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
))]
)))]
pub struct Coefficient {
pub var_name: String,
/// Coefficient or SOS variable weight
Expand Down
4 changes: 2 additions & 2 deletions src/model/constraint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use crate::model::{coefficient::Coefficient, sos::SOSClass};
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "diff", derive(diff::Diff))]
#[diff(attr(
#[cfg_attr(feature = "diff", diff(attr(
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
))]
)))]
pub enum Constraint {
/// Standard LP constraint
Standard { name: String, coefficients: Vec<Coefficient>, sense: String, rhs: f64 },
Expand Down
4 changes: 2 additions & 2 deletions src/model/lp_problem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use crate::model::{constraint::Constraint, objective::Objective, sense::Sense, v
#[derive(Debug, Default, PartialEq, Eq, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "diff", derive(diff::Diff))]
#[diff(attr(
#[cfg_attr(feature = "diff", diff(attr(
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
))]
)))]
pub struct LPProblem {
pub problem_name: String,
pub problem_sense: Sense,
Expand Down
4 changes: 2 additions & 2 deletions src/model/objective.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use crate::model::coefficient::Coefficient;
#[derive(Debug, PartialEq, Eq, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "diff", derive(diff::Diff))]
#[diff(attr(
#[cfg_attr(feature = "diff", diff(attr(
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
))]
)))]
pub struct Objective {
pub name: String,
pub coefficients: Vec<Coefficient>,
Expand Down
4 changes: 2 additions & 2 deletions src/model/sense.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#[derive(Debug, Default, PartialEq, Eq, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "diff", derive(diff::Diff))]
#[diff(attr(
#[cfg_attr(feature = "diff", diff(attr(
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
))]
)))]
pub enum Sense {
#[default]
Minimize,
Expand Down
4 changes: 2 additions & 2 deletions src/model/sos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::str::FromStr;
#[derive(Debug, PartialEq, Eq, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "diff", derive(diff::Diff))]
#[diff(attr(
#[cfg_attr(feature = "diff", diff(attr(
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
))]
)))]
pub enum SOSClass {
S1,
S2,
Expand Down
4 changes: 2 additions & 2 deletions src/model/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use crate::Rule;
#[derive(Debug, Default, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "diff", derive(diff::Diff))]
#[diff(attr(
#[cfg_attr(feature = "diff", diff(attr(
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
))]
)))]
/// A enum representing the bounds of a variable
pub enum VariableType {
/// Unbounded variable (-Infinity, +Infinity)
Expand Down

0 comments on commit be04033

Please sign in to comment.