Comments (8)
This issue should be solved with the pull request I made on pix-framework (attached to this issue).
Check it out when you can, and accept it if you don't see anything weird. And run the benchmarks again, please.
from simod.
Hi @iharsuvorau, we actually never tried this case because the tests of Fuzzy+Extraneous we run were without optimization (in extraneous delays), so Prosimos wasn't being called within this package.
I don't have much time these days, could you take a look at it? I checked the code and the simulation model (including the specific fuzzy parameters) are being passed correctly to the ExtraneousDelays package, so I can't easily see a reason why it would run the Crisp version of Prosimos.
Key points in the workflow of how it works:
- In here Simod creates the SimulationModel instance that ExtraneousDelays uses, and puts there the simulation parameters (using
._to_prosimos_format()
function here). - I've checked, and this function DOES add the
model_type: "FUZZY"
to thesedict
with the parameters, so it should be fine. - Then ExtraneousDelays package enhances these parameters by adding the timer events modeling the delays in here. However, this just adds an extra field, so should be fine too.
- Then, it simulates with Prosimos with these parameters dumped in a file.
My idea would be to check the parameters file of one of these ExtraneousDelays iterations (debugging) and see if it has the model_type = "FUZZY"
element just to be sure that the json file is correct. If Prosimos is running Crisp I would imagine that at some place we are missing this model_type = "FUZZY"
, but can't imagine where without debugging.
from simod.
@iharsuvorau I just checked running it in local and checking the JSON files, and the parameters are Crisp, I don't really understand how it is happening, if you can take a look at it. The JSON files are:
- In all iterations of Control-flow optimization: Fuzzy.
- In all iterations of ResourceModel optimization: Fuzzy.
- In the first iteration of ExtraneousDelay: Crisp.
Something is happening in the call to ._to_prosimos_format()
when preparing the ExtraneousDelayOptimizer.
from simod.
Hi @orlenyslp. We're having an issue with Simod and its dependencies. So far, it seems the issue is the one we once discussed with you, when CRISP calendar discovery (that we moved to pix-framework
repo) had been calculating negative duration, remember?
This is the place where it's happening, https://github.com/AutomatedProcessImprovement/pix-framework/blob/main/src/pix_framework/discovery/resource_calendar_and_performance/crisp/resource_calendar.py#L680C13-L680C13.
Here's the screenshot from the debugger with parameters, because this bug isn't so easy to reproduce:
You can see, the total_duration
is negative. Is it correct behavior for the CRISP calendar discovery? You've been fixing this bug before, right?
from simod.
@orlenyslp However, the bug we're facing is probably a different one, though, in the same function.
On the screenshot below, we can see that i = -3
when self.work_intervals[c_day]
length is only 2 items. When the function tries to get self.work_intervals[c_day][-3]
it's actually trying to get the third result from the end of the list. Is it an expected behavior?
![Screenshot 2023-09-05 at 17 32 40](https://private-user-images.githubusercontent.com/6259054/265733183-81a1a4dc-c01f-4a18-9804-419c7ed87a8b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNzA5MDQsIm5iZiI6MTcyMDA3MDYwNCwicGF0aCI6Ii82MjU5MDU0LzI2NTczMzE4My04MWExYTRkYy1jMDFmLTRhMTgtOTgwNC00MTljN2VkODdhOGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDRUMDUyMzI0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzkxNDJkMjVhOGRmMDVlZWUwZjU2ZmE2NzE0ZGM3M2NiMTc4NzVhNzU3Mzg2ZTg3ODQyZGUwZTBhNGMyNjljZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.4uZl_FOvy7ZWklYBC_tCq_jq9FhocPHdZdQX3wSVh-o)
from simod.
Hi @david-chapela. Sorry, my bad. I'd been working on this dumping/parsing of resource models to and from a dictionary 3 weeks ago in pix-framework
. I didn't realize that we use .from_dict
internally in Simod also.
Sure, thank you! I'm re-running all the benchmarks now because this affected everything after the resource optimization step in Simod, including extraneous that we've been examining for the last week.
Still, do we need to deal with negative the duration in RCalendar? Is it okay to be negative? Should we mark it as a bug?
from simod.
@iharsuvorau yeah, it took me a while to get to see that it was because of how we read the ResourceModel
. I was first checking all the files, and all of them were good.
Don't worry about the benchmarks of previous weeks, the extraneous delays were not optimized in those cases (we were running the direct optimization), so there should be no difference in the result. I think it only affected this last run where we optimize the ExtraneousDelays
with 20 iterations.
from simod.
Regarding the negative values... I wouldn't go deep for now. It could be possible that the reason behind that negative case is due to running Prosimos with Crisp but with data that was actually belonging to Fuzzy.
Maybe the best decision would be to inspect in detail what's happening to check if it's due to a bug, or to running Prosimos-crisp using fuzzy parameters. However, that would probably take a lot of time for just a check (we're not really getting a bug running it under a normal scenario).
Also, I remember two cases where we got an issue like this before, and both were because the input we were giving to Prosimos was in the wrong format.
from simod.
Related Issues (20)
- Add support for fuzzy calendars HOT 5
- Wait for Prosimos to be updated to parse distributions from pix-framework
- Update SplitMiner version to avoid "IllegalArgumentException: Comparison method violates its general contract" exception HOT 5
- Wrong version saved in configuration.yaml
- Investigate long running times when using pooled resources that occurred during benchmarking for Simod 3.5.24 HOT 3
- Unexpected max_cycle_time batching attribute name HOT 1
- Error when getting activities' names and IDs from BPMN model using BPMNReaderWriter and simod.bpm.graph.get_activities_ids_by_name
- Remove BPMNReaderWriter from code
- Repair missing activities in Resource Model when Process Model is provided HOT 2
- Parse correctly the name of the project with compressed CSV files
- How to start Simod HOT 1
- Only consider prioritization/batching if they improve the model performance
- Avoid final evaluation by default
- Analyze excessive print of warning when generating duration distributions HOT 1
- Add simple configuration examples
- Integrate new version of Split Miner without the dependency on X server
- Generate schema for YAML configuration
- Change CLI commands and options HOT 1
- Simod produces malformed process model HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simod.