Skip to content

Conversation

@BEZOUI
Copy link
Owner

@BEZOUI BEZOUI commented Nov 1, 2025

Summary

  • add an advanced experimental framework that simulates stochastic hybrid manufacturing and benchmarks 12 optimisation methods
  • generate comprehensive analytics including statistical validation, publication-grade visualisations, and reproducible reports
  • document usage, configuration, and research context for the framework in a new guide

Testing

  • python advanced_manufacturing_optimization.py --methods FCFS SPT --replications 1 --scenarios baseline --max-jobs 30 (fails: missing matplotlib dependency in execution environment)

https://chatgpt.com/codex/tasks/task_e_690557fcc90083248625ad62c0c232df

@BEZOUI BEZOUI merged commit 9b83e78 into master Nov 1, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +602 to +642
class ScheduleEvaluator:
"""Simulate scheduling execution for a given priority list."""

def __init__(self, config: ExperimentalConfig, simulator: StochasticSimulator) -> None:
self.config = config
self.simulator = simulator

def evaluate(
self,
df_original: pd.DataFrame,
prioritized_df: pd.DataFrame,
scenario: str,
replication_seed: int,
) -> Tuple[pd.DataFrame, Dict[str, float]]:
rng = np.random.default_rng(self.config.random_seed + replication_seed)
machine_available_time = defaultdict(float)
job_records = []

for order_index, row in enumerate(prioritized_df.itertuples(index=False)):
base_proc = float(row.Processing_Time)
proc_time = self.simulator.sample_processing_time(base_proc, scenario, order_index, rng)
energy = self.simulator.sample_energy(float(row.Energy_Consumption), scenario, rng)
machine = row.Machine_ID
availability = float(row.Machine_Availability)

arrival_time = float(row.Scheduled_Start_Minutes)
ready_time = max(arrival_time, machine_available_time[machine])
breakdown_delay = self.simulator.machine_breakdown_delay(scenario, rng)
start_time = ready_time + breakdown_delay
end_time = start_time + proc_time

due_date = float(row.Due_Date_Minutes)
tardiness = max(0.0, end_time - due_date)
waiting_time = start_time - arrival_time

success_prob = self.simulator.success_probability(availability)
status = "Completed"
if rng.random() > success_prob:
status = "Failed"
elif tardiness > 0 and rng.random() < 0.5:
status = "Delayed"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Random noise tied to schedule order distorts method comparisons

Each call to ScheduleEvaluator.evaluate seeds a new RNG with only self.config.random_seed + replication_seed and then consumes it in the order of the prioritized schedule. Because the same seed is reused for every method in a replication, the sequence of sampled processing times, breakdown delays and success events is assigned to whichever job happens to appear first, second, etc. in that method’s priority list. This means a job receives different random perturbations purely because it moved in the schedule, so differences between methods mix scheduling quality with unrelated stochastic variation, undermining the accuracy of the reported Friedman/Wilcoxon analyses. Consider generating randomness per job (e.g., keyed by job id) or by sharing the same pre-sampled noise table across methods so each job experiences identical stochastic conditions in every method.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants