- return new DiskS19Action(get_model(), static_cast<double>(size), not is_on(), this, s4u::Io::OpType::WRITE);
-}
-
-/**********
- * Action *
- **********/
-
-DiskS19Action::DiskS19Action(Model* model, double cost, bool failed, DiskImpl* disk, s4u::Io::OpType type)
- : DiskAction(model, cost, failed, model->get_maxmin_system()->variable_new(this, 1.0, -1.0, 3), disk, type)
-{
- XBT_IN("(%s,%g", disk->get_cname(), cost);
-
- // Must be less than the max bandwidth for all actions
- model->get_maxmin_system()->expand(disk->get_constraint(), get_variable(), 1.0);
+ auto* action = new DiskS19Action(this, static_cast<double>(size), not disk->is_on());
+ get_maxmin_system()->expand(disk->get_constraint(), action->get_variable(), 1.0);