Skip to content

Commit

Permalink
Merge pull request #9 from MrKonstantinT/clone-constraint
Browse files Browse the repository at this point in the history
Derive Clone on Constraint Model.
  • Loading branch information
konstantindt authored Mar 26, 2017
2 parents 1452104 + 4710d78 commit e777e87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/math/expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use Num;
use math::variables::{AbstVar, new_const};
use math::relationships::Relationship;

#[derive(Clone)]
pub struct Expression {
left_hand_side: Vec<AbstVar>,
relationship: Relationship,
Expand Down
2 changes: 1 addition & 1 deletion src/math/relationships.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[derive(PartialEq, Debug)]
#[derive(PartialEq, Debug, Clone)]
pub enum Relationship {
EQ,
LEQ,
Expand Down
1 change: 1 addition & 0 deletions src/objective/constraints.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use math::variables::AbstVar;
use math::expressions::Expression;

#[derive(Clone)]
pub enum Constraint {
Regular(Expression),
NonNegative(AbstVar),
Expand Down

0 comments on commit e777e87

Please sign in to comment.