question

Sarthak_22 avatar image
0 Likes"
Sarthak_22 asked Sebastián Cañas commented

Integrating Flexsim with to Solve the knapsack problem?

Hello @Sebastián Cañas in the model Integrating Flexsim with Python to Solve the knapsack problem it only collects the optimal solution, but what I want is the model also collects the remaining products after collecting the optimal products under the parameter so that remaining products can also be utilized, so can you please help me out as it is also application in my business.

FlexSim 24.0.0
knapsackknapsackproblem
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Sebastián Cañas avatar image
0 Likes"
Sebastián Cañas answered Sebastián Cañas commented

Hey @Sarthak_22,

The demo model was built using a combiner to pull the chosen items from the upstream queue using a basic 3d logic.
There are several approaches you could use. I would create a logic using process flow that once the Send to Port or Exit event triggered in the combiner, starts a task sequence to load the remaining product checking the content of the queue.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sarthak_22 avatar image Sarthak_22 commented ·

Thankyou @Sebastián Cañas if so, please share it with me as soon as possible because i have tried a lot by creating the logics in the Knapsack Problem script in the process flow

0 Likes 0 ·
Sarthak_22 avatar image Sarthak_22 commented ·
Hello @Sebastián Cañas can you please help me with my problem? As I am trying it but not able to get the solution to it.
0 Likes 0 ·
Sebastián Cañas avatar image Sebastián Cañas Sarthak_22 commented ·

Hey @Sarthak_22 , this is a very simple demo model: TaskSequence.fsm that shows how you should create the logic. Adjust it according to your needs.

I'd suggest to follow some tutorials of the user manual, such like this one. If you have further questions, please post it as a new thread since this isn't anymore about the Knapsack problem application, but it's regarding creating a logic in FlexSim

0 Likes 0 ·
tasksequence.fsm (38.1 KiB)