To solve Frank's investment problem, we need to formulate a linear programming (LP) model that maximizes his profit given the constraints. Let's denote:

- \(x_c\) as the amount invested in the cigarette industry,
- \(x_t\) as the amount invested in the tobacco industry.

The objective function aims to maximize the total profit, which can be calculated as:
\[0.30x_c + 0.45x_t\]

Given constraints are:
1. The total investment is up to $5000: \(x_c + x_t \leq 5000\)
2. At least 40% of all the money invested must be in the cigarette industry: \(x_c \geq 0.4(x_c + x_t)\)
3. At least $1000 must be invested in the tobacco industry: \(x_t \geq 1000\)

We also know that \(x_c, x_t \geq 0\) since investments cannot be negative.

Let's simplify the second constraint:
\[x_c \geq 0.4x_c + 0.4x_t\]
\[0.6x_c \geq 0.4x_t\]
\[1.5x_c \geq x_t\]

Now, let's express this problem in Gurobi code:

```python
from gurobipy import *

# Create a new model
m = Model("Frank_Investment")

# Create variables
x_c = m.addVar(lb=0, name="cigarette_investment")
x_t = m.addVar(lb=0, name="tobacco_investment")

# Set the objective function
m.setObjective(0.30*x_c + 0.45*x_t, GRB.MAXIMIZE)

# Add constraints
m.addConstr(x_c + x_t <= 5000, "total_investment")
m.addConstr(1.5*x_c >= x_t, "cigarette_proportion")
m.addConstr(x_t >= 1000, "tobacco_minimum")

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Cigarette investment: {x_c.x}")
    print(f"Tobacco investment: {x_t.x}")
    print(f"Total profit: {m.objVal}")
else:
    print("No optimal solution found")
```