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

Rework pso #112

Merged
merged 9 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/bmf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ fn main() -> anyhow::Result<()> {
let config = pso::real_pso(
pso::RealProblemParameters {
num_particles: 100,
a: 1.0,
b: 1.0,
c: 1.0,
weight: 1.0,
c_one: 1.0,
c_two: 1.0,
v_max: 1.0,
},
termination::FixedIterations::new(500),
Expand Down
2 changes: 0 additions & 2 deletions param-study/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions param-study/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions param-study/paramils.sh

This file was deleted.

3 changes: 0 additions & 3 deletions param-study/paramils/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions param-study/params/iwo.txt

This file was deleted.

5 changes: 0 additions & 5 deletions param-study/params/pso.txt

This file was deleted.

3 changes: 0 additions & 3 deletions param-study/problems/bmf-test.txt

This file was deleted.

6 changes: 0 additions & 6 deletions param-study/problems/bmf-train.txt

This file was deleted.

12 changes: 0 additions & 12 deletions param-study/scenarios/iwo.txt

This file was deleted.

12 changes: 0 additions & 12 deletions param-study/scenarios/pso.txt

This file was deleted.

79 changes: 0 additions & 79 deletions param-study/src/instances/iwo.rs

This file was deleted.

2 changes: 0 additions & 2 deletions param-study/src/instances/mod.rs

This file was deleted.

73 changes: 0 additions & 73 deletions param-study/src/instances/pso.rs

This file was deleted.

12 changes: 0 additions & 12 deletions param-study/src/main.rs

This file was deleted.

67 changes: 0 additions & 67 deletions param-study/src/util.rs

This file was deleted.

6 changes: 2 additions & 4 deletions src/framework/components.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
//! The Component trait and structural components.

use crate::{
framework::{
conditions::Condition,
state::{common, State},
},
framework::conditions::Condition,
problems::Problem,
state::{common, State},
};
use serde::Serialize;
use std::any::Any;
Expand Down
5 changes: 1 addition & 4 deletions src/framework/conditions.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/// The Condition trait and combinators.
use crate::{
framework::{components::AnyComponent, state::State},
problems::Problem,
};
use crate::{framework::components::AnyComponent, problems::Problem, state::State};
use serde::Serialize;

/// A condition for loops or branches.
Expand Down
2 changes: 1 addition & 1 deletion src/framework/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use crate::{
framework::{
components::{Block, Branch, Component, Loop, Scope},
conditions::Condition,
state,
},
operators,
problems::{MultiObjectiveProblem, Problem, SingleObjectiveProblem},
state,
};

/// A heuristic, constructed from a set of components.
Expand Down
2 changes: 1 addition & 1 deletion src/framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

pub mod components;
pub mod conditions;
pub mod state;

mod configuration;
pub use configuration::{Configuration, ConfigurationBuilder};
Expand All @@ -17,6 +16,7 @@ mod random;
pub use random::{Random, RandomConfig};

use crate::problems::Problem;
use crate::state;
use crate::tracking::Log;

/// Runs the heuristic on the given problem.
Expand Down
2 changes: 1 addition & 1 deletion src/framework/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rand::{RngCore, SeedableRng};
use serde::Serialize;
use std::any::type_name;

use crate::framework::state::CustomState;
use crate::state::CustomState;

/// A random number generator.
///
Expand Down
Loading