Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 1882 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Is there a way to do this? The difference should be as close as possible. I use even number because the number are by pairs. 2 4 6 8 10

Example

18 =  10 and 8

20 =  10 and 10

22 = 12 and 10

36 = 18 and 14

 

 

 

Posted

because i cant split them 16 and 16 there both equal. Also if use 17 + 15 i will not work since the number are odd. So i move to 18 by 14.

 

Posted

I am afraid I don't follow your logic. You split 20 into 10 and 10; they're equal and even. Why can't you split 36 into 18 and 18? They are also equal and even. OTOH, 18 + 14 = 32, not 36 - so this makes no sense to me at all.

 

Posted (edited)
14 minutes ago, comment said:

I am afraid I don't follow your logic. You split 20 into 10 and 10; they're equal and even. Why can't you split 36 into 18 and 18? They are also equal and even. OTOH, 18 + 14 = 32, not 36 - so this makes no sense to me at all.

 

Sorry the 20 = 10 + 10 is wrong it should be 12 + 8. Basically we have to split it 60% / 40% something like that. the difference should be as close as 1 to 2 pairs.

Edited by chadski021
Posted (edited)
29 minutes ago, chadski021 said:

something like that

I am afraid that's not a good enough description. You are asking how to do something, but we don't know exactly what that something is. Maybe you should start by explaining why this is needed.

 

ADDED:

Maybe something like this could work for you::

Let ( [
a = 2 * Ceiling ( number / 4 ) ;
b = 2 * Floor ( number / 4 ) 
] ;
If ( a = b ; List ( a + 2 ; b - 2 ) ; List ( a ; b ) )
)

This returns:

18 = 10 + 8;
20 = 12 + 8;
22 = 12 + 10;
36 = 20 + 16.

 

Edited by comment
Posted
2 minutes ago, comment said:

I am afraid that's not a good enough description. You are asking how to do something, but we don't know exactly what that something is. Maybe you should start by explaining why this is needed.

 

Ok, I try my best to explain this. We have a database called shutter. Shutter is installed to window/door and has blades by pairs. ex 20 = 10 pairs. We have scenario that a sliding door has 2 panels. 50% 1 panel can slide and 50% 1 cannot slide. Basically we install the shutter always 50% by 50% if the middle window is open and lock reachable in the middle. But in this case 50% of slide cant be open, So i need to increase at 1 to 2 pairs of blade so its still able to lock it inside. attached is my sample idea

sample.png

Posted

Okay, then I think my suggestion above should work for you. If you like, you can split the calculation to two fields:

2 * Ceiling ( Number / 4 ) + 2 * not Mod ( Number ; 4 )

and:

2 * Floor ( Number / 4 ) - 2 * not Mod ( Number ; 4 )

 

Posted
16 minutes ago, comment said:

Sorry, not sure what you mean by that.

something like 

20 = 16 and 4

30 = 18 and 12

Posted
4 minutes ago, comment said:

Wouldn't it be just a matter of adding/subtracting 2 to the results of the above?

Got it thank you so much.

This topic is 1882 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.