How to set upper bounds with "greater than(>)" type instead of "greater than or equal to(>=)" for fmincon?

1 view (last 30 days)
I have a 4D matrix of variables in my nonlinear model. Not all variables are valid in my model depending on the example. There was no way for me to make a less complicate matrix of variables since I need to cover different levels of a factory(each level has a dimension) and I want my model to be in general form to be able to cover models that include full number of variables(the whole 4D matrix)
I tried setting zero for some elements of the 'ub' but in Matlab ub is greater than(>) the x values and not greater than or equal to(>=) them. that forces me to set a very small value(for example 0.000000001) for the upper bounds of the invalid variables. but that doesn't stop Matlab from changing the values of those variables and that means I do not get an optimum and feasible solution for my actual model.
Thanks in advance.

Answers (0)

Categories

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!